<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:58:33 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-828] Port LSST DM-29117 ticket for handling 32/64 bit keywords</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-828</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;A command like:&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;
butler.get(&lt;span class=&quot;code-quote&quot;&gt;&apos;raw&apos;&lt;/span&gt;, visit=45777, arm=&lt;span class=&quot;code-quote&quot;&gt;&apos;r&apos;&lt;/span&gt;, filter=&lt;span class=&quot;code-quote&quot;&gt;&apos;r&apos;&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;fails as the type if the &lt;tt&gt;W_PFDSGN&lt;/tt&gt; keyword changes when we patch the header to insert the correct values.&lt;/p&gt;

&lt;p&gt;Please pull the fix from the LSST side of things.   If this is not practical, I have a horrible hack in pfsMapper.py which we could commit.&lt;/p&gt;</description>
                <environment></environment>
        <key id="15582">PIPE2D-828</key>
            <summary>Port LSST DM-29117 ticket for handling 32/64 bit keywords</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="rhl">rhl</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Apr 2021 18:27:55 +0000</created>
                <updated>Tue, 8 Jun 2021 14:03:20 +0000</updated>
                            <resolved>Tue, 8 Jun 2021 14:03:20 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="19251" author="rhl" created="Fri, 30 Apr 2021 18:32:16 +0000"  >&lt;p&gt;I told you it was horrible.  I don&apos;t see a better way than save/maybe restore.&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;
diff --git a/python/lsst/obs/pfs/pfsMapper.py b/python/lsst/obs/pfs/pfsMapper.py
index dd33d4d..05995e7 100644
--- a/python/lsst/obs/pfs/pfsMapper.py
+++ b/python/lsst/obs/pfs/pfsMapper.py
@@ -58,6 +58,22 @@ &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;PfsRawVisitInfo(MakeRawVisitInfo):
         &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; self.offsetDate(dateObs, 0.5*exposureTime)
 
 
+def fix_header_safe(md, translator_class=PfsTranslator):
+    &lt;span class=&quot;code-quote&quot;&gt;&quot;&quot;&quot;A version of fix_header that works around DM-29117&quot;&lt;/span&gt;&quot;&quot;
+    dangerousKeys = [&lt;span class=&quot;code-quote&quot;&gt;&quot;W_PFDSGN&quot;&lt;/span&gt;]    # keys that can trigger DM-29117
+    saved = {}
+    &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; k in dangerousKeys:
+        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; k in md:
+            saved[k] = md.get(k)
+            md.remove(k)
+
+    fix_header(md, translator_class=PfsTranslator)
+
+    &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; k in dangerousKeys:
+        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; k not in md and k in saved:
+            md[k] = saved[k]
+
+
 &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;PfsMapper(CameraMapper):
     &lt;span class=&quot;code-quote&quot;&gt;&quot;&quot;&quot;Provides &lt;span class=&quot;code-keyword&quot;&gt;abstract&lt;/span&gt;-physical mapping &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; PFS data&quot;&lt;/span&gt;&quot;&quot;
     packageName = &lt;span class=&quot;code-quote&quot;&gt;&quot;obs_pfs&quot;&lt;/span&gt;
@@ -219,7 +235,9 @@ &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;PfsMapper(CameraMapper):
         exp = &lt;span class=&quot;code-keyword&quot;&gt;super&lt;/span&gt;(PfsMapper, self).std_raw(item, dataId)
 
         md = exp.getMetadata()
-        fix_header(md, translator_class=PfsTranslator)
+
+        fix_header_safe(md, translator_class=PfsTranslator)
+
         &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;:
             dataVersion = &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(md.get(&lt;span class=&quot;code-quote&quot;&gt;&apos;W_VERSIONS_FPGA&apos;&lt;/span&gt;), 16)
         except Exception:
@@ -248,7 +266,7 @@ &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;PfsMapper(CameraMapper):
         item : `lsst.daf.base.PropertyList`
             The modified raw metadata.
         &quot;&quot;&quot;
-        fix_header(item, translator_class=PfsTranslator)
+        fix_header_safe(item, translator_class=PfsTranslator)
         &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; item
 
     def std_fiberProfiles(self, item, dataId):
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="21394" author="hassan" created="Mon, 7 Jun 2021 13:41:25 +0000"  >&lt;p&gt;Link to LSST DM-29117 ticket: &lt;a href=&quot;https://jira.lsstcorp.org/browse/DM-29117&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.lsstcorp.org/browse/DM-29117&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="21399" author="price" created="Mon, 7 Jun 2021 21:45:46 +0000"  >&lt;p&gt;Brought in code from LSST.&lt;/p&gt;</comment>
                            <comment id="21400" author="price" created="Mon, 7 Jun 2021 21:50:02 +0000"  >&lt;p&gt;And it works:&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; exp = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;raw&quot;&lt;/span&gt;, visit=45777, arm=&lt;span class=&quot;code-quote&quot;&gt;&quot;r&quot;&lt;/span&gt;, filter=&lt;span class=&quot;code-quote&quot;&gt;&quot;r&quot;&lt;/span&gt;)
&amp;gt;&amp;gt;&amp;gt; exp.getMetadata().get(&lt;span class=&quot;code-quote&quot;&gt;&quot;W_PFDSGN&quot;&lt;/span&gt;)
3735928559
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="21401" author="hassan" created="Mon, 7 Jun 2021 21:56:56 +0000"  >&lt;p&gt;Changes look fine to me. Only minor comments.&lt;/p&gt;</comment>
                            <comment id="21402" author="hassan" created="Mon, 7 Jun 2021 22:16:21 +0000"  >&lt;p&gt;Also checked 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;
python -c &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; lsst.obs.pfs.dm29117; &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; lsst.daf.base as dafBase; md = dafBase.PropertyList(); md[&lt;span class=&quot;code-quote&quot;&gt;&apos;aa&apos;&lt;/span&gt;] = 1; md[&lt;span class=&quot;code-quote&quot;&gt;&apos;aa&apos;&lt;/span&gt;] = 3735928559&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which passed successfully.&lt;/p&gt;</comment>
                            <comment id="21403" author="price" created="Tue, 8 Jun 2021 14:03:20 +0000"  >&lt;p&gt;Merged.&lt;/p&gt;

&lt;p&gt;I also added a commit that allows you to leave off the &lt;tt&gt;filter=&quot;r&quot;&lt;/tt&gt; in the &lt;tt&gt;buter.get&lt;/tt&gt; call.&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 lsst.daf.persistence &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Butler
&amp;gt;&amp;gt;&amp;gt; butler = Butler(&lt;span class=&quot;code-quote&quot;&gt;&quot;/projects/HSC/PFS/Subaru&quot;&lt;/span&gt;)
CameraMapper INFO: Loading exposure registry from /projects/HSC/PFS/Subaru/registry.sqlite3
&amp;gt;&amp;gt;&amp;gt; butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;raw&quot;&lt;/span&gt;, visit=45777, arm=&lt;span class=&quot;code-quote&quot;&gt;&quot;r&quot;&lt;/span&gt;)
&amp;lt;lsst.afw.image.exposure.exposure.ExposureU object at 0x2b4a13f32618&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="16796">PIPE2D-850</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|02qpt6:508yl0chzzy0000026o</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="105">2DDRP-2021 A 4</customfieldvalue>
    <customfieldvalue id="109">2DDRP-2021 A5</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>