<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:52:31 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-380] Write fitted wavelength position and error to file</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-380</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;The existing 2D DRP code (&lt;tt&gt;IdentifyLinesTask&lt;/tt&gt;) already estimates positions and errors of spectral lines, based on a reference line list. We need to write this information in the case of arc data, to a separate file.&lt;/p&gt;

&lt;p&gt;More specifically, the fiberId, wavelength, line positions and error (y and delta-y) are written to an ASCII or FITS file, along with additional information identifying the arc exposure (pfsDesignId and pfsConfigId).&lt;/p&gt;

&lt;p&gt;In addition, the &lt;tt&gt;CalibrateWavelengthsTask&lt;/tt&gt; uses the information from &lt;tt&gt;IdentifyLinesTask&lt;/tt&gt; to determine a wavelength solution for the detectorMap, flagging lines that are used as part of the fitting, or those that are reserved. That task also provides a revised estimate and error of the wavelength solution. &lt;/p&gt;

&lt;p&gt;This additional information should also be written to the same file (there is some denormalization here but it makes more practical sense to carry both sets of information in the same file).&lt;/p&gt;

&lt;p&gt;I suggest updating the method &lt;tt&gt;reduceArcTask.write()&lt;/tt&gt; to do this, as it appears that most of the information is available there.&lt;/p&gt;</description>
                <environment></environment>
        <key id="13390">PIPE2D-380</key>
            <summary>Write fitted wavelength position and error to file</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="naka.keigo">Keigo Nakamura</assignee>
                                    <reporter username="hassan">hassan</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Mar 2019 13:52:03 +0000</created>
                <updated>Thu, 29 Aug 2019 18:23:02 +0000</updated>
                            <resolved>Wed, 28 Aug 2019 16:19:33 +0000</resolved>
                                                    <fixVersion>6.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                <comments>
                            <comment id="15039" author="price" created="Mon, 4 Mar 2019 14:48:53 +0000"  >&lt;p&gt;This should be done through the data butler.&lt;/p&gt;</comment>
                            <comment id="15040" author="price" created="Mon, 4 Mar 2019 16:59:00 +0000"  >&lt;p&gt;Here&apos;s what&apos;s needed to implement this with the data butler:&lt;br/&gt;
1. Devise a &lt;tt&gt;class&lt;/tt&gt; that will hold the data. The class should implement the following interfaces:&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;
&lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;WavelengthFitStatistics:
    @classmethod
    def readFits(cls, filename):
        &quot;&quot;&quot;Read from file

        The method name says &lt;span class=&quot;code-quote&quot;&gt;&quot;readFits&quot;&lt;/span&gt;, but &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; doesn&apos;t actually need to be FITS.
        If the name bothers you, &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; can forward to a method with a better name.
        &quot;&quot;&quot;
        # Read data from file, then:
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; cls(various, arguments)

    def writeFits(self, filename):
        &quot;&quot;&quot;Write to file

        The method name says &lt;span class=&quot;code-quote&quot;&gt;&quot;writeFits&quot;&lt;/span&gt;, but &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; doesn&apos;t actually need to be FITS.
        If the name bothers you, &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; can forward to a method with a better name.
        &quot;&quot;&quot;
        # Write data to file
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;2. Add an entry to the &lt;tt&gt;datasets&lt;/tt&gt; section of &lt;tt&gt;obs_pfs/policy/PfsMapper.yaml&lt;/tt&gt;. Pattern it on an existing entry, like the one for &lt;tt&gt;fluxCal&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;3. To write the data, construct the object and then pass the object to the data butler (&lt;tt&gt;butler.put(WavelengthFitStatistics(data), &quot;wavelengthStats&quot;, dataId)&lt;/tt&gt;) or data butler reference (&lt;tt&gt;dataRef.put(WavelengthFitStatistics(data), &quot;wavelengthStats&quot;)&lt;/tt&gt;). The name (e.g, &lt;tt&gt;&quot;wavelengthStats&quot;&lt;/tt&gt;) should match the entry made in step 2.&lt;/p&gt;</comment>
                            <comment id="15464" author="hassan" created="Sun, 19 May 2019 15:14:53 +0000"  >&lt;p&gt;Re-assigned temporarily to &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;. He would provide initial implementation, that would be updated by &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=naka.keigo&quot; class=&quot;user-hover&quot; rel=&quot;naka.keigo&quot;&gt;Keigo Nakamura&lt;/a&gt; if required.&lt;/p&gt;</comment>
                            <comment id="15499" author="price" created="Thu, 23 May 2019 02:03:26 +0000"  >&lt;p&gt;Handing this back to &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=naka.keigo&quot; class=&quot;user-hover&quot; rel=&quot;naka.keigo&quot;&gt;Keigo Nakamura&lt;/a&gt; after putting together an initial implementation on &lt;tt&gt;tickets/&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-380&quot; title=&quot;Write fitted wavelength position and error to file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-380&quot;&gt;&lt;del&gt;PIPE2D-380&lt;/del&gt;&lt;/a&gt;&lt;/tt&gt;. I moved the former implementation to &lt;tt&gt;u/keigo/&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-380&quot; title=&quot;Write fitted wavelength position and error to file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-380&quot;&gt;&lt;del&gt;PIPE2D-380&lt;/del&gt;&lt;/a&gt;&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Questions are welcome, but I&apos;m going to be in the back woods for the next week, so my internet access will be spotty.&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;
price@MacBook:~/pfs/drp_stella (tickets/PIPE2D-380=) $ git sub
commit 7d064a37b3c867066c22cf476177f7a63ac2a5c1 (HEAD -&amp;gt; tickets/PIPE2D-380, origin/tickets/PIPE2D-380)
Author: Paul Price &amp;lt;price@astro.princeton.edu&amp;gt;
Date:   Wed May 22 20:26:45 2019 -0400

    save wavelength fit data
    
    A &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; class, WavelengthFitData, saves the wavelength fit data
    (centroid in pixels, fit wavelength, actual wavelength) &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt;
    calculating statistics and &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; later QA.

 python/pfs/drp/stella/calibrateWavelengthsTask.py | 203 +++++++++++++++++++++-
 python/pfs/drp/stella/reduceArcTask.py            |   3 +-
 tests/test_WavelengthFitData.py                   | 117 +++++++++++++
 3 files changed, 321 insertions(+), 2 deletions(-)


price@MacBook:~/pfs/obs_pfs (tickets/PIPE2D-380=) $ git sub
commit 0a7c056a37ae247950063af9b45f78c5ac3b7edd (HEAD -&amp;gt; tickets/PIPE2D-380, origin/tickets/PIPE2D-380)
Author: Paul Price &amp;lt;price@astro.princeton.edu&amp;gt;
Date:   Wed May 22 15:38:28 2019 -0400

    PfsMapper: add wlFitData dataset
    
    For storing wavelength fit data.

 policy/PfsMapper.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="15976" author="price" created="Thu, 22 Aug 2019 15:42:02 +0000"  >&lt;p&gt;I believe this is ready to merge.&lt;/p&gt;</comment>
                            <comment id="15998" author="price" created="Wed, 28 Aug 2019 16:19:33 +0000"  >&lt;p&gt;Merged to master.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="13254">PIPE2D-322</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:508yl03zci</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="43">2019 B</customfieldvalue>
    <customfieldvalue id="45">2DDRP-2019 C</customfieldvalue>
    <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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        </customfields>
    </item>
</channel>
</rss>