<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:58:18 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-807] pfsObject variance is much too large</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-807</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=murata&quot; class=&quot;user-hover&quot; rel=&quot;murata&quot;&gt;Kazumi Murata&lt;/a&gt; reports that the variance for a &lt;tt&gt;pfsObject&lt;/tt&gt; from the integration test is much too large compared to the flux.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&amp;gt;&amp;gt;&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; numpy as np
&amp;gt;&amp;gt;&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; matplotlib.pyplot as plt
&amp;gt;&amp;gt;&amp;gt; from lsst.daf.persistence &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Butler
&amp;gt;&amp;gt;&amp;gt; from pfs.datamodel.utils &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; calculatePfsVisitHash
&amp;gt;&amp;gt;&amp;gt; butler = Butler(&lt;span class=&quot;code-quote&quot;&gt;&quot;INTEGRATION/rerun/integration/pipeline&quot;&lt;/span&gt;)
&amp;gt;&amp;gt;&amp;gt; visits = [24, 25]
&amp;gt;&amp;gt;&amp;gt; spectrum = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsObject&quot;&lt;/span&gt;, catId=1, tract=0, patch=&lt;span class=&quot;code-quote&quot;&gt;&quot;0,0&quot;&lt;/span&gt;, objId=55, nVisit=len(visits), pfsVisitHash=calculatePfsVisitHash(visits))
&amp;gt;&amp;gt;&amp;gt; np.median(spectrum.flux/np.sqrt(spectrum.variance))
1.2713986241730218e-07
&amp;gt;&amp;gt;&amp;gt; plt.plot(spectrum.wavelength, spectrum.flux, &lt;span class=&quot;code-quote&quot;&gt;&quot;k-&quot;&lt;/span&gt;)
&amp;gt;&amp;gt;&amp;gt; plt.plot(spectrum.wavelength, np.sqrt(spectrum.variance), &lt;span class=&quot;code-quote&quot;&gt;&quot;r-&quot;&lt;/span&gt;)
&amp;gt;&amp;gt;&amp;gt; plt.plot(spectrum.wavelength, spectrum.sky, &lt;span class=&quot;code-quote&quot;&gt;&quot;b-&quot;&lt;/span&gt;)
&amp;gt;&amp;gt;&amp;gt; plt.show()
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="15525">PIPE2D-807</key>
            <summary>pfsObject variance is much too large</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="price">price</assignee>
                                    <reporter username="price">price</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Apr 2021 16:24:12 +0000</created>
                <updated>Mon, 19 Apr 2021 18:45:16 +0000</updated>
                            <resolved>Mon, 19 Apr 2021 18:45:16 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                <comments>
                            <comment id="19116" author="rhl" created="Thu, 8 Apr 2021 17:58:34 +0000"  >&lt;p&gt;I&apos;ve just taken a look at the noise in the pfsArm files from SuNSS, and it looks pretty good, maybe 10% low. &#160;So is this coming from the combination? &#160;Can Murata-san check if he&apos;s happy with the noise in the single-arm extractions for the data going into the pfsObject file?&lt;/p&gt;</comment>
                            <comment id="19173" author="murata" created="Mon, 19 Apr 2021 04:16:09 +0000"  >&lt;p&gt;Sorry for the late response. Yes, this comes from the combination process. Single spectra have much lower variances thouth not high (order of 1).&lt;/p&gt;

&lt;p&gt;I found the main cause is dupulication of &lt;tt&gt;_&lt;em&gt;itruediv&lt;/em&gt;_ }}in {{pfs.datamodel.PfsFiberArray&lt;/tt&gt; and &lt;tt&gt;pfs.drp.stella.datamodel.PfsFiberArray&lt;/tt&gt;. This leads to an extra multiplication of &lt;tt&gt;CALIB&lt;/tt&gt; factor in the covariance. This is why the resultant spectra have an extremely low S/N. Avoiding the dupulication, the S/N became ~0.35, similar to the pfsSingle spectra.&lt;/p&gt;</comment>
                            <comment id="19179" author="price" created="Mon, 19 Apr 2021 18:23:23 +0000"  >&lt;p&gt;Excellent detective work, &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=murata&quot; class=&quot;user-hover&quot; rel=&quot;murata&quot;&gt;Kazumi Murata&lt;/a&gt;, thanks! It seems I&apos;ve been bitten by python&apos;s multiple inheritance (again). I&apos;m working on a fix.&lt;/p&gt;</comment>
                            <comment id="19180" author="price" created="Mon, 19 Apr 2021 18:38:31 +0000"  >&lt;p&gt;After the fix:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&amp;gt;&amp;gt;&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; numpy as np
&amp;gt;&amp;gt;&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; matplotlib.pyplot as plt
&amp;gt;&amp;gt;&amp;gt; from lsst.daf.persistence &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Butler
&amp;gt;&amp;gt;&amp;gt; from pfs.datamodel.utils &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; calculatePfsVisitHash
&amp;gt;&amp;gt;&amp;gt; butler = Butler(&lt;span class=&quot;code-quote&quot;&gt;&quot;INTEGRATION/rerun/integration/pipeline&quot;&lt;/span&gt;)
CameraMapper INFO: Loading exposure registry from /scratch/pprice/jenkins/integrationTest/138/INTEGRATION/registry.sqlite3
CameraMapper INFO: Loading calib registry from /scratch/pprice/jenkins/integrationTest/138/INTEGRATION/CALIB/calibRegistry.sqlite3
CameraMapper INFO: Loading calib registry from /scratch/pprice/jenkins/integrationTest/138/INTEGRATION/CALIB/calibRegistry.sqlite3
&amp;gt;&amp;gt;&amp;gt; visits = [24, 25]
&amp;gt;&amp;gt;&amp;gt; spectrum = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsObject&quot;&lt;/span&gt;, catId=1, tract=0, patch=&lt;span class=&quot;code-quote&quot;&gt;&quot;0,0&quot;&lt;/span&gt;, objId=55, nVisit=len(visits), pfsVisitHash=calculatePfsVisitHash(visits))
&amp;gt;&amp;gt;&amp;gt; np.median(spectrum.flux/np.sqrt(spectrum.variance))
0.37628223117773874
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="19181" author="hassan" created="Mon, 19 Apr 2021 18:43:04 +0000"  >&lt;p&gt;Changes look good, thanks.&lt;/p&gt;</comment>
                            <comment id="19182" author="price" created="Mon, 19 Apr 2021 18:45:16 +0000"  >&lt;p&gt;Merged.&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|02qpt6:508yl0chzzy0000026</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10100" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Reviewers</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>hassan</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>

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