<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:57:22 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-757] 2d psf solution from January 2021 are poor in the red (R1)</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-757</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;I noticed that my solutions from January 2021 are systematically poor in the red part of the red detector.&#160;&lt;/p&gt;

&lt;p&gt;poor_fit_detector.png shows the quantity that measures the quality of the fit. It is log10(chi^2 residual/ chi^2 max), where chi^2 max is np.mean(sci_image^2/var_image), and&#160;chi^2 residual is&#160;np.mean((sci_image-model_image)^2/var_image).&lt;/p&gt;

&lt;p&gt;example_poor_fit.png shows the example of the single psf. We can see how the fit does not capture the shape of psf in the data.&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="15427">PIPE2D-757</key>
            <summary>2d psf solution from January 2021 are poor in the red (R1)</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="10100" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/generic.png" description="No further work should be done on this.">Won&apos;t Fix</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="ncaplar">ncaplar</assignee>
                                    <reporter username="ncaplar">ncaplar</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Mar 2021 19:51:34 +0000</created>
                <updated>Tue, 1 Jun 2021 13:19:42 +0000</updated>
                            <resolved>Tue, 1 Jun 2021 13:19:42 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="18800" author="ncaplar" created="Wed, 10 Mar 2021 19:32:29 +0000"  >&lt;p&gt;One of the reasons why the poor fits are more obvious in red now is due to the fact that result have improved in the rest of the detector (see the difference between ``fit_April_2020&apos;&apos; with result from April 2020 and ``poor_fit_detector&apos;&apos; with results from now). At the same time the fits have not improved (in some cases they even seem worse) in the red part of the detector. This makes this difference much more obvious now, even though there were hints of this issue already before.&lt;/p&gt;</comment>
                            <comment id="18803" author="ncaplar" created="Wed, 10 Mar 2021 19:54:56 +0000"  >&lt;p&gt;The biggest problems for the fit are still on the edges of detector and struts. On image ``where_the_fit_is_probematic&apos;&apos; I have highlighted 1% of most problematic pixels which are dominating the chi**2_reduced fit.&lt;/p&gt;</comment>
                            <comment id="18830" author="rhl" created="Thu, 11 Mar 2021 15:41:30 +0000"  >&lt;p&gt; &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;13409_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/13409/13409_where_the_fit_is_problematic.png&quot; title=&quot;where_the_fit_is_problematic.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;13409&quot; file-preview-title=&quot;where_the_fit_is_problematic.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/13409/_thumb_13409.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt; is interesting.  Do you have any ideas about how to improve the modelling, or should we just mask out some regions of the pupil in the fitting?&lt;/p&gt;</comment>
                            <comment id="18831" author="ncaplar" created="Thu, 11 Mar 2021 15:45:40 +0000"  >&lt;p&gt;I am thinking about what to do. It is not obvious how to mask properly where the most offending pixels are, as this changes with position on detector and amount of defocus. One thing that is constant is that they are always near the edges of detector and struts, but not at the exactly same spot.&lt;/p&gt;</comment>
                            <comment id="19115" author="ncaplar" created="Thu, 8 Apr 2021 17:52:28 +0000"  >&lt;p&gt;As discussed on Princeton PFS telecom on Monday, I have implemented modification to the pupil which should improve the fidelity of modelling in the corners of the detector and testing fitting algorithm that minimizes chi instead of chi**2. I have implemented these changes today and I am running first tests cases on cluster now.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="19154" author="ncaplar" created="Fri, 16 Apr 2021 18:34:08 +0000"  >&lt;p&gt;This is painful because one person is clogging the cluster with a huge amount of jobs, and they are ahead of me in the schedule. I have managed to run only a few examples on tiger-sumire which I will evaluate shortly, but I have not been able to get any code of systematic run. I am unsure why I am not getting any time... I might try rewriting the cluster procedure to get into other ques.&#160;&lt;/p&gt;</comment>
                            <comment id="20264" author="ncaplar" created="Mon, 24 May 2021 18:36:13 +0000"  >&lt;p&gt;After a lot of work and experiments I have implemented the following modifications:&lt;/p&gt;

&lt;p&gt;1. I start the chain by refitting the image in focus by modifying low order Zernike parameters (z4-z11) and setting those values as starting values in parameter search.&#160;&lt;/p&gt;

&lt;p&gt;2. Refactored the optimization code so that convergence is slower and parameters space is better explored.&#160;&lt;/p&gt;

&lt;p&gt;3. The code minimizes abs(chi) instead of chi**2. This was done in order to reduce the importance of pixels with low flux values which might have been wrongly fitted if the pupil description is not perfect. I also tried various masking choices which would change throughout the evolution, but the result do not seem to change.&lt;/p&gt;

&lt;p&gt;4. The particular evolution was done with only images at +-4 mm and in focus in order to speed up the fitting procedure.&#160;&#160;&lt;/p&gt;

&lt;p&gt;5. During the optimization process I demand that improved solutions not only improve the overall quality of the fit, but also that they do not degrade already achieved quality in the focus. In other words I reject parameters which might improve the solution in defocused images if they severely degrade the quality of in focused image.&#160;&lt;/p&gt;

&lt;p&gt;The agreement in the focus has now improved. See the image&#160; ``Comparison_old_and_new_PIPE_757&apos;&apos;. Note that chi scaling is different in each set of images. The images are:&lt;br/&gt;
Top left: Defocused image before these changes&lt;/p&gt;

&lt;p&gt;Top right: Defocused image after these changes&lt;/p&gt;

&lt;p&gt;Bottom left: Focused image before these changes&lt;/p&gt;

&lt;p&gt;Bottom right: Focused image after these changes&lt;/p&gt;

&lt;p&gt;As one can see the agreement in focus is much better, but this has come at somewhat worse fit in the defocused images. After all of these efforts, in that part of the detector I am not able to achieve a fit which is able to explain all the images, for all choices of defocus. I suspect that some of my assumptions might not be valid in this range. Unfortunately, this seems to be needing further work.&lt;/p&gt;

&lt;p&gt;My plan is to run this version of the algorithm on all the images available and note the improvements/discrepancies. I might try some minor improvements in the fitting algorithm but I doubt they will change the main findings.&#160; I will also try to summarize my findings and intermediate results, so I could, together with Jim, Robert and other interested parties, deduce what might be a correct way forward. I recommend closing this ticket and revisiting the issues in future, more focused tickets.&lt;/p&gt;</comment>
                            <comment id="21068" author="ncaplar" created="Tue, 1 Jun 2021 13:19:31 +0000"  >&lt;p&gt;After taking into account wavelength into my algorithm, the results have moderately improved. I have placed those figures as ``defocu_after_vw_accounted&apos;&apos; and ``focus_after_vw_accounted&apos;&apos;. As discussed in the meeting last week I am closing this ticket.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13597" name="Comparison_old_new_PIPE_757.png" size="472399" author="ncaplar" created="Mon, 24 May 2021 17:59:49 +0000"/>
                            <attachment id="13806" name="defocus_after_vw_accounted.png" size="126636" author="ncaplar" created="Tue, 1 Jun 2021 13:16:39 +0000"/>
                            <attachment id="13406" name="example_poor_fit.png" size="73104" author="ncaplar" created="Fri, 5 Mar 2021 19:41:19 +0000"/>
                            <attachment id="13407" name="fit_April_2020.png" size="191715" author="ncaplar" created="Wed, 10 Mar 2021 19:25:20 +0000"/>
                            <attachment id="13805" name="focus_after_vw_accounted.png" size="86508" author="ncaplar" created="Tue, 1 Jun 2021 13:16:39 +0000"/>
                            <attachment id="13405" name="poor_fit_detector.png" size="106588" author="ncaplar" created="Fri, 5 Mar 2021 19:41:19 +0000"/>
                            <attachment id="13409" name="where_the_fit_is_problematic.png" size="99717" author="ncaplar" created="Wed, 10 Mar 2021 20:36:14 +0000"/>
                    </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|zzs4oq:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10005" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="105">2DDRP-2021 A 4</customfieldvalue>
    <customfieldvalue id="109">2DDRP-2021 A5</customfieldvalue>

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