<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:01:16 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-1008] Confirm units of pfsArm flux are electrons/pixel and pfsMerged electrons/nm</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1008</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;The expected units for the &lt;tt&gt;pfsArm&lt;/tt&gt;&#160;is electrons per pixel and &lt;tt&gt;pfsMerged&lt;/tt&gt; files are electrons per nanometre.&lt;/p&gt;

&lt;p&gt;Please go step by step through the 2D DRP code and products, from the raw exposures to the &lt;tt&gt;pfsArm&lt;/tt&gt; and &lt;tt&gt;pfsMerged&lt;/tt&gt; files to confirm that the units of the latter two products are as expected.&lt;/p&gt;

&lt;p&gt;Please document the details of each step in this ticket.&lt;/p&gt;

&lt;p&gt;This is important in general &lt;del&gt;, and to help determine the cause of the b/r flux ratio discrepancy&lt;/del&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="22692">PIPE2D-1008</key>
            <summary>Confirm units of pfsArm flux are electrons/pixel and pfsMerged electrons/nm</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="arnaud.lefur">arnaud.lefur</assignee>
                                    <reporter username="hassan">hassan</reporter>
                        <labels>
                    </labels>
                <created>Tue, 22 Mar 2022 16:46:53 +0000</created>
                <updated>Fri, 19 May 2023 15:01:06 +0000</updated>
                            <resolved>Fri, 19 May 2023 15:01:06 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                <comments>
                            <comment id="30613" author="price" created="Tue, 22 Mar 2022 17:24:02 +0000"  >&lt;p&gt;Units will not be electrons per nm with the code as it currently is.&lt;br/&gt;
Converting ADU to electrons requires specifying the parameter &lt;tt&gt;isr.doApplyGains=True&lt;/tt&gt;.&lt;br/&gt;
The code does not convert to flux density, due to the desire to that the extracted spectra have units matching that of the image.&lt;/p&gt;

&lt;p&gt;Note that &quot;The expected units for the pfsArm and pfsMerged files are electrons per nanometre.&quot; is not specified in &lt;tt&gt;datamodel.txt&lt;/tt&gt;. Rather, the flux units of &lt;tt&gt;pfsArm&lt;/tt&gt; explicitly called out to be &quot;counts&quot;.&lt;/p&gt;</comment>
                            <comment id="30614" author="rhl" created="Tue, 22 Mar 2022 19:04:00 +0000"  >&lt;p&gt;This is about the overall throughput, not the b/r discrepancy. &lt;/p&gt;

&lt;p&gt;Paul&apos;s comments are correct, but the comparison is still valid.  We should be able to interpret the numbers in the pfsArm/pfsMerged files in terms of electrons/nm (and how to do so should be in the datamodel).&lt;/p&gt;</comment>
                            <comment id="30643" author="arnaud.lefur" created="Tue, 29 Mar 2022 23:53:44 +0000"  >&lt;p&gt;So I spend a bit of time looking into this.&lt;br/&gt;
starting from the raw image to the pfsMerged data.&lt;br/&gt;
I&apos;ve used my pseudo ISR, pseudo extraction code to compare with.&lt;br/&gt;
The plots are for visit 72034 which should be moon with offset(d_ra=1 deg)&lt;br/&gt;
I&apos;ve selected a subset of 10 fibers from SUNSS_DIFFUSE.&lt;/p&gt;

&lt;p&gt;on the red arm: &lt;br/&gt;
 spectra : &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15146_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15146/15146_blue-arm+gain-corrected.png&quot; title=&quot;blue-arm gain-corrected.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15146&quot; file-preview-title=&quot;blue-arm gain-corrected.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15144/_thumb_15144.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt; &lt;br/&gt;
ratio of extraction: &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15147_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15147/15147_ratio+between+blue+extraction.png&quot; title=&quot;ratio between blue extraction.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15147&quot; file-preview-title=&quot;ratio between blue extraction.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15145/_thumb_15145.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;
the ratio is close enough to 1, so I think I understand well enough what&apos;s being done.&lt;/p&gt;

&lt;p&gt;on the blue arm:&lt;br/&gt;
spectra: &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15147_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15147/15147_ratio+between+blue+extraction.png&quot; title=&quot;ratio between blue extraction.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15147&quot; file-preview-title=&quot;ratio between blue extraction.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15146/_thumb_15146.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt; &lt;br/&gt;
ratio of extraction : &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15149_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15149/15149_pfsArms_vs_pfsMerged.png&quot; title=&quot;pfsArms_vs_pfsMerged.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15149&quot; file-preview-title=&quot;pfsArms_vs_pfsMerged.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15147/_thumb_15147.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt; &lt;br/&gt;
here I&apos;m being penalized by the a bad detectorMap on the blue end, which is useful to know, but not really the point here.&lt;/p&gt;

&lt;p&gt;Anyhow, from what I&apos;m seeing, I confirm Paul statement, the pfsArm fluxes are in counts (or electrons if doApplyGains).&lt;/p&gt;

&lt;p&gt;Regarding, pfsMerged :&lt;br/&gt;
 &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15152_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15152/15152_pfsArm_extraction_compared.png&quot; title=&quot;pfsArm_extraction_compared.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15152&quot; file-preview-title=&quot;pfsArm_extraction_compared.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15149/_thumb_15149.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt; &lt;br/&gt;
I end up with the same numbers if I divide the flux by the spectral resolution (nm per pixel)  which gives me flux in electrons/nm &lt;br/&gt;
 &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15153_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15153/15153_pixel_per_nm.png&quot; title=&quot;pixel_per_nm.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15153&quot; file-preview-title=&quot;pixel_per_nm.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15150/_thumb_15150.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;
 This balance slightly the flux between the two arms, but the absolute value is now ~12 times higher.&lt;br/&gt;
To get back on my feet, I just need to correct so that the totalFlux of the mergedArm stay constant.&lt;/p&gt;</comment>
                            <comment id="30659" author="rhl" created="Wed, 30 Mar 2022 20:20:44 +0000"  >&lt;p&gt;Looks good, but I&apos;m still slightly confused.&lt;/p&gt;

&lt;p&gt;You&apos;re plotting the pfsArm files against wavelength, but not applying a Jacobian, so are you really plotting per row, but labelling the rows with the corresponding wavelength?&lt;/p&gt;

&lt;p&gt;What happened with 477 in the blue?  A bad detector map everywhere?  Which rerun/calib are you using for this work?&lt;/p&gt;

&lt;p&gt;In the pfsMerged files, the units should be electrons/nm which is easy to think about away from the dichroics.  Is this what you observe? What is the factor of c. 12 coming from?  pixels to nm?&lt;/p&gt;</comment>
                            <comment id="30660" author="arnaud.lefur" created="Wed, 30 Mar 2022 23:02:08 +0000"  >&lt;p&gt;&lt;cite&gt;You&apos;re plotting the pfsArm files against wavelength, but not applying a Jacobian, so are you really plotting per row, but labelling the rows with the corresponding wavelength&lt;/cite&gt;?&lt;br/&gt;
Right exactly, for the pfsArm, the x-axis can be either &lt;em&gt;range(4176)&lt;/em&gt; (row number) or the matching wavelength for each row. &lt;/p&gt;

&lt;p&gt;&lt;cite&gt;What happened with 477 in the blue? A bad detector map everywhere? Which rerun/calib are you using for this work&lt;/cite&gt;?&lt;br/&gt;
Do you mean fiber 6 ? I checked a bit closely and I don&apos;t understand what&apos;s happening with the measured flux, the detectorMap is actually pretty good for that fiber pretty much all the way. If you compare fiber 6 and 296 which appear to have a very similar throughput :&lt;br/&gt;
&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15152_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15152/15152_pfsArm_extraction_compared.png&quot; title=&quot;pfsArm_extraction_compared.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15152&quot; file-preview-title=&quot;pfsArm_extraction_compared.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15152/_thumb_15152.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt; &lt;br/&gt;
you can see that the dotted line are pretty much consistent, from the pipeline, 296 is bad on the blue end which I blame the detectorMap for but 6 is bad at the red end and the detectorMap is not that bad there.&lt;br/&gt;
Also we can see small bands where the flux drops to 0, might be fiberProfiles ? &lt;br/&gt;
I&apos;ve used hassan&apos;s: &lt;em&gt;CALIB-SuNSS-20220322-dev&lt;/em&gt;  , rerun: &lt;em&gt;alefur/pipe2d-1008-new&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;cite&gt;In the pfsMerged files, the units should be electrons/nm which is easy to think about away from the dichroics. Is this what you observe? What is the factor of c. 12 coming from? pixels to nm&lt;/cite&gt;?&lt;/p&gt;

&lt;p&gt;right, I just divided the pfsArm flux (e-/row) by the spectral resolution (nm/row) (or multiplied by this curve  &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15153_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15153/15153_pixel_per_nm.png&quot; title=&quot;pixel_per_nm.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15153&quot; file-preview-title=&quot;pixel_per_nm.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15153/_thumb_15153.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt; )&lt;br/&gt;
that should be e-/nm strictly speaking so I did not apply any normalization after that.&lt;/p&gt;


</comment>
                            <comment id="30664" author="rhl" created="Thu, 31 Mar 2022 13:27:23 +0000"  >&lt;p&gt;We should get to the bottom of fibre 6 (sorry, I mis-read the legend).  It could be a problem in the fiberTrace or the normalisation or ...&lt;/p&gt;

&lt;p&gt;The dropouts matter too.  This is not unrelated to &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1015&quot; title=&quot;Mask bit flags not propagated to pfsArm correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1015&quot;&gt;&lt;del&gt;PIPE2D-1015&lt;/del&gt;&lt;/a&gt; &amp;#8211; there should be a bit set wherever we don&apos;t accurately extract the flux.&lt;/p&gt;

&lt;p&gt;I still don&apos;t understand the pfsMerged case.  The fluxes should be in e/nm and your values should agree with the pfsMerged everywhere except where the dichroic matters.  So the blue and red side should agree, and not have any structure with lambda or arm.   &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;: what am I missing?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="22735">PIPE2D-1024</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="15504">PIPE2D-799</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="16881">DAMD-113</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="15146" name="blue-arm gain-corrected.png" size="127628" author="arnaud.lefur" created="Tue, 29 Mar 2022 22:44:31 +0000"/>
                            <attachment id="15152" name="pfsArm_extraction_compared.png" size="124762" author="arnaud.lefur" created="Wed, 30 Mar 2022 22:23:09 +0000"/>
                            <attachment id="15149" name="pfsArms_vs_pfsMerged.png" size="52971" author="arnaud.lefur" created="Tue, 29 Mar 2022 23:28:00 +0000"/>
                            <attachment id="15153" name="pixel_per_nm.png" size="22932" author="arnaud.lefur" created="Wed, 30 Mar 2022 22:52:37 +0000"/>
                            <attachment id="15147" name="ratio between blue extraction.png" size="102181" author="arnaud.lefur" created="Tue, 29 Mar 2022 22:46:10 +0000"/>
                            <attachment id="15145" name="ratio between red extraction.png" size="101838" author="arnaud.lefur" created="Tue, 29 Mar 2022 22:34:31 +0000"/>
                            <attachment id="15144" name="red-arm gain-corrected.png" size="127612" author="arnaud.lefur" created="Tue, 29 Mar 2022 22:32:32 +0000"/>
                            <attachment id="15150" name="spectral_resolution_621.png" size="24201" author="arnaud.lefur" created="Tue, 29 Mar 2022 23:34:35 +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|02qpjd:00r20060i2001800009</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10005" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="137">2DDRP-2022 C</customfieldvalue>
    <customfieldvalue id="142">2DDRP-2022 D</customfieldvalue>
    <customfieldvalue id="147">2DDRP-2022 E</customfieldvalue>
    <customfieldvalue id="151">2DDRP-2022 F</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>