<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:52:48 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-405] RFC: header patching</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-405</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;I&apos;d like to propose a minimal header patching scheme for comments/review. Unpolished but functional. Here&apos;s a doc and a test YAML file. &lt;/p&gt;

</description>
                <environment></environment>
        <key id="13535">PIPE2D-405</key>
            <summary>RFC: header patching</summary>
                <type id="3" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10518&amp;avatarType=issuetype">Task</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="cloomis">cloomis</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 Apr 2019 14:26:58 +0000</created>
                <updated>Wed, 25 Sep 2019 19:12:53 +0000</updated>
                            <resolved>Wed, 25 Sep 2019 18:46:41 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                <comments>
                            <comment id="15347" author="cloomis" created="Wed, 24 Apr 2019 00:45:48 +0000"  >&lt;p&gt;Is there a sane place in the butler to put a function which modifies a header? The test code takes a fits pathname and returns a pyfits header &amp;#8211; not sure whether such a thing can be used. &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=price&quot; class=&quot;user-hover&quot; rel=&quot;price&quot;&gt;price&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="15348" author="price" created="Wed, 24 Apr 2019 01:04:21 +0000"  >&lt;p&gt;Try &lt;tt&gt;PfsMapper.std_raw&lt;/tt&gt; and &lt;tt&gt;std_raw_md&lt;/tt&gt;. See &lt;a href=&quot;https://github.com/lsst/obs_subaru/blob/master/python/lsst/obs/hsc/hscMapper.py#L166-L188&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;HscMapper&lt;/a&gt; for examples.&lt;/p&gt;</comment>
                            <comment id="15454" author="hassan" created="Thu, 16 May 2019 14:38:29 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=price&quot; class=&quot;user-hover&quot; rel=&quot;price&quot;&gt;price&lt;/a&gt; when you have the opportunity, can you review the proposal please?&lt;/p&gt;</comment>
                            <comment id="15455" author="price" created="Thu, 16 May 2019 14:45:37 +0000"  >&lt;p&gt;Looks reasonable to me.&lt;br/&gt;
I suggest running it by Tim Jenness (LSST), as he&apos;s thought about these kinds of things.&lt;/p&gt;</comment>
                            <comment id="15465" author="hassan" created="Sun, 19 May 2019 15:16:09 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=cloomis&quot; class=&quot;user-hover&quot; rel=&quot;cloomis&quot;&gt;cloomis&lt;/a&gt; to add initial code to git and provide link in this ticket.&lt;/p&gt;</comment>
                            <comment id="15797" author="cloomis" created="Mon, 22 Jul 2019 16:25:50 +0000"  >&lt;p&gt;This has not changed since the tickets was opened. For evaluation, am just providing an executable, not tests, sorry. From &lt;tt&gt;$OBS_PFS_DIR&lt;/tt&gt;, &lt;tt&gt;python/lsst/obs/pfs/patchHeader.py --yamlDir=tests/patches /your/path/to/PFLA01499...&lt;/tt&gt; will show what would happen.&lt;/p&gt;</comment>
                            <comment id="15938" author="price" created="Sat, 10 Aug 2019 03:16:43 +0000"  >&lt;p&gt;This is assigned for me, and it&apos;s not clear what I&apos;m expected to do. I&apos;m thinking I&apos;m to implement this scheme in the butler?&lt;/p&gt;

&lt;p&gt;On a second reading, I have the following comments:&lt;/p&gt;

&lt;p&gt;&amp;gt; We propose saving YAML files containing a dictionaries of list of rules, in the pfs_instdata git repo.&lt;/p&gt;

&lt;p&gt;The pfs_instdata repo is HUGE, and having to download it would compromise our continuous integration with Travis (which i think must set time limits on jobs). Can we put these in their own repo instead?&lt;/p&gt;

&lt;p&gt;I&apos;m not necessarily opposed to YAML files with rules, but I wonder if it might not be easier to use python code instead, with a number of standard functions defined that do the various adding/modifying/deleting of keywords?&lt;/p&gt;

&lt;p&gt;&amp;gt; Are filename globs the right key?&lt;/p&gt;

&lt;p&gt;Not sure. When we&apos;re using this in the butler, we have keyword-value pairs like &lt;tt&gt;visit=123 arm=r spectrograph=4&lt;/tt&gt;. We can construct a raw filename, but that uses the &lt;tt&gt;PF*r1.fits&lt;/tt&gt;-like style of filenames rather than &lt;tt&gt;PF*12.fits&lt;/tt&gt; style. Of course, we can convert back to the latter style; it&apos;s just annoying.&lt;/p&gt;</comment>
                            <comment id="15939" author="rhl" created="Sat, 10 Aug 2019 03:35:03 +0000"  >&lt;p&gt;Since this was opened Tim Jenness has implemented a viable header patching scheme for LSST, and we should probably adopt it instead.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="15946" author="price" created="Tue, 13 Aug 2019 17:18:00 +0000"  >&lt;p&gt;Tim&apos;s header patching scheme is implemented in the &lt;a href=&quot;https://github.com/LSST/astro_metadata_translator&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;astro_metadata_translator&lt;/a&gt; package, which is intended to be a general-purpose astronomy metadata translator (FITS headers to astronomical metadata), and is used by the butler to generate &lt;tt&gt;VisitInfo&lt;/tt&gt; from the FITS headers. There is a &lt;tt&gt;fix_header&lt;/tt&gt; function that searches for a YAML file (specified by observation ID) that sets values in the header (it has no ability to set values programmatically); this is used within the butler. The path for the YAML files can be specified explicitly, or via a envvar (&lt;tt&gt;METADATA_CORRECTIONS_PATH&lt;/tt&gt;).&lt;/p&gt;

&lt;p&gt;I &lt;em&gt;think&lt;/em&gt; this will be sufficient for our purposes if we add a layer over the top to generate the YAML files programmatically. Tim is concerned that the YAML files be available for people to download without needing a bunch of prerequisites, so I&apos;m hopeful that he&apos;ll move the source path to the obs_*_data packages (relatively new feature in the LSST stack, currently contains defects). Until that comes together (possibly the LSST 19.0 release?), we can build them in obs_pfs and set the envvar appropriately.&lt;/p&gt;</comment>
                            <comment id="15947" author="price" created="Tue, 13 Aug 2019 19:23:50 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=cloomis&quot; class=&quot;user-hover&quot; rel=&quot;cloomis&quot;&gt;cloomis&lt;/a&gt;, what are the requirements from your end? Are you OK with this living in obs_pfs? Do we really need to be able to change values based on whether they are set to a particular value, or is it enough to just set it to something new (if we can define in python code what it gets set to)?&lt;/p&gt;</comment>
                            <comment id="15949" author="cloomis" created="Wed, 14 Aug 2019 02:58:36 +0000"  >&lt;p&gt;So we can replace all of the obs_pfs header-&amp;gt;metadata functionaity by this? That sounds like a big win. Am a little surprised by how static the &quot;fix_headers&quot; mechanism is, and that it requires one file per input file, but it obviously could be extended if necessary. I am actually with you on preferring &lt;em&gt;code&lt;/em&gt; for this kind of problem: a recent Subaru gotcha was that the supplied UTC timestamps were in HST for a few days; for that, being able to call out to to a function which could add 10 hours for all visits in a given range is much more sane than making a file for each.&lt;/p&gt;

&lt;p&gt;Realistically, DRP is the only consumer. And as far as I can tell that only cares about ~20 cards (time, identity, motors, exposure times). So sure, this looks fine.&lt;/p&gt;</comment>
                            <comment id="15957" author="price" created="Thu, 15 Aug 2019 17:47:07 +0000"  >&lt;p&gt;I&apos;ve put an implementation in place that uses Tim Jenness&apos; astro_metadata_translator package. Unfortunately it doesn&apos;t have any actual data in place for headers to patch, but I&apos;ve checked that it does in fact patch the headers on ingest.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=cloomis&quot; class=&quot;user-hover&quot; rel=&quot;cloomis&quot;&gt;cloomis&lt;/a&gt;, please have a look, and let me know what you think. I&apos;ve put your work on a new &lt;tt&gt;u/cloomis/&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;&lt;/tt&gt; branch.&lt;/p&gt;</comment>
                            <comment id="15958" author="price" created="Thu, 15 Aug 2019 17:47:48 +0000"  >&lt;p&gt;P.S. This is based on &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-442&quot; title=&quot;Upgrade to LSST stack v18.1.0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-442&quot;&gt;&lt;del&gt;PIPE2D-442&lt;/del&gt;&lt;/a&gt; (upgrade to LSST 18.1.0), because it requires functionality that doesn&apos;t exist in LSST 16.&lt;/p&gt;</comment>
                            <comment id="16009" author="hassan" created="Fri, 30 Aug 2019 20:46:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=cloomis&quot; class=&quot;user-hover&quot; rel=&quot;cloomis&quot;&gt;cloomis&lt;/a&gt; can you review please?&lt;/p&gt;</comment>
                            <comment id="16031" author="hassan" created="Tue, 10 Sep 2019 16:32:37 +0000"  >&lt;p&gt;Delay discussion of &lt;tt&gt;obs_pfs_data&lt;/tt&gt; repo (raised during &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=cloomis&quot; class=&quot;user-hover&quot; rel=&quot;cloomis&quot;&gt;cloomis&lt;/a&gt; review) to a future ticket. Otherwise, review complete.&lt;/p&gt;</comment>
                            <comment id="16058" author="price" created="Wed, 11 Sep 2019 19:43:15 +0000"  >&lt;p&gt;Merged to master.&lt;/p&gt;</comment>
                            <comment id="16063" author="price" created="Wed, 11 Sep 2019 23:02:10 +0000"  >&lt;p&gt;And then discovered again that this requires LSST 18.1.0, so reverted the merge.&lt;/p&gt;</comment>
                            <comment id="16109" author="price" created="Wed, 25 Sep 2019 18:46:41 +0000"  >&lt;p&gt;Merged to master (by reverting the revert of the accidental merge).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="13676">PIPE2D-442</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="11913" name="2019-04-02.yaml" size="1143" author="cloomis" created="Mon, 15 Apr 2019 14:26:40 +0000"/>
                            <attachment id="11912" name="patchup.html" size="17334" author="cloomis" created="Mon, 15 Apr 2019 14:26:40 +0000"/>
                            <attachment id="11914" name="patchup.rst" size="5337" author="cloomis" created="Mon, 15 Apr 2019 14:26:40 +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:508yl03zc01</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10005" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="46">2DDRP-2019 D</customfieldvalue>
    <customfieldvalue id="49">2DDRP-2019 E</customfieldvalue>
    <customfieldvalue id="52">2DDRP-2019 F</customfieldvalue>
    <customfieldvalue id="55">2DDRP-2019 G</customfieldvalue>

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