<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:00:36 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-968] ReduceExposure 2D sky subtraction fails for SuNSS exposures</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-968</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;&lt;tt&gt;reduceExposure.py&lt;/tt&gt; fails with 2D sky subtraction enabled on a representative sky exposure:&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 /projects/HSC/PFS/Subaru --calib /projects/HSC/PFS/Subaru/CALIB-SuNSS-20211108 --rerun=hassans/sunss/v46472 --doraise --id visit=46472 arm=r -c isr.doFlat=False doSubtractSky2d=True doMeasurePsf=True
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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.photometerLines INFO: Photometered 85817 lines
Traceback (most recent call last):
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2022.04/bin/reduceExposure.py&quot;&lt;/span&gt;, line 25, in &amp;lt;module&amp;gt;
    ReduceExposureTask.parseAndRun()
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 603, in parseAndRun
    resultList = taskRunner.run(parsedCmd)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 221, in run
    resultList = list(mapFunc(self, targetList))
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 385, in __call__
    result = self.runTask(task, dataRef, kwargs)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 447, 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;/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2022.04/python/pfs/drp/stella/reduceExposure.py&quot;&lt;/span&gt;, line 278, in runDataRef
    linesList, apCorrList)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2022.04/python/pfs/drp/stella/subtractSky2d.py&quot;&lt;/span&gt;, line 158, in run
    image = self.subtractSky(exposure, psf, fiberTrace, detectorMap, pfsConfig, sky2d, apCorr)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2022.04/python/pfs/drp/stella/subtractSky2d.py&quot;&lt;/span&gt;, line 288, in subtractSky
    image = self.makeSkyImage(exposure.getBBox(), psf, fiberTraces, pfsConfig, sky2d, apCorr)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/drp_stella/w.2022.04/python/pfs/drp/stella/subtractSky2d.py&quot;&lt;/span&gt;, line 253, in makeSkyImage
    &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; wl, flux in zip(model.wavelength, psfFlux):
TypeError: zip argument #2 must support iteration
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="22599">PIPE2D-968</key>
            <summary>ReduceExposure 2D sky subtraction fails for SuNSS exposures</summary>
                <type id="1" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10503&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/major.svg">Major</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="hassan">hassan</assignee>
                                    <reporter username="hassan">hassan</reporter>
                        <labels>
                            <label>SuNSS</label>
                    </labels>
                <created>Sun, 23 Jan 2022 21:16:28 +0000</created>
                <updated>Thu, 17 Feb 2022 18:27:38 +0000</updated>
                            <resolved>Thu, 17 Feb 2022 18:27:38 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                <comments>
                            <comment id="30365" author="hassan" created="Sun, 23 Jan 2022 21:49:57 +0000"  >&lt;p&gt;I believe the problem is due to how sky fibers are selected in the case of SuNSS exposures.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/Subaru-PFS/drp_stella/blob/32a129274b1f1f20ed86a92cd405bfda66e884fd/python/pfs/drp/stella/subtractSky2d.py#L185&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://github.com/Subaru-PFS/drp_stella/blob/32a129274b1f1f20ed86a92cd405bfda66e884fd/python/pfs/drp/stella/subtractSky2d.py#L185&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code assumes a target type of &lt;tt&gt;SKY&lt;/tt&gt; for sky fibers, whereas for SuNSS exposures (specifically the &lt;tt&gt;0xdeadbeef&lt;/tt&gt; pfsConfig), the target type are either SUNSS_IMAGING or SUNSS_DIFFUSE.&lt;/p&gt;

&lt;p&gt;So no sky fibers are selected in this instance, and the sky model is essentially &lt;tt&gt;None&lt;/tt&gt;.&lt;/p&gt;

</comment>
                            <comment id="30369" author="price" created="Mon, 24 Jan 2022 18:15:15 +0000"  >&lt;p&gt;Works fine after making the simple fix suggested on Slack:&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;
(lsst-scipipe) pprice@tiger2-sumire:~ $ reduceExposure.py /projects/HSC/PFS/Subaru --calib /projects/HSC/PFS/Subaru/CALIB-SuNSS-20211108 --rerun=price/pipe2d-968 --doraise --id visit=46472 arm=r -c isr.doFlat=False doSubtractSky2d=True doMeasurePsf=True
root INFO: Loading config overrride file &lt;span class=&quot;code-quote&quot;&gt;&apos;/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/obs_pfs/w.2022.04/config/reduceExposure.py&apos;&lt;/span&gt;
CameraMapper INFO: Loading exposure registry from /projects/HSC/PFS/Subaru/registry.sqlite3
CameraMapper INFO: Loading calib registry from /projects/HSC/PFS/Subaru/CALIB-SuNSS-20211108/calibRegistry.sqlite3
CameraMapper INFO: Loading calib registry from /projects/HSC/PFS/Subaru/CALIB-SuNSS-20211108/calibRegistry.sqlite3
root INFO: Running: /home/pprice/pfs/drp_stella/bin/reduceExposure.py /projects/HSC/PFS/Subaru --calib /projects/HSC/PFS/Subaru/CALIB-SuNSS-20211108 --rerun=price/pipe2d-968 --doraise --id visit=46472 arm=r -c isr.doFlat=False doSubtractSky2d=True doMeasurePsf=True
reduceExposure INFO: Processing [{&lt;span class=&quot;code-quote&quot;&gt;&apos;visit&apos;&lt;/span&gt;: 46472, &lt;span class=&quot;code-quote&quot;&gt;&apos;arm&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;r&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;dateObs&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;2021-04-04&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;spectrograph&apos;&lt;/span&gt;: 1, &lt;span class=&quot;code-quote&quot;&gt;&apos;field&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;SEEING_TEST&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;ccd&apos;&lt;/span&gt;: 1, &lt;span class=&quot;code-quote&quot;&gt;&apos;filter&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;r&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;expTime&apos;&lt;/span&gt;: 1199.999, &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;2021-04-04T07:36:36.111&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;pfsDesignId&apos;&lt;/span&gt;: 3735928559, &lt;span class=&quot;code-quote&quot;&gt;&apos;slitOffset&apos;&lt;/span&gt;: 0.0}]
reduceExposure.isr INFO: Performing ISR on sensor {&lt;span class=&quot;code-quote&quot;&gt;&apos;visit&apos;&lt;/span&gt;: 46472, &lt;span class=&quot;code-quote&quot;&gt;&apos;arm&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;r&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;dateObs&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;2021-04-04&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;spectrograph&apos;&lt;/span&gt;: 1, &lt;span class=&quot;code-quote&quot;&gt;&apos;field&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;SEEING_TEST&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;ccd&apos;&lt;/span&gt;: 1, &lt;span class=&quot;code-quote&quot;&gt;&apos;filter&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;r&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;expTime&apos;&lt;/span&gt;: 1199.999, &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;2021-04-04T07:36:36.111&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;pfsDesignId&apos;&lt;/span&gt;: 3735928559, &lt;span class=&quot;code-quote&quot;&gt;&apos;slitOffset&apos;&lt;/span&gt;: 0.0}
reduceExposure.isr INFO: Converting exposure to floating point values
reduceExposure.isr INFO: Assembling CCD from amplifiers
reduceExposure.isr INFO: Applying bias correction.
reduceExposure.isr INFO: Masking defects.
reduceExposure.isr INFO: Masking NAN value pixels.
reduceExposure.isr INFO: Widening saturation trails.
reduceExposure.isr INFO: Applying dark correction.
reduceExposure.isr INFO: Interpolating masked pixels.
reduceExposure.isr WARN: No rough magnitude zero point set &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; filter r
reduceExposure.isr INFO: Setting rough magnitude zero point: 35.697952
reduceExposure.repair INFO: Identified 2847 cosmic rays.
reduceExposure.readLineList INFO: No lamps on; assuming sky.
reduceExposure.readLineList INFO: Filtered line lists &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; lamps: NaI,OH,OI
reduceExposure.centroidLines INFO: Measured 85817 line centroids
reduceExposure.adjustDetectorMap INFO: Final fit: chi2=118327.581471 dof=49262 xRMS=0.060291 yRMS=0.069859 (0.006032 nm) xSoften=0.031297 ySoften=0.039109 from 24643/30495 lines
reduceExposure.adjustDetectorMap INFO: Fit quality from reserved lines: chi2=818844.144452 xRMS=0.062705 yRMS=0.097566 (0.008424 nm) xSoften=0.137860 ySoften=0.473914 from 3388 lines (10.0%)
reduceExposure.adjustDetectorMap INFO: Softened fit: chi2=98540.502201 dof=49262 xRMS=0.060655 yRMS=0.071704 (0.006191 nm) xSoften=0.031296 ySoften=0.039105 from 3388 lines
reduceExposure.adjustDetectorMap INFO: Softened fit quality from reserved lines: chi2=594514.494636 xRMS=0.062612 yRMS=0.097520 (0.008420 nm) xSoften=0.137848 ySoften=0.473928 from 3388 lines
reduceExposure.adjustDetectorMap INFO: Final result: chi2=118340.846722 dof=49262 xRMS=0.060293 yRMS=0.069864 xSoften=0.031297 ySoften=0.039107 from 24643 lines
reduceExposure.adjustDetectorMap INFO: Stats &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; OI: chi2=1955.801216 dof=798 xRMS=0.116545 yRMS=0.074554 xSoften=0.062139 ySoften=0.000000 from 399 lines
reduceExposure.adjustDetectorMap INFO: Stats &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; OH: chi2=116385.045506 dof=48488 xRMS=0.059668 yRMS=0.069831 xSoften=0.030915 ySoften=0.039331 from 24244 lines
reduceExposure.adjustDetectorMap INFO: Stats &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; fiberId=3: chi2=397.851023 dof=94 xRMS=0.133083 yRMS=0.128705 xSoften=0.073909 ySoften=0.076113 from 47 lines (47 OH)
reduceExposure.adjustDetectorMap INFO: Stats &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; fiberId=169: chi2=328.602755 dof=196 xRMS=0.050338 yRMS=0.061800 xSoften=0.017361 ySoften=0.030029 from 98 lines (2 OI, 96 OH)
reduceExposure.adjustDetectorMap INFO: Stats &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; fiberId=306: chi2=502.753543 dof=210 xRMS=0.057093 yRMS=0.070342 xSoften=0.029157 ySoften=0.040794 from 105 lines (2 OI, 103 OH)
reduceExposure.adjustDetectorMap INFO: Stats &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; fiberId=482: chi2=452.784294 dof=202 xRMS=0.051715 yRMS=0.073428 xSoften=0.021869 ySoften=0.041609 from 101 lines (2 OI, 99 OH)
reduceExposure.adjustDetectorMap INFO: Stats &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; fiberId=649: chi2=537.442071 dof=176 xRMS=0.049804 yRMS=0.092030 xSoften=0.021107 ySoften=0.059436 from 88 lines (1 OI, 87 OH)
reduceExposure.photometerLines.apertureCorrection.fit INFO: Fit focal plane function: chi^2=226.805675 length=90/90 numSamples=251 numGood=480 numBad=22100 numRejected=10
reduceExposure.photometerLines INFO: Photometered 85817 lines
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="30376" author="hassan" created="Wed, 26 Jan 2022 16:24:05 +0000"  >&lt;p&gt;Trivial fix works as stated. Suggest adding a check to see if there are a non-zero number of sky fibers available after this line: &lt;a href=&quot;https://github.com/Subaru-PFS/drp_stella/blob/32a129274b1f1f20ed86a92cd405bfda66e884fd/python/pfs/drp/stella/subtractSky2d.py#L185&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://github.com/Subaru-PFS/drp_stella/blob/32a129274b1f1f20ed86a92cd405bfda66e884fd/python/pfs/drp/stella/subtractSky2d.py#L185&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This can be a separate ticket if that&apos;s cleaner.&lt;/p&gt;</comment>
                            <comment id="30377" author="hassan" created="Wed, 26 Jan 2022 18:32:06 +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|zzs9ul:xxjr</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="130">2DDRP-2022 A</customfieldvalue>

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