<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:34:24 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>[DAMD-113] Write pfsArm in electrons</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/DAMD-113</link>
                <project id="10400" key="DAMD">Data Model</project>
                    <description>&lt;p&gt;It would be useful for engineering and debugging pipelines if the extracted spectra in the pfsArm files were in units of electrons; currently they are relative to the fiberProfile normalisation, which comes from extracting a quartz). Similarly, it would similarly be useful if the spectra in the pfsMerged files were close to electrons (or, at least, normalised like they are close to electrons).&lt;/p&gt;

&lt;p&gt;This will require small documentation changes in the datamodel, and some modest changes to the pipeline to support.&lt;/p&gt;</description>
                <environment></environment>
        <key id="16881">DAMD-113</key>
            <summary>Write pfsArm in electrons</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="price">price</reporter>
                        <labels>
                    </labels>
                <created>Fri, 11 Jun 2021 15:02:35 +0000</created>
                <updated>Wed, 30 Mar 2022 23:43:09 +0000</updated>
                            <resolved>Tue, 20 Jul 2021 19:07:53 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                <comments>
                            <comment id="21476" author="price" created="Fri, 11 Jun 2021 15:15:20 +0000"  >&lt;p&gt;This issue replaces &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-811&quot; title=&quot;Provide an option to make the unit of `pfsArm` in real counts&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-811&quot;&gt;&lt;del&gt;PIPE2D-811&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="21657" author="price" created="Wed, 7 Jul 2021 18:17:40 +0000"  >&lt;p&gt;I gave up having the pfsMerged files be in units of (something close to) counts, because that requires choosing a normalisation using multiple arms, and then choosing the exact same normalisation later for coaddition when there&apos;s the potential to have a different input set. But pfsArm is now in counts.&lt;/p&gt;</comment>
                            <comment id="21658" author="rhl" created="Wed, 7 Jul 2021 18:20:52 +0000"  >&lt;p&gt;I think you should probably have discussed this decision on slack.  I don&apos;t quite understand why the book-keeping can&apos;t be done in a safe way (probably by including some extra information in the files).  Can you explain?&lt;/p&gt;</comment>
                            <comment id="21659" author="price" created="Wed, 7 Jul 2021 18:27:29 +0000"  >&lt;p&gt;I don&apos;t like the idea of writing the normalization to a file that&apos;s uninvolved in the coaddition process, but I guess we could write a new dataset type that contains the normalisation.&lt;/p&gt;</comment>
                            <comment id="21660" author="rhl" created="Wed, 7 Jul 2021 18:31:19 +0000"  >&lt;p&gt;I must not understand.  What information would you need to write to an extra file, and when would it be read?  I&apos;d have thought it&apos;d go to the pfsMerged file and everything would be transparent&lt;/p&gt;</comment>
                            <comment id="21661" author="price" created="Fri, 9 Jul 2021 14:44:47 +0000"  >&lt;p&gt;The new plan is to add an extra HDU to pfsArm containing the normalisation.&lt;/p&gt;</comment>
                            <comment id="21689" author="price" created="Wed, 14 Jul 2021 16:23:03 +0000"  >&lt;p&gt;I think I&apos;ve got this working. Below I show me poking around the results of the integration test. Note that pfsArm and pfsMerged fluxes of the flux standard star (about i=18 mag) are in the thousands, and the normalised fluxes (ratio of the flux to the quartz) are about 0.08. For the single-object products, the flux in the pfsSingle and pfsObject are about 2.25e5 nJy = 18 mag.&lt;/p&gt;

&lt;p&gt;I&apos;m going to clean up the commit history and then submit for review.&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; &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; numpy as np
&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;INTEGRATION/rerun/integration/pipeline&quot;&lt;/span&gt;)
CameraMapper INFO: Loading exposure registry from /scratch/pprice/damd-113/INTEGRATION/registry.sqlite3
CameraMapper INFO: Loading calib registry from /scratch/pprice/damd-113/INTEGRATION/CALIB/calibRegistry.sqlite3
CameraMapper INFO: Loading calib registry from /scratch/pprice/damd-113/INTEGRATION/CALIB/calibRegistry.sqlite3
&amp;gt;&amp;gt;&amp;gt; index = 0
&amp;gt;&amp;gt;&amp;gt; pfsArm = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsArm&quot;&lt;/span&gt;, visit=24, arm=&lt;span class=&quot;code-quote&quot;&gt;&quot;b&quot;&lt;/span&gt;)
&amp;gt;&amp;gt;&amp;gt; select = (pfsArm.wavelength[index] &amp;gt; 500) &amp;amp; (pfsArm.wavelength[index] &amp;lt; 600)
&amp;gt;&amp;gt;&amp;gt; print(np.median(pfsArm.flux[index][select]))
3193.8977383679285
&amp;gt;&amp;gt;&amp;gt; print(np.median(pfsArm.flux[index][select]/pfsArm.norm[index][select]))
0.08098331564220362
&amp;gt;&amp;gt;&amp;gt; pfsMerged = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsMerged&quot;&lt;/span&gt;, visit=24)
&amp;gt;&amp;gt;&amp;gt; select = (pfsMerged.wavelength[index] &amp;gt; 500) &amp;amp; (pfsMerged.wavelength[index] &amp;lt; 600)
&amp;gt;&amp;gt;&amp;gt; print(np.median(pfsMerged.flux[index][select]))
4250.031433514167
&amp;gt;&amp;gt;&amp;gt; print(np.median(pfsMerged.flux[index][select]/pfsMerged.norm[index][select]))
0.07860174756195284
&amp;gt;&amp;gt;&amp;gt; pfsSingle = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsSingle&quot;&lt;/span&gt;, catId=0, tract=0, patch=&lt;span class=&quot;code-quote&quot;&gt;&quot;0,0&quot;&lt;/span&gt;, objId=1, visit=24)
&amp;gt;&amp;gt;&amp;gt; select = (pfsSingle.wavelength &amp;gt; 600) &amp;amp; (pfsSingle.wavelength &amp;lt; 700)
&amp;gt;&amp;gt;&amp;gt; print(np.median(pfsSingle.flux[select]))
226348.42616116628
&amp;gt;&amp;gt;&amp;gt; select = (pfsSingle.fluxTable.wavelength &amp;gt; 600) &amp;amp; (pfsSingle.fluxTable.wavelength &amp;lt; 700)
&amp;gt;&amp;gt;&amp;gt; print(np.median(pfsSingle.fluxTable.flux[select]))
225535.49838282933
&amp;gt;&amp;gt;&amp;gt; pfsObject = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsObject&quot;&lt;/span&gt;, catId=0, tract=0, patch=&lt;span class=&quot;code-quote&quot;&gt;&quot;0,0&quot;&lt;/span&gt;, objId=1, nVisit=2, pfsVisitHash=0x60241444a9af118c)
&amp;gt;&amp;gt;&amp;gt; select = (pfsObject.wavelength &amp;gt; 600) &amp;amp; (pfsObject.wavelength &amp;lt; 700)
&amp;gt;&amp;gt;&amp;gt; print(np.median(pfsObject.flux[select]))
226177.83216109022
&amp;gt;&amp;gt;&amp;gt; select = (pfsObject.fluxTable.wavelength &amp;gt; 600) &amp;amp; (pfsObject.fluxTable.wavelength &amp;lt; 700) &amp;amp; (pfsObject.fluxTable.mask == 0)
&amp;gt;&amp;gt;&amp;gt; print(np.median(pfsObject.fluxTable.flux[select]))
224241.48945935623
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="21690" author="price" created="Wed, 14 Jul 2021 19:25:52 +0000"  >&lt;p&gt;Everything appears to be working.&lt;/p&gt;</comment>
                            <comment id="21704" author="hassan" created="Mon, 19 Jul 2021 21:06:39 +0000"  >&lt;p&gt;No additional comments on proposed changes.&lt;/p&gt;</comment>
                            <comment id="21707" author="price" created="Tue, 20 Jul 2021 19:07:53 +0000"  >&lt;p&gt;Merged.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="22692">PIPE2D-1008</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|zzs4wj:zz9</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="111">2DDRP-2021 A 6</customfieldvalue>
    <customfieldvalue id="115">2DDRP-2021 A 7</customfieldvalue>

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