<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:59:28 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-897] pfsObject flux is not in nJy</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-897</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;&lt;font color=&quot;#172b4d&quot;&gt;Looking at the weekly results at IPMU with `w.2021.37`, `pfsObject.flux` does not seem to be in nJy. Please confirm this and fix if this is true.&lt;/font&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="17030">PIPE2D-897</key>
            <summary>pfsObject flux is not in nJy</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="kiyoto.yabe">Kiyoto Yabe</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 Sep 2021 07:31:22 +0000</created>
                <updated>Fri, 24 Sep 2021 04:00:10 +0000</updated>
                            <resolved>Fri, 24 Sep 2021 04:00:10 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                <comments>
                            <comment id="22006" author="price" created="Thu, 23 Sep 2021 21:30:34 +0000"  >&lt;p&gt;Discovered a normalisation bug in flux calibration.&lt;/p&gt;</comment>
                            <comment id="22007" author="hassan" created="Thu, 23 Sep 2021 21:46:34 +0000"  >&lt;p&gt;Changes look OK to me. Did you look at the final pfsObject flux for an example file?&lt;/p&gt;</comment>
                            <comment id="22008" author="price" created="Thu, 23 Sep 2021 21:53:02 +0000"  >&lt;p&gt;Here&apos;s the log of my investigation:&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;/scratch/pprice/jenkins/weekly/2021-09-19/process/rerun/weekly/pipeline/brn/pipeline/&quot;&lt;/span&gt;)

&amp;gt;&amp;gt;&amp;gt; pfsConfig = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsConfig&quot;&lt;/span&gt;, visit=47)
&amp;gt;&amp;gt;&amp;gt; from pfs.datamodel &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; TargetType
&amp;gt;&amp;gt;&amp;gt; pfsConfig.select(targetType=TargetType.FLUXSTD).objId
array([ 8, 13, 23, 53,  3, 26,  6, 52, 39, 54,  7, 33, 49, 41,  1, 37, 18,
       47, 40, 42, 56, 16, 17, 15, 46,  5, 25, 29, 57, 10,  2, 35, 31, 45,
       55,  4, 38, 58, 36, 44, 19, 11, 60, 34, 59, 30, 20,  9, 24, 51, 28,
       50, 32, 48, 22, 43, 21, 12, 14, 27])

Will work with objId=7

&amp;gt;&amp;gt;&amp;gt; pfsConfig.select(catId=0, objId=7).fiberFlux
[array([229086.765625])]
&amp;gt;&amp;gt;&amp;gt; pfsConfig.select(catId=0, objId=7).filterNames
[[&lt;span class=&quot;code-quote&quot;&gt;&apos;i&apos;&lt;/span&gt;]]

So our object is i = 18 mag.

&amp;gt;&amp;gt;&amp;gt; pfsArm = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsArm&quot;&lt;/span&gt;, visit=47, arm=&lt;span class=&quot;code-quote&quot;&gt;&quot;b&quot;&lt;/span&gt;).select(pfsConfig, objId=7, catId=0)
&amp;gt;&amp;gt;&amp;gt; select = (pfsArm.wavelength &amp;gt; 500) &amp;amp; (pfsArm.wavelength &amp;lt; 600)
&amp;gt;&amp;gt;&amp;gt; np.median(pfsArm.flux[select]/pfsArm.norm[select])
0.14605088737010558

&amp;gt;&amp;gt;&amp;gt; pfsMerged = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsMerged&quot;&lt;/span&gt;, visit=47).select(pfsConfig, objId=7, catId=0)
&amp;gt;&amp;gt;&amp;gt; select = (pfsMerged.wavelength &amp;gt; 500) &amp;amp; (pfsMerged.wavelength &amp;lt; 600)
&amp;gt;&amp;gt;&amp;gt; np.median(pfsMerged.flux[select])
5179.929950314969


&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=7, visit=47)
&amp;gt;&amp;gt;&amp;gt; select = (pfsSingle.wavelength &amp;gt; 500) &amp;amp; (pfsSingle.wavelength &amp;lt; 600)
&amp;gt;&amp;gt;&amp;gt; np.median(pfsSingle.flux[select])
0.14152226134165563

&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=7, nVisit=6, pfsVisitHash=0x7ace412dc05971ff)
&amp;gt;&amp;gt;&amp;gt; select = (pfsObject.wavelength &amp;gt; 500) &amp;amp; (pfsObject.wavelength &amp;lt; 600)
&amp;gt;&amp;gt;&amp;gt; np.median(pfsObject.flux[select])
0.0853505067399767

&amp;gt;&amp;gt;&amp;gt; pfsRef = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsReference&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=7)
&amp;gt;&amp;gt;&amp;gt; select = (pfsRef.wavelength &amp;gt; 500) &amp;amp; (pfsRef.wavelength &amp;lt; 600)
&amp;gt;&amp;gt;&amp;gt; np.median(pfsRef.flux[select])
213332.26323327963


The pfsSingle flux is the same as the pfsArm flux, so it must be terribly wrong since pfsArm is uncalibrated and pfsSingle should be in nJy.

Let&lt;span class=&quot;code-quote&quot;&gt;&apos;s first look at the image to make sure there&apos;&lt;/span&gt;s a very bright trace where we expect.

&amp;gt;&amp;gt;&amp;gt; pfsConfig.select(catId=0, objId=7).fiberId
array([112], dtype=int32)
&amp;gt;&amp;gt;&amp;gt; detMap = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;detectorMap&quot;&lt;/span&gt;, visit=47, arm=&lt;span class=&quot;code-quote&quot;&gt;&quot;r&quot;&lt;/span&gt;)

There&lt;span class=&quot;code-quote&quot;&gt;&apos;s definitely a brighter trace there. Not as bright as I thought it would be, but it&apos;&lt;/span&gt;s probably fine.

Found a normalisation bug in fluxCalibrate.

fluxCalibrate.py /scratch/pprice/jenkins/weekly/2021-09-19/process --calib=/scratch/pprice/jenkins/weekly/2021-09-19/process/CALIB --rerun=weekly/pipeline/brn/pipeline --doraise -j10 --id &lt;span class=&quot;code-quote&quot;&gt;&apos;visit=47^48^49^53^54^57&apos;&lt;/span&gt; --no-versions
coaddSpectra.py /scratch/pprice/jenkins/weekly/2021-09-19/process --calib=/scratch/pprice/jenkins/weekly/2021-09-19/process/CALIB --rerun=weekly/pipeline/brn/pipeline --doraise -j10 --id &lt;span class=&quot;code-quote&quot;&gt;&apos;visit=47^48^49^53^54^57&apos;&lt;/span&gt; --no-versions

Now:

&amp;gt;&amp;gt;&amp;gt; np.median(pfsSingle.flux[select])
213804.4453556766
&amp;gt;&amp;gt;&amp;gt; np.median(pfsObject.flux[select])
212780.95413807267
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="22009" author="hassan" created="Thu, 23 Sep 2021 22:07:54 +0000"  >&lt;p&gt;Thanks Paul&lt;/p&gt;</comment>
                            <comment id="22012" author="price" created="Fri, 24 Sep 2021 04:00:10 +0000"  >&lt;p&gt;Merged.&lt;/p&gt;</comment>
                    </comments>
                    <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:508yl0chzzy000002js</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="116">2DDRP-2021 A 8</customfieldvalue>
    <customfieldvalue id="121">2DDRP-2021 A 9</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>