<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:57:09 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-736] Normalization in 2d subtraction</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-736</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;Normalization in the 2d subtraction seems to off. For instance, for the example in &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-735&quot; title=&quot;Offset in x direction with 2d subtraction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-735&quot;&gt;&lt;del&gt;PIPE2D-735&lt;/del&gt;&lt;/a&gt;, the flux in the whole image is 65K, while in the subtracted image the whole flux is still 14K, i.e., it is very far from 0. The figure is showing what fraction of flux is still in the residual image, after subtraction. As we can see, for some fibers more than 30% of flux is still present after subtraction. Possibly this is due to poor centering, but I believe I saw this issue also before.&lt;/p&gt;

&lt;p&gt;Robert also mentioned that we saw some weird stuff with normalization, but I am not sure if this is connected.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="15314">PIPE2D-736</key>
            <summary>Normalization in 2d subtraction</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="-1">Unassigned</assignee>
                                    <reporter username="ncaplar">ncaplar</reporter>
                        <labels>
                    </labels>
                <created>Mon, 22 Feb 2021 21:28:42 +0000</created>
                <updated>Fri, 12 Mar 2021 13:28:33 +0000</updated>
                            <resolved>Fri, 12 Mar 2021 13:28:33 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="18586" author="ncaplar" created="Wed, 24 Feb 2021 13:45:48 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=hassan&quot; class=&quot;user-hover&quot; rel=&quot;hassan&quot;&gt;hassan&lt;/a&gt;&#160;Let me just verify quickly if that is still a problem, it does seems to be that it changes quite a lot from one run to another (which had different qualities of the centroid)&lt;/p&gt;</comment>
                            <comment id="18587" author="ncaplar" created="Wed, 24 Feb 2021 14:54:36 +0000"  >&lt;p&gt;Updated after fix introduced in &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-726&quot; title=&quot;Regenerate detectorMap shifted in spatial direction for SuNSS&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-726&quot;&gt;&lt;del&gt;PIPE2D-726&lt;/del&gt;&lt;/a&gt;. Residuals are now on the order of 3% which I presume is on the order of what I would expect. I will investigate if that is true.&lt;/p&gt;</comment>
                            <comment id="18590" author="rhl" created="Wed, 24 Feb 2021 15:36:32 +0000"  >&lt;p&gt;I meant to comment that the centroiding errors would mess up the normalisation; sorry.&lt;/p&gt;

&lt;p&gt;Are the 3% errors coming from the normalisation?  We should be able to get the right at a level that doesn&apos;t affect sky subtraction; or is the 3% coming from the state of your PSF modelling?  Or the photon noise?&lt;/p&gt;</comment>
                            <comment id="18599" author="ncaplar" created="Wed, 24 Feb 2021 23:18:11 +0000"  >&lt;p&gt;Ok, the ``effect&apos;&apos; is due to two factors, first one being dominant.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;1. The dominant effect: The pipeline (here: &lt;a href=&quot;https://github.com/Subaru-PFS/drp_stella/blob/32139567407954633cfc6d0a9bac1a32776640db/python/pfs/drp/stella/subtractSky2d.py#L268)&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://github.com/Subaru-PFS/drp_stella/blob/32139567407954633cfc6d0a9bac1a32776640db/python/pfs/drp/stella/subtractSky2d.py#L268)&lt;/a&gt;&#160;normalizes by:&lt;br/&gt;
a) computing sum(psf_model**2)&lt;br/&gt;
b) computing sum(psf_model*image)&lt;br/&gt;
c) computing renormalizing value as&#160;sum(psf_model**2)/sum(psf_model*image)&lt;br/&gt;
d)&#160;psf_model_renormalized=psf_model * value&#160;&lt;/p&gt;

&lt;p&gt;As we can see, this does not ensure that sum(psf_model_renormalized)==sum(image), as I expected (unless psf_model_renormalized = constant * image).&#160;&lt;/p&gt;

&lt;p&gt;When the difference between pfs_model and image is larger, due to bad centering or bad modeling, the ``effect&apos;&apos; increases.&#160;&lt;/p&gt;

&lt;p&gt;2. Less important: I have been reporting values from 14x14 array around the psf cut, while the pipeline normalizes in square given by size of input psf, i.e., 21x21 pixels. However, that is a subdominant effect to the first one.&lt;/p&gt;




&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="18845" author="ncaplar" created="Fri, 12 Mar 2021 13:28:33 +0000"  >&lt;p&gt;The reason for this normalization is now understood. This is an optimal solution for the images dominated by noise errors (e.g., faint galaxies in HSC). In the future we might investigate if this is an optimal solution for this use case. At the moment closing this with Won&apos;t Fix and possibly reopening this discussion in the future.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13357" name="residual_normalization_after_726.png" size="77811" author="ncaplar" created="Wed, 24 Feb 2021 14:52:31 +0000"/>
                            <attachment id="13355" name="residual normalization.png" size="76728" author="ncaplar" created="Mon, 22 Feb 2021 21:25:54 +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|zzs47y:zzw</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10005" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="102">2DDRP-2021 A3</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>