<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:55:46 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-643] Precise alignment of PSFs to input science image</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-643</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;Alignment of PSFs to sub pixel accuracy is necessary to extract FRD to the milliradian level. While the current version of LN_PFS_single is able to find centers of PSFs accurately, there are certain cases where alignment is not accurate enough to extract out FRD.&lt;/p&gt;

&lt;p&gt;On one hand, inputting a PSF as a science image into LN_PFS_single as an input and comparing the output results in a small change in centering. In some implementations, such as inputting a uniform initial science image to generate a mock PSF, the 2D-DRP recovers centroid to ~0.001 pixels (UniformInitial_PSFshift.png). However, for some science images such as with random initial science image input, the code&apos;s fit can be a factor of a few higher (in RandomInitial_PSFshift.png, by a factor of 10, though this is on the extreme side). Even shifts of this size can complicate extraction of FRD residuals.&lt;/p&gt;</description>
                <environment></environment>
        <key id="14924">PIPE2D-643</key>
            <summary>Precise alignment of PSFs to input science image</summary>
                <type id="10001" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10515&amp;avatarType=issuetype">Story</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="bbelland">Brent Belland</reporter>
                        <labels>
                    </labels>
                <created>Mon, 12 Oct 2020 23:19:01 +0000</created>
                <updated>Wed, 14 Oct 2020 15:06:37 +0000</updated>
                            <resolved>Wed, 14 Oct 2020 15:05:44 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                <comments>
                            <comment id="17870" author="price" created="Tue, 13 Oct 2020 01:18:08 +0000"  >&lt;p&gt;Are you using the &lt;tt&gt;NevenPsf&lt;/tt&gt;? What method are you using? How do you determine the position at which to realise the PSF?&lt;/p&gt;</comment>
                            <comment id="17872" author="bbelland" created="Tue, 13 Oct 2020 02:21:59 +0000"  >&lt;p&gt;The current code used to generate the uniform illumination example is:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;sci_image_unit=np.ones((20,20))&lt;br/&gt;
var_image_unit=np.ones((20,20))&lt;/p&gt;


&lt;p&gt;allparameters_proposal=np.array([0.1,0.09,0.02,-0.1,0.0,0.1,0.02,0.2,&lt;br/&gt;
 0.7,0.1,0.3,0.0,0.07,0.0,&lt;br/&gt;
 0.17,0.67,1,1,&lt;br/&gt;
 0.0,-0.0,0.80,&lt;br/&gt;
 0.01,0.51,1.06,0.28,&lt;br/&gt;
 50000,2.5,0.027,&lt;br/&gt;
 0.37,1.85,1.0])&lt;/p&gt;

&lt;p&gt;model = LN_PFS_single(sci_image_unit,var_image_unit,dithering=1,save=1,verbosity=1,npix=1536) &lt;br/&gt;
res=model(allparameters_proposal,return_Image=True)&lt;br/&gt;
print(res&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;)&lt;/p&gt;


&lt;p&gt;sci_image_fake=res&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;&lt;br/&gt;
var_image_fake=0.97*res&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;+40&lt;br/&gt;
model_fake = LN_PFS_single(sci_image_fake,var_image_fake,dithering=1,save=1,verbosity=1,npix=1536) &lt;br/&gt;
res_fake=model_fake(allparameters_proposal,return_Image=True)&lt;/p&gt;


&lt;p&gt;print(res_fake&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;)&lt;br/&gt;
plt.imshow(res&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;-res_fake&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;,cmap=&apos;bwr&apos;)&lt;br/&gt;
plt.colorbar()&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;To my knowledge this isn&apos;t associated with&#160;NevenPsf. This is a test to see if LN_PFS_single can reconstruct a PSF that it&apos;s created. The position of the PSF is determined by the code in the&#160;create_complete_realization function and is the issue to be investigated.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="17873" author="price" created="Tue, 13 Oct 2020 02:27:23 +0000"  >&lt;p&gt;I was worried that an important part of the 2D pipeline wasn&apos;t working for you, but apparently not. Sorry to have bothered you!&lt;/p&gt;</comment>
                            <comment id="17874" author="bbelland" created="Tue, 13 Oct 2020 02:35:08 +0000"  >&lt;p&gt;My apologies, that&apos;s my fault for not specifying the issue precisely. Thank you very much for checking.&lt;/p&gt;</comment>
                            <comment id="17876" author="ncaplar" created="Tue, 13 Oct 2020 13:21:03 +0000"  >&lt;p&gt;I have uploaded the new version of the code (internal version 0.34b). I have added a small finishing step that optimizes with Nelder-Mead method (as discussed on technical DRP 2D telecon on October 12). The reason why I did not use it at the start is that one can not put bounds on that method, and sometimes the solution would escape and crash the code. I found it easier to use scipy.shgo that uses bounds. Once when we are very close to the actual solution we can use&#160;Nelder-Mead&#160; to finish up.&lt;/p&gt;</comment>
                            <comment id="17877" author="bbelland" created="Wed, 14 Oct 2020 06:39:46 +0000"  >&lt;p&gt;Your fix gets the center to a very high degree of precision, orders of magnitude better than before! I&apos;ve uploaded v034b_UniformInitial_PSFshift.png and v034b_RandomInitial_PSFshift.png that both show residuals on the order of 1e-6, which is consistent. This works perfectly for my case, and I believe you&apos;ve completed this ticket.&lt;/p&gt;

&lt;p&gt;Is this code you see being used for the 2D_DRP or does the Nelder-Mead add too much runtime?&lt;/p&gt;</comment>
                            <comment id="17879" author="rhl" created="Wed, 14 Oct 2020 07:56:55 +0000"  >&lt;p&gt;No, we probably won&apos;t be using this code. &#160;Regular, and fast, centroiding is good enough but we&apos;ll have to make sure that it&apos;s consistent with the definition of the centroid for Neven&apos;s models. &#160; For now, let&apos;s use this.&lt;/p&gt;</comment>
                            <comment id="17881" author="ncaplar" created="Wed, 14 Oct 2020 15:06:37 +0000"  >&lt;p&gt;I have closed this ticket. &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=bbelland&quot; class=&quot;user-hover&quot; rel=&quot;bbelland&quot;&gt;Brent Belland&lt;/a&gt;&#160;continue with &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-636&quot; title=&quot;FRD extraction function for noiseless in-focus PSFs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-636&quot;&gt;&lt;del&gt;PIPE2D-636&lt;/del&gt;&lt;/a&gt; and inform me if there are fresh problems.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="14906">PIPE2D-636</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="13133" name="centering_improvment.png" size="40678" author="ncaplar" created="Tue, 13 Oct 2020 13:17:33 +0000"/>
                            <attachment id="13131" name="RandomInitial_PSFshift.png" size="18633" author="bbelland" created="Mon, 12 Oct 2020 23:16:48 +0000"/>
                            <attachment id="13132" name="UniformInitial_PSFshift.png" size="19760" author="bbelland" created="Mon, 12 Oct 2020 23:12:12 +0000"/>
                            <attachment id="13134" name="v034b_RandomInitial_PSFshift.png" size="17067" author="bbelland" created="Wed, 14 Oct 2020 06:36:12 +0000"/>
                            <attachment id="13135" name="v034b_UniformInitial_PSFshift.png" size="17357" author="bbelland" created="Wed, 14 Oct 2020 06:36:13 +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|zzs2wo:</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>