<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:59:17 JST 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>PFS-JIRA</title>
    <link>https://pfspipe.ipmu.jp/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.3.4</version>
        <build-number>803005</build-number>
        <build-date>13-09-2019</build-date>
    </build-info>


<item>
            <title>[PIPE2D-880] Slow execution of Zernike algorithm after PIPE2D-874</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-880</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;The execution time has slowed significantly after the implementation of &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-874&quot; title=&quot;Centering/offset/interpolation - fix to PIPE2D 778 and PIPE2D-777&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-874&quot;&gt;&lt;del&gt;PIPE2D-874&lt;/del&gt;&lt;/a&gt;. For an image in focus, the time on my machine has increased from below 2 seconds, to approx. 12 seconds. It is not immediately obvious if the same slowdown is happening on cluster as well. This is obviously somehow connected with applying offsets and downsampling introduced in &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-874&quot; title=&quot;Centering/offset/interpolation - fix to PIPE2D 778 and PIPE2D-777&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-874&quot;&gt;&lt;del&gt;PIPE2D-874&lt;/del&gt;&lt;/a&gt;, but during testing of the algorithm I did not notice such a stark slowdown.&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="16990">PIPE2D-880</key>
            <summary>Slow execution of Zernike algorithm after PIPE2D-874</summary>
                <type id="3" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10518&amp;avatarType=issuetype">Task</type>
                                            <priority id="10000" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/medium.svg">Normal</priority>
                        <status id="10002" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/generic.png" description="The issue is resolved, reviewed, and merged">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="ncaplar">ncaplar</assignee>
                                    <reporter username="ncaplar">ncaplar</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 Aug 2021 14:52:46 +0000</created>
                <updated>Thu, 2 Sep 2021 20:33:13 +0000</updated>
                            <resolved>Thu, 2 Sep 2021 20:33:13 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                <comments>
                            <comment id="21876" author="ncaplar" created="Thu, 26 Aug 2021 19:30:00 +0000"  >&lt;p&gt;The reason for large increase in the execution time is that Lancoz interpolation is 1. somewhat more time consuming and 2. my optimizing algorithm needs a large number of iterations to find center of light .&lt;/p&gt;

&lt;p&gt;1. using galsim and Lanczos5 interpolation, a single iteration of the shifting oversampled image in focus and drawing it takes around 40 ms.&lt;br/&gt;
2. to find the shift that creates model image with the same center of light as the scientific image my algorithm was badly optimized and using 100 to 300 iterations.&#160;&lt;/p&gt;

&lt;p&gt;In this fashion, the algorithm was using many seconds (4+ seconds) to create an image in focus.&#160;&lt;/p&gt;

&lt;p&gt;Two improvements can be made:&lt;br/&gt;
1. For image in focus, it is actually trivial to find the position which makes center of light (as e.g., how it is done in the pipeline).&lt;br/&gt;
2. For images in defocus where I am centering image in order to reduce chi - further investigation is needed. (I might switch to using lsst.offset algorithm which is faster or reducing the number of iterations needed)&lt;/p&gt;</comment>
                            <comment id="21892" author="ncaplar" created="Thu, 2 Sep 2021 20:32:54 +0000"  >&lt;p&gt;I have implemented both improvements mentioned above (internal version of code 0.48a).&lt;/p&gt;

&lt;p&gt;1. When studying images in focus and matching flux position, I am using straightforward adjustments, instead of running full optimizing algorithm.&lt;/p&gt;

&lt;p&gt;2. Everything has been switched to lsst.offset algorithm. This now requires the code to run in lsst universe.&lt;/p&gt;

&lt;p&gt;The implementation took much longer than expected. This is due to my mistakes and confusion with proper ordering of axis, and some fine details in how lsst.offset work. Additionally, when switching to lsst algorithm some dependencies are older version than I have been using (for instance I have been using pandas version 1.2 and pipeline has 0.24 available), so the code had to be adjusted to be compatible.&#160;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10500" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|zzs8vk:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        </customfields>
    </item>
</channel>
</rss>