<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:08:50 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>[SIM2D-126] Work around unphysical detectorMap features</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/SIM2D-126</link>
                <project id="10000" key="SIM2D">DRP 2-D Simulator</project>
                    <description>&lt;p&gt;The detectorMaps coming from the simulator have non-physical features at either end, possibly due to spline artifacts. Here is a plot of the residual after removing a constant dispersion (wavelength change per pixel) as a function of detector row for one of the central fibers of the &lt;tt&gt;m&lt;/tt&gt; arm, showing the problem:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/12905/12905_wavelength_m_339.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Jim Gunn says, &quot;There is nothing physical which could cause this.&quot; We suspect the problem is in the splining of the optical model in the simulator. A workaround is to drop the second, third, third-to-last and second-to-last knots for the wavelength solution from the detectorMap, e.g.:&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; numpy as np
from pfs.drp.stella &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; SplinedDetectorMap
detMap = SplinedDetectorMap.readFits(&lt;span class=&quot;code-quote&quot;&gt;&quot;/home/pfs/pfs/drp_pfs_data/detectorMap/detectorMap-sim-m1.fits&quot;&lt;/span&gt;)
def selectArray(array):
    result = np.empty(len(array) - 4, dtype=np.float32)
    result[0] = array[0]
    result[-1] = array[-1]
    result[1:-1] = array[3:-3]
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; result

SplinedDetectorMap(detMap.bbox, detMap.fiberId, [detMap.getXCenterSpline(ff).getX() &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ff in detMap.fiberId], [detMap.getXCenterSpline(ff).getY() &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ff in detMap.fiberId], [selectArray(detMap.getWavelengthSpline(ff).getX()) &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ff in detMap.fiberId], [selectArray(detMap.getWavelengthSpline(ff).getY()) &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ff in detMap.fiberId], detMap.getSpatialOffsets(), detMap.getSpectralOffsets(), detMap.visitInfo, detMap.getMetadata()).writeFits(&lt;span class=&quot;code-quote&quot;&gt;&quot;detectorMap-simhack-m1.fits&quot;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This ticket will implement this workaround in the simulator.&lt;/p&gt;</description>
                <environment></environment>
        <key id="14707">SIM2D-126</key>
            <summary>Work around unphysical detectorMap features</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>Tue, 1 Sep 2020 17:23:46 +0000</created>
                <updated>Mon, 4 Jan 2021 20:23:23 +0000</updated>
                            <resolved>Thu, 24 Sep 2020 21:37:54 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                <comments>
                            <comment id="17609" author="price" created="Tue, 1 Sep 2020 17:27:24 +0000"  >&lt;p&gt;I suspect we never noticed for the &lt;tt&gt;b&lt;/tt&gt; and &lt;tt&gt;r&lt;/tt&gt; arms because the ends are highly attenuated (dichroic and detector responses), while for the &lt;tt&gt;m&lt;/tt&gt; arm they are not.&lt;/p&gt;</comment>
                            <comment id="17610" author="price" created="Tue, 1 Sep 2020 19:08:28 +0000"  >&lt;p&gt;I fixed the simulator, and generated some new detectorMaps that we can use for bootstrapping.&lt;/p&gt;</comment>
                            <comment id="17629" author="price" created="Tue, 8 Sep 2020 14:05:28 +0000"  >&lt;p&gt;Here&apos;s a plot of the wavelength residual (from a basic linear wavelength solution) after the fix:&lt;br/&gt;
&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/12907/12907_wavelength_m_339_fixed.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&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; from pfs.drp.stella &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; SplinedDetectorMap
&amp;gt;&amp;gt;&amp;gt; detMap = SplinedDetectorMap.readFits(&lt;span class=&quot;code-quote&quot;&gt;&quot;detectorMap-sim-m1.fits&quot;&lt;/span&gt;)
&amp;gt;&amp;gt;&amp;gt; wl = detMap.getWavelength(339)
&amp;gt;&amp;gt;&amp;gt; disp = (wl.max() - wl.min())/len(wl)
&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; row = np.arange(len(wl))
&amp;gt;&amp;gt;&amp;gt; linear = wl.min() + disp*row
&amp;gt;&amp;gt;&amp;gt; residual = wl - linear
&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; plt.plot(row, residual, &lt;span class=&quot;code-quote&quot;&gt;&quot;k-&quot;&lt;/span&gt;)
&amp;gt;&amp;gt;&amp;gt; plt.xlabel(&lt;span class=&quot;code-quote&quot;&gt;&quot;Row&quot;&lt;/span&gt;)
&amp;gt;&amp;gt;&amp;gt; plt.ylabel(&lt;span class=&quot;code-quote&quot;&gt;&quot;Wavelength residual (nm)&quot;&lt;/span&gt;)
&amp;gt;&amp;gt;&amp;gt; plt.show()
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="17723" author="price" created="Thu, 24 Sep 2020 21:37:54 +0000"  >&lt;p&gt;Merged to master.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="12907" name="wavelength_m_339_fixed.png" size="25365" author="price" created="Tue, 8 Sep 2020 14:03:43 +0000"/>
                            <attachment id="12905" name="wavelength_m_339.png" size="24761" author="price" created="Tue, 1 Sep 2020 17:16:19 +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|02qps3:</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="93">2DDRP-2021 A</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>