<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:56:14 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-669] Larger than expected wavelength residuals encountered during weekly test</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-669</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;As part of addressing &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-653&quot; title=&quot;Fix failing weekly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-653&quot;&gt;&lt;del&gt;PIPE2D-653&lt;/del&gt;&lt;/a&gt;, a temporary fix has been made in the &lt;tt&gt;testResiduals()&lt;/tt&gt; function:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/Subaru-PFS/pfs_pipe2d/pull/53/commits/d1348f2d129351c7c11d400fcb7159d17b4aaba7&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://github.com/Subaru-PFS/pfs_pipe2d/pull/53/commits/d1348f2d129351c7c11d400fcb7159d17b4aaba7&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Getting larger wavelength residuals than the test allows. Not&lt;br/&gt;
 clear whether this is due to line mis-identification or&lt;br/&gt;
 genuinely bad fits at the edges of the detector, but not going&lt;br/&gt;
 to put effort into tracking this down right now; so increasing&lt;br/&gt;
 the threshold to allow the test to pass until we can take a&lt;br/&gt;
 good look at this.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This ticket is to track that a future review of the cause of the larger wavelength residuals.&lt;/p&gt;</description>
                <environment></environment>
        <key id="15076">PIPE2D-669</key>
            <summary>Larger than expected wavelength residuals encountered during weekly test</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="price">price</assignee>
                                    <reporter username="hassan">hassan</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Dec 2020 21:27:11 +0000</created>
                <updated>Wed, 10 Feb 2021 16:33:35 +0000</updated>
                            <resolved>Thu, 4 Feb 2021 21:20:10 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="18437" author="price" created="Thu, 4 Feb 2021 19:28:30 +0000"  >&lt;p&gt;In investigating here, discovered that master is broken. Including all the fiberIds in the pfsConfig (&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/DAMD-96&quot; title=&quot;Index fibers from multiple spectrographs in PfsDesign&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DAMD-96&quot;&gt;&lt;del&gt;DAMD-96&lt;/del&gt;&lt;/a&gt;) broke a few things in the science pipeline. The integration test didn&#8217;t catch this because there was a bug in the integration test (&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-708&quot; title=&quot;Jenkins integration test not using drp_stella_data branch&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-708&quot;&gt;&lt;del&gt;PIPE2D-708&lt;/del&gt;&lt;/a&gt;) where it didn&#8217;t use the appropriate branch for the raw data. I fixed that as part of this work.&lt;/p&gt;

&lt;p&gt;Notes on looking at the wavelength residuals:&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;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; os
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; numpy as np
from lsst.daf.persistence &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Butler
from pfs.drp.stella &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; DetectorMap
root = &lt;span class=&quot;code-quote&quot;&gt;&quot;/scratch/pprice/pipe2d-669&quot;&lt;/span&gt;
butler = Butler(os.path.join(root, &lt;span class=&quot;code-quote&quot;&gt;&quot;rerun/pipe2d-660/calib/brn/arc_brn/detectorMap&quot;&lt;/span&gt;))
visit = 39
&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; arm in &lt;span class=&quot;code-quote&quot;&gt;&quot;brn&quot;&lt;/span&gt;:
    detMap = DetectorMap.readFits(os.path.join(root, f&lt;span class=&quot;code-quote&quot;&gt;&quot;rerun/pipe2d-660/calib/brn/arc_brn/detectorMap/DETECTORMAP/pfsDetectorMap-000039-{arm}1.fits&quot;&lt;/span&gt;))
    #detMap = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;detectorMap&quot;&lt;/span&gt;, visit=visit, arm=arm)
    lines = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;arcLines&quot;&lt;/span&gt;, visit=visit, arm=arm)
    &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; fiberId in set(lines.fiberId):
        select = lines.fiberId == fiberId
        num = select.sum()
        fitWavelength = detMap.findWavelength(fiberId, lines.y[select])
        residual = lines.wavelength[select] - fitWavelength
        lq, median, uq = np.percentile(residual, (25.0, 50.0, 75.0))
        rms = 0.741*(uq - lq)
        print(arm, fiberId, num, median, rms)

Even with PIPE2D-660 (DifferentialDetectorMap), still getting median ~ -0.03 and rms ~ 0.01.

The detectorMap here is a SplinedDetectorMap, apparently coming from the calibs.
Using the DifferentialDetectorMap, the median goes to ~1e-3, but still have rms ~ 0.01.
We know the SplinedDetectorMap from the simulator is off by 0.5 pixel. For a dispersion of 0.07 nm/pixel, that corresponds to the observed 0.03 nm median offset.

The RMS of 0.01 nm appears to be constant, and probably not bad: it&lt;span class=&quot;code-quote&quot;&gt;&apos;s 0.14 pixels. For arm=b, that&apos;&lt;/span&gt;s decent; we could probably set the limit at 0.02. For arm=r (0.09 nm/pixel), we&lt;span class=&quot;code-quote&quot;&gt;&apos;re getting rms ~ 0.007 nm ~ 0.08 pixels, and &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; arm=n (0.08 nm/pixel), rms ~ 0.01 nm ~ 0.13 pixels. So the numbers look reasonable. Not sure how we got better than 0.01 nm previously, but that&apos;&lt;/span&gt;s our current state of the art.

But, why are we getting the SplinedDetectorMap, when we want the DifferentialDetectorMap? It&apos;s probably a butler thing, or maybe a simulator thing (unexpected times in the header).

&amp;gt;&amp;gt;&amp;gt; butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;detectorMap_filename&quot;&lt;/span&gt;, visit=57, arm=&lt;span class=&quot;code-quote&quot;&gt;&quot;r&quot;&lt;/span&gt;)
[&lt;span class=&quot;code-quote&quot;&gt;&apos;/scratch/pprice/pipe2d-669/CALIB/DETECTORMAP/pfsDetectorMap-000000-r1.fits&apos;&lt;/span&gt;]

sqlite&amp;gt; select * from detectorMap;
id|arm|ccd|spectrograph|calibDate|calibTime|visit0|validStart|validEnd
1|b|0|1|2020-11-26|2020-11-26T00:10:52|0|2020-11-25T12:05:26.000001|2025-10-31T00:10:52
2|r|1|1|2020-11-26|2020-11-26T00:08:25|0|2020-11-25T12:04:12.500001|2025-10-31T00:08:25
3|n|1|1|2020-11-26|2020-11-26T00:09:41|0|2020-11-25T12:04:50.500001|2025-10-31T00:09:41
4|m|2|1|2020-11-26|2020-11-26T00:12:08|0|2020-11-25T12:06:04.000001|2025-10-31T00:12:08
5|b|0|1|2020-11-25T23:27:34|2020-11-25|39|2015-12-22T00:00:00|2020-11-25T12:05:26
6|n|1|1|2020-11-25T23:26:26|2020-11-25|39|2015-12-22T00:00:00|2020-11-25T12:04:50.500000
7|r|1|1|2020-11-25T23:26:57|2020-11-25|39|2015-12-22T00:00:00|2020-11-25T12:04:12.500000
8|m|2|1|2020-11-25T23:26:38|2020-11-25|40|2015-12-22T00:00:00|2020-11-25T12:06:04

Strange: the SplinedDetectorMap is dated after the DifferentialDetectorMap, and the latter has calibDate and calibTime switched. This is probably because the simulator times can be a bit random (different images done in parallel, so times don&apos;t sort the same as visits).

Fixed the dates on the simulated data (both images and detectorMaps), and am now getting the right detectorMap in the test. Reverted the commit that loosened the precision, and actually tightened it a bit.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="18438" author="price" created="Thu, 4 Feb 2021 19:30:48 +0000"  >&lt;p&gt;The new weekly dataset is available: &lt;a href=&quot;http://tigress-web.princeton.edu/~HSC/pfs-drp-2d/weekly-20200204/&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://tigress-web.princeton.edu/~HSC/pfs-drp-2d/weekly-20200204/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="18439" author="price" created="Thu, 4 Feb 2021 19:37:33 +0000"  >&lt;p&gt;I&apos;ve got a final integration test and weekly running, but I expect them to go through.&lt;/p&gt;</comment>
                            <comment id="18441" author="price" created="Thu, 4 Feb 2021 21:20:10 +0000"  >&lt;p&gt;Merged to master.&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:508yl0chzzy0000p920zv</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="98">2DDRP-2021 A 2</customfieldvalue>

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