<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:04:07 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-1197] subtractSky1d applied to spectrograph=3 produces excessive noise</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1197</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=rhl&quot; class=&quot;user-hover&quot; rel=&quot;rhl&quot;&gt;rhl&lt;/a&gt; reports:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;With this how-to-repeat, these plots are pretty-much a smoking gun for a problem with &lt;tt&gt;spectrograph != 1&lt;/tt&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;
dataId.update(spectrograph=1)
spec = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&apos;pfsArm&apos;&lt;/span&gt;, dataId)
pfsConfig = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsConfig&quot;&lt;/span&gt;, dataId)
&#8203;
from pfs.drp.stella.subtractSky1d &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; subtractSky1d
sky1d = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;sky1d&quot;&lt;/span&gt;, dataId)
subtractSky1d(spec, pfsConfig, sky1d)
&#8203;
spec.flux[(spec.mask &amp;amp; ~spec.flags[&lt;span class=&quot;code-quote&quot;&gt;&quot;REFLINE&quot;&lt;/span&gt;]) != 0x0] = np.NaN
&#8203;
fig = 1; plt.close(fig); fig = plt.figure(fig)
spec.plot(spec.fiberId[100:101], figure=fig, show=False)
plt.ylim(-1000, 1000)
&#8203;
plt.title(dataId);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
        <key id="23335">PIPE2D-1197</key>
            <summary>subtractSky1d applied to spectrograph=3 produces excessive noise</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>Thu, 30 Mar 2023 23:17:38 +0000</created>
                <updated>Thu, 27 Apr 2023 18:32:45 +0000</updated>
                            <resolved>Thu, 27 Apr 2023 18:32:45 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="32492" author="price" created="Fri, 31 Mar 2023 00:54:04 +0000"  >&lt;p&gt;I have a fix that I&apos;m going to put on &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-907&quot; title=&quot;Solve profiles for multiple fibers simultaneously&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-907&quot;&gt;&lt;del&gt;PIPE2D-907&lt;/del&gt;&lt;/a&gt; with the other changes for the engineering data release.&lt;/p&gt;

&lt;p&gt;(It&apos;s a completely boring, accounting bug.)&lt;/p&gt;

&lt;p&gt;This fix will invalidate existing &lt;tt&gt;sky1d&lt;/tt&gt; products (they cannot be accessed from the butler any more).&lt;/p&gt;</comment>
                            <comment id="32517" author="rhl" created="Sun, 2 Apr 2023 01:40:40 +0000"  >&lt;p&gt;The normalisation is still wrong, I think. Here are the calexp, the spectra-subtracted, and the sky-subtracted images for 83149. &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15602_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15602/15602_Figure+1+%2861%29.png&quot; title=&quot;Figure 1 (61).png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15602&quot; file-preview-title=&quot;Figure 1 (61).png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15603/_thumb_15603.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15601_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15601/15601_Figure+1+%2862%29.png&quot; title=&quot;Figure 1 (62).png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15601&quot; file-preview-title=&quot;Figure 1 (62).png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15602/_thumb_15602.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15601_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15601/15601_Figure+1+%2862%29.png&quot; title=&quot;Figure 1 (62).png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15601&quot; file-preview-title=&quot;Figure 1 (62).png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15601/_thumb_15601.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;You can also see artefacts from the background subtraction model, but that&apos;s a different issue. &#160;The code for the last two plots only differs in doing the sky subtraction:&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;
pfsArm = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsArm&quot;&lt;/span&gt;, dataId)
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; subtractSky:
    from pfs.drp.stella.subtractSky1d &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; subtractSky1d 
    sky1d = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;sky1d&quot;&lt;/span&gt;, dataId)
    subtractSky1d(pfsArm, pfsConfig, sky1d) &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="32520" author="price" created="Mon, 3 Apr 2023 20:02:38 +0000"  >&lt;p&gt;Your code doesn&apos;t match the figures, so it&apos;s not clear to me what you&apos;re doing.&lt;/p&gt;

&lt;p&gt;One thing that I noticed is that when we make an image from spectra, the image includes the values in the &lt;tt&gt;sky&lt;/tt&gt; arrays. That&apos;s probably not what we want (we only want the &lt;tt&gt;flux&lt;/tt&gt;), so I&apos;ve changed that (on &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-907&quot; title=&quot;Solve profiles for multiple fibers simultaneously&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-907&quot;&gt;&lt;del&gt;PIPE2D-907&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Perhaps that, combined with using the old branch might explain the figures you posted. If not, please provide me detailed instructions on how to reproduce the problem. I&apos;ve attached my notebook in case it&apos;s helpful.&lt;/p&gt;</comment>
                            <comment id="32524" author="rhl" created="Wed, 5 Apr 2023 02:09:53 +0000"  >&lt;p&gt;The &quot;image includes the values in the &lt;tt&gt;sky&lt;/tt&gt; arrays&quot; comment was the clue. &#160;Yes, the code works with the tip of &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-907&quot; title=&quot;Solve profiles for multiple fibers simultaneously&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-907&quot;&gt;&lt;del&gt;PIPE2D-907&lt;/del&gt;&lt;/a&gt;; thanks.&lt;/p&gt;

&lt;p&gt;One thing that would be helpful would be an option to &lt;tt&gt;spectra.makeImage(exp.getDimensions(), traces)&lt;/tt&gt; that subtracted the &lt;tt&gt;.sky&lt;/tt&gt; array rather than the &lt;tt&gt;.flux&lt;/tt&gt;. &#160;Yes; &#160;I can stuff &lt;tt&gt;sky&lt;/tt&gt; into &lt;tt&gt;flux&lt;/tt&gt;, but it&apos;s ugly.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="32631" author="price" created="Thu, 27 Apr 2023 18:32:45 +0000"  >&lt;p&gt;This merged as part of &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-907&quot; title=&quot;Solve profiles for multiple fibers simultaneously&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-907&quot;&gt;&lt;del&gt;PIPE2D-907&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I added a toggle to &lt;tt&gt;SpectrumSet.makeImage&lt;/tt&gt; to have it construct an image from the &lt;tt&gt;sky&lt;/tt&gt; instead of from the &lt;tt&gt;flux&lt;/tt&gt;.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="15597" name="Figure 1-5.png" size="95620" author="price" created="Thu, 30 Mar 2023 23:17:32 +0000"/>
                            <attachment id="15603" name="Figure 1 (60).png" size="1815321" author="rhl" created="Sun, 2 Apr 2023 01:39:22 +0000"/>
                            <attachment id="15602" name="Figure 1 (61).png" size="1737634" author="rhl" created="Sun, 2 Apr 2023 01:39:15 +0000"/>
                            <attachment id="15601" name="Figure 1 (62).png" size="854448" author="rhl" created="Sun, 2 Apr 2023 01:39:14 +0000"/>
                            <attachment id="15598" name="Figure 1-6.png" size="116743" author="price" created="Thu, 30 Mar 2023 23:17:31 +0000"/>
                            <attachment id="15605" name="pipe2d-1197.ipynb" size="1313786" author="price" created="Mon, 3 Apr 2023 20:02:15 +0000"/>
                            <attachment id="15599" name="pipe2d-1197.jpg" size="167572" author="price" created="Fri, 31 Mar 2023 00:53:33 +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|zzswnz:</customfieldvalue>

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