<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:03:01 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-1119] No good points in aperture correction</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1119</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 an error when running the pipeline on data from the recent engineering run:&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;
$ reduceExposure.py /work/drp --calib /work/drp/CALIB --output /work/rhl/rerun/rhl/2022-11 -c doAdjustDetectorMap=True doMeasureLines=True extractSpectra.doCrosstalk=False isr.doFlat=False --id visit=83123 arm=b spectrograph=1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;fails with:&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;
reduceExposure FATAL: Failed on dataIds=[{&lt;span class=&quot;code-quote&quot;&gt;&apos;visit&apos;&lt;/span&gt;: 83123, &lt;span class=&quot;code-quote&quot;&gt;&apos;arm&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;b&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;spectrograph&apos;&lt;/span&gt;: 1, &lt;span class=&quot;code-quote&quot;&gt;&apos;dateObs&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;2022-11-21&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;site&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;S&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;category&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;A&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;field&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;M39&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;ccd&apos;&lt;/span&gt;: 0, &lt;span class=&quot;code-quote&quot;&gt;&apos;filter&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;b&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;expTime&apos;&lt;/span&gt;: 180.005, &lt;span class=&quot;code-quote&quot;&gt;&apos;dataType&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;OBJECT&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;taiObs&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;2022-11-21T04:29:34.961&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;pfsDesignId&apos;&lt;/span&gt;: 7362534226687433961, &lt;span class=&quot;code-quote&quot;&gt;&apos;slitOffset&apos;&lt;/span&gt;: 0.0}]: RuntimeError: No good points
Traceback (most recent call last):
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/pipe_base/g590c34a36e+5da9528084/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 436, in __call__
    result = self.runTask(task, dataRef, kwargs)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/work/stack_INFRA-312/stack/miniconda3-py38_4.9.2-3.0.0/Linux64/pipe_base/g590c34a36e+5da9528084/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 504, in runTask
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; task.runDataRef(dataRef, **kwargs)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/home/rhl/PFS/drp/stella/python/pfs/drp/stella/reduceExposure.py&quot;&lt;/span&gt;, line 268, in runDataRef
    calibs = self.getSpectralCalibs(sensorRef, exposure, pfsConfig)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/home/rhl/PFS/drp/stella/python/pfs/drp/stella/reduceExposure.py&quot;&lt;/span&gt;, line 543, in getSpectralCalibs
    phot = self.photometerLines.run(exposure, lines[lines.description != &lt;span class=&quot;code-quote&quot;&gt;&quot;Trace&quot;&lt;/span&gt;], detectorMap,
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/home/rhl/PFS/drp/stella/python/pfs/drp/stella/photometerLines.py&quot;&lt;/span&gt;, line 99, in run
    phot = self.photometerLines(exposure, referenceLines, detectorMap, pfsConfig, fiberTraces)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/home/rhl/PFS/drp/stella/python/pfs/drp/stella/photometerLines.py&quot;&lt;/span&gt;, line 176, in photometerLines
    apCorr = self.apertureCorrection.run(exposure, pfsConfig, detectorMap, lines)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/home/rhl/PFS/drp/stella/python/pfs/drp/stella/apertureCorrections.py&quot;&lt;/span&gt;, line 125, in run
    apCorr = self.fit.run(corrections, pfsConfig, minWavelength=minWavelength,
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/home/rhl/PFS/drp/stella/python/pfs/drp/stella/fitFocalPlane.py&quot;&lt;/span&gt;, line 109, in run
    raise RuntimeError(&lt;span class=&quot;code-quote&quot;&gt;&quot;No good points&quot;&lt;/span&gt;)
RuntimeError: No good points
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="23134">PIPE2D-1119</key>
            <summary>No good points in aperture correction</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="1" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="price">price</assignee>
                                    <reporter username="price">price</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Nov 2022 01:56:06 +0000</created>
                <updated>Thu, 26 Oct 2023 21:11:02 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="31830" author="price" created="Wed, 23 Nov 2022 20:36:54 +0000"  >&lt;p&gt;This is failing in the aperture corrections. There are few lines available to start with in the blue (3 OI and 2 NaI), and for this image most of these are being discarded due to low signal-to-noise (minimum is 10). I see two possible options for dealing with this:&lt;br/&gt;
1. Attempt to apply an aperture correction by backing off the polynomial order and/or the signal-to-noise limit.&lt;br/&gt;
2. Give up on measuring line photometry in this case.&lt;/p&gt;

&lt;p&gt;I&apos;m leaning towards option #2. While option #1 would allow us to get some sort of measurements, the quality would be questionable. Bad data is worse than no data. The reason we&apos;re measuring photometry and aperture corrections is to do 2D sky subtraction, but we don&apos;t need to do that here, because there are not a lot of lines, and the signal-to-noise is so poor that 2D sky subtraction is not necessary.&lt;/p&gt;</comment>
                            <comment id="31840" author="rhl" created="Mon, 28 Nov 2022 14:49:23 +0000"  >&lt;p&gt;I think I&apos;d prefer #1.5. &#160; Measure the aperture correction (and its errors, correctly!) and then refuse to apply it to the raw photometry while setting an exit code/quality status. &#160;I assume that the aperture corrections are persisted; if not they should be.&lt;/p&gt;

&lt;p&gt;One of the things that Rubin/PFS pipelines lost from SDSS was the ability to record the quality of a reduction, including flags saying what went wrong. &#160;We need this back!&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="31848" author="price" created="Mon, 28 Nov 2022 22:12:00 +0000"  >&lt;p&gt;That sounds ideal, but quality status flags are not something we&apos;re in a position to implement for PFS right now. Besides there being no clear solution for this from Rubin (yet), we are still in the in-between Gen2/Gen3 world so we&apos;d have to extend the Rubin solution once it&apos;s invented. I&apos;m going with option 2 (which is very close to what you want), and we can modify that once we get a quality status flags implementation from Rubin.&lt;/p&gt;

&lt;p&gt;Aperture corrections are persisted (butler dataset &lt;tt&gt;apCorr&lt;/tt&gt;).&lt;/p&gt;</comment>
                            <comment id="31851" author="rhl" created="Tue, 29 Nov 2022 13:39:36 +0000"  >&lt;p&gt;Will you still measure and persist the aperture corrections, but not apply them?&lt;/p&gt;</comment>
                            <comment id="31852" author="price" created="Tue, 29 Nov 2022 14:23:55 +0000"  >&lt;p&gt;Yes. Although the aperture corrections are &lt;tt&gt;NaN&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="31853" author="rhl" created="Tue, 29 Nov 2022 15:02:55 +0000"  >&lt;p&gt;I thought that the idea was to back off the order etc. to do a best-effort; and then not apply them. &#160;&lt;/p&gt;</comment>
                            <comment id="31854" author="price" created="Tue, 29 Nov 2022 15:05:09 +0000"  >&lt;p&gt;If we back off the order, then do we have something that we trust? If we trust it, then we should apply it unreservedly. If we don&apos;t, then what was the point of backing off the order?&lt;/p&gt;</comment>
                            <comment id="31863" author="rhl" created="Tue, 29 Nov 2022 21:06:33 +0000"  >&lt;p&gt;You seemed to not believe the aperture correction, and didn&apos;t want to apply it. &#160; I&apos;ll defer to your judgement here, but there&apos;s no downside to calculating it so that we can test its quality.&lt;/p&gt;

&lt;p&gt;One downside of including a noisy aperture correction is that it&apos;ll add noise to every measurement &#8211; we need to be propagating the errors in the aperture correction. &#160;If it&apos;s calculated but not applied it&apos;s up to the user to decide what to do.&lt;/p&gt;</comment>
                            <comment id="35644" author="rhl" created="Thu, 26 Oct 2023 21:11:02 +0000"  >&lt;p&gt;The main problem is fixed on &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1322&quot; title=&quot;Inability to fit aperture corrections can lead to reduceExposure.py failing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1322&quot;&gt;&lt;del&gt;PIPE2D-1322&lt;/del&gt;&lt;/a&gt;, setting the fluxes and flux errors to &lt;tt&gt;NaN&lt;/tt&gt;.  I&apos;m leaving this ticket open as a reminder that this is not really the best solution (as discussed here), but it is no longer urgent.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="24094">PIPE2D-1322</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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|02qpjd:00r20060i22</customfieldvalue>

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