<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:54:26 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-525] PostISRCCD exposures cannot be written for a subset of LAM data</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-525</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;This ticket relates to an update needed to the LSST stack, for which a separate ticket on the LSST JIRA service will be raised, but is written here so that the PFS team are aware of the problem. &lt;/p&gt;

&lt;p&gt;While processing LAM data, it was found that &lt;tt&gt;postISRCCD&lt;/tt&gt; exposures for visits 17190 and range 17244..17297 (5 May 2019 data) could not be written to file. There are probably more visits affected.&lt;/p&gt;

&lt;p&gt;A log of an example run using &lt;tt&gt;detrend.py&lt;/tt&gt; is attached. The actual error is shown below:&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;
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/tigress/HSC/PFS/stack/20190925/stack/miniconda3-4.5.12-1172c30/Linux64/afw/18.1.0/python/lsst/afw/image/image/fitsIoWithOptions.py&quot;&lt;/span&gt;, line 127, in exposureWriteFitsWithOptions
    self.writeFits(dest, **writeOptionDict)
lsst.pex.exceptions.wrappers.TypeError: 
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;src/PropertySet.cc&quot;&lt;/span&gt;, line 232, in std::vector&amp;lt;T&amp;gt; lsst::daf::base::PropertySet::getArray(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; string&amp;amp;) &lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; [with T = std::basic_string&amp;lt;&lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt;&amp;gt;; std::string = std::basic_string&amp;lt;&lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt;&amp;gt;]
    W_XHP2FR {0}
lsst::pex::exceptions::TypeError: &apos;W_XHP2FR
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The FITS key W_XHP2FR is duplicated in the header (an issue which is addressed in a separate ticket, &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/INSTRM-925&quot; title=&quot;Duplicate key W_XHP2FR present in raw exposures&quot; class=&quot;issue-link&quot; data-issue-key=&quot;INSTRM-925&quot;&gt;&lt;del&gt;INSTRM-925&lt;/del&gt;&lt;/a&gt;). In the case of these LAM visits, the value of both duplicates is Undefined:&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;
W_XHP2FR=  / frac power to spreader heater: 0 or 1 NOT CURRENT
[...]
W_XHP2FR=  / frac power to shield: 0 or 1 NOT CURRENT 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This problem had also appeared when writing other exposure outputs such as &lt;tt&gt;calexp&lt;/tt&gt;&apos;s again using &lt;tt&gt;detrend.py&lt;/tt&gt;, but in this case, if the value is set to a legitimate value (&apos;0&apos;) through the header patching mechanism (&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-405&quot; title=&quot;RFC: header patching&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-405&quot;&gt;&lt;del&gt;PIPE2D-405&lt;/del&gt;&lt;/a&gt;), then the error disappears and a valid &lt;tt&gt;calexp&lt;/tt&gt; is created.&lt;/p&gt;

&lt;p&gt;So it seems that the problem is only present if a) a card is duplicated and b) the value is undefined.&lt;/p&gt;

&lt;p&gt;The header patching mechanism requires one to have access to the metadata of the exposure, which is then modified in memory. This mechanism therefore cannot be applied to &lt;tt&gt;postISRCCD&lt;/tt&gt; products, as these products are written to file from within the LSST stack (specifically in the &lt;tt&gt;IsrTask&lt;/tt&gt;), so there is no possibility in PFS software to intercept the metadata prior to its being written to file.&lt;/p&gt;</description>
                <environment></environment>
        <key id="14255">PIPE2D-525</key>
            <summary>PostISRCCD exposures cannot be written for a subset of LAM data</summary>
                <type id="1" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10503&amp;avatarType=issuetype">Bug</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>Wed, 18 Mar 2020 18:56:59 +0000</created>
                <updated>Thu, 9 Apr 2020 19:11:47 +0000</updated>
                            <resolved>Sat, 21 Mar 2020 03:58:52 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="16904" author="hassan" created="Thu, 19 Mar 2020 13:57:48 +0000"  >&lt;p&gt;Prior to LAM visit 16803 (prior to the start of day 2019-05-03), FITS key &lt;tt&gt;W_XHP2FR&lt;/tt&gt; had a value of &apos;NO CURRENT VALUE&apos;. For visits with this value, &lt;tt&gt;postISRCCD&lt;/tt&gt; exposures are generated successfully.&lt;/p&gt;

&lt;p&gt;From visit 16804 onwards, the value for this key was empty/Undefined. &lt;tt&gt;postISRCCD&lt;/tt&gt; generation fails for those visits.&lt;/p&gt;
</comment>
                            <comment id="16905" author="hassan" created="Thu, 19 Mar 2020 15:07:43 +0000"  >&lt;p&gt;Filed ticket &lt;a href=&quot;https://jira.lsstcorp.org/browse/DM-23928&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.lsstcorp.org/browse/DM-23928&lt;/a&gt; to address this.&lt;/p&gt;</comment>
                            <comment id="16906" author="hassan" created="Thu, 19 Mar 2020 15:27:14 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=arnaud.lefur&quot; class=&quot;user-hover&quot; rel=&quot;arnaud.lefur&quot;&gt;arnaud.lefur&lt;/a&gt; mentions that 6364 LAM raw data files have the problematic &lt;tt&gt;W_XHP2FR&lt;/tt&gt; values, or 3182 visits.&lt;/p&gt;</comment>
                            <comment id="16907" author="hassan" created="Thu, 19 Mar 2020 16:45:56 +0000"  >&lt;p&gt;Latest feedback from the LSST development team: The particular scenario of failures writing out headers with duplicate and empty cards cannot be easily fixed in the LSST stack. So to process the problematic data, we may need to modify the headers of the raw data.&lt;/p&gt;</comment>
                            <comment id="16913" author="price" created="Sat, 21 Mar 2020 01:22:50 +0000"  >&lt;p&gt;I&apos;ve pushed a solution to &lt;tt&gt;tickets/&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-525&quot; title=&quot;PostISRCCD exposures cannot be written for a subset of LAM data&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-525&quot;&gt;&lt;del&gt;PIPE2D-525&lt;/del&gt;&lt;/a&gt;&lt;/tt&gt; of obs_pfs. &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=hassan&quot; class=&quot;user-hover&quot; rel=&quot;hassan&quot;&gt;hassan&lt;/a&gt;, would you please test it for me? Note that you&apos;ll need to run &lt;tt&gt;scons&lt;/tt&gt; on obs_pfs to build the corrections.&lt;/p&gt;</comment>
                            <comment id="16914" author="hassan" created="Sat, 21 Mar 2020 02:27:10 +0000"  >&lt;p&gt;Fix works perfectly. Running &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;
detrend.py ${repo} --calib ${calibDir} --rerun ${rerun} --id visit=${visit} arm=r -c isr.doWrite=True --doraise
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;on LAM visits 17244..17297 results in zero errors, and populated &lt;tt&gt;postISRCCD&lt;/tt&gt; and &lt;tt&gt;calexp&lt;/tt&gt; files (116Mb each). Viewing &lt;tt&gt;postISRCCD&lt;/tt&gt; &lt;tt&gt;calexp&lt;/tt&gt; exposures shows the expected spots from 10 fibers.&lt;/p&gt;</comment>
                            <comment id="16915" author="price" created="Sat, 21 Mar 2020 02:40:00 +0000"  >&lt;p&gt;Credit to &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; for reminding me about &lt;tt&gt;CameraMapper.std_raw&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="16916" author="hassan" created="Sat, 21 Mar 2020 03:02:58 +0000"  >&lt;p&gt;I would suggest that the docstring for the &lt;tt&gt;std_raw&lt;/tt&gt; method should be updated to mention that other header fixes are applied in addition to the old ADC fix &lt;a href=&quot;https://github.com/Subaru-PFS/obs_pfs/blob/dcbd8f4ba86e17fac894c6248db045832f145b92/python/lsst/obs/pfs/pfsMapper.py#L192&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://github.com/Subaru-PFS/obs_pfs/blob/dcbd8f4ba86e17fac894c6248db045832f145b92/python/lsst/obs/pfs/pfsMapper.py#L192&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="16917" author="price" created="Sat, 21 Mar 2020 03:58:52 +0000"  >&lt;p&gt;Done and merged to master.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="14295">PIPE2D-536</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14312">PIPE2D-543</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="14254">INSTRM-925</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="12534" name="detrend_postisrccd.log" size="5420" author="hassan" created="Wed, 18 Mar 2020 18:57:46 +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|02qpt6:508yl0chzzy0000q01</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10100" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Reviewers</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>hassan</customfieldvalue>

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