<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:59: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>[PIPE2D-891] Investigate line flux repeatability</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-891</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;Determine how repeatable 2D line flux measurements are, and what is limiting this repeatability.&lt;/p&gt;</description>
                <environment></environment>
        <key id="17008">PIPE2D-891</key>
            <summary>Investigate line flux repeatability</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>Wed, 25 Aug 2021 21:04:06 +0000</created>
                <updated>Thu, 30 Sep 2021 14:55:59 +0000</updated>
                            <resolved>Thu, 23 Sep 2021 19:27:29 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                <comments>
                            <comment id="22000" author="price" created="Thu, 23 Sep 2021 03:02:08 +0000"  >&lt;p&gt;I followed multiple ideas to improve the flux measurements, many of which were based in improving the detectorMaps:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;add &lt;tt&gt;DoubleDetectorMap&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;deblend when centroiding&lt;/li&gt;
	&lt;li&gt;flag lines with bad pixels when photometering&lt;/li&gt;
	&lt;li&gt;review line list&lt;/li&gt;
	&lt;li&gt;signal-to-noise cut in fitting detectorMap&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In the end, I got down to about &lt;tt&gt;xSys=0.016 ySys=0.037&lt;/tt&gt; in fitting the detectorMap using sky lines (with &lt;tt&gt;readLineList.exclusionRadius=0.2&lt;/tt&gt;):&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;
reduceExposure.adjustDetectorMap INFO: Final fit: chi2=54099.876549 dof=23522 xRMS=0.024463 yRMS=0.037982 (0.003280 nm) from 11773/15601 lines
reduceExposure.adjustDetectorMap INFO: Fit quality from reserved lines: chi2=614201.080218 xRMS=0.024387 yRMS=0.064839 (0.005599 nm) from 1733 lines (10.0%)
reduceExposure.adjustDetectorMap INFO: Softening errors by x=0.016433, y=0.036511 pixels (0.003153 nm) to yield chi^2/dof=1
reduceExposure.adjustDetectorMap INFO: Softened fit: chi2=23387.268754 dof=23522 xRMS=0.025453 yRMS=0.042447 (0.003665 nm) from 11773 lines
reduceExposure.adjustDetectorMap INFO: Softened fit quality from reserved lines: chi2=244358.657181 xRMS=0.024418 yRMS=0.064045 (0.005530 nm) from 1733 lines
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The difference between &lt;tt&gt;xSys&lt;/tt&gt; and &lt;tt&gt;ySys&lt;/tt&gt; likely indicates that there&apos;s more to be gained, but I&apos;m not sure where yet. (&lt;tt&gt;xSys =~ ySys&lt;/tt&gt; on arc lines, so the problem is intrinsic to the sky.)&lt;/p&gt;

&lt;p&gt;With that detectorMap, I then get much better photometry, though still not ideal: chi^2 for the worst line fluxes is about 30 over five fibers, and that&apos;s when I include a 1% systematic floor (although before this work, the worst chi^2 was tens of thousands). It&apos;s possible that small inaccuracies in the PSF model are causing extra noise, and I think adding aperture corrections is the next step: if the fidelity of the PSF varies as a function of fiber or position within a fiber (which could be due to the PSF model failing to follow real variation, or the PSF model variation not being accurate), then we need aperture corrections.&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;import&lt;/span&gt; numpy as np
from pfs.drp.stella &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; ArcLineSet
lines = ArcLineSet.readFits(&lt;span class=&quot;code-quote&quot;&gt;&quot;arcLines-046588-r1.fits&quot;&lt;/span&gt;)
select = np.isin(lines.fiberId, (255, 401, 464, 525, 587)) &amp;amp; np.isfinite(lines.intensity) &amp;amp; np.isfinite(lines.intensityErr) &amp;amp; (lines.status == 0) &amp;amp; ~lines.flag
intensityErr = np.where(lines.intensityErr &amp;gt; 0.01*lines.intensity, lines.intensityErr, 0.01*lines.intensity)
mean = {}
chi2 = {}
&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; wl in set(lines.wavelength[select]):
    choose = select &amp;amp; (lines.wavelength == wl)
    weight = 1.0/intensityErr[choose]**2
    mean[wl] = np.sum(lines.intensity[choose]*weight)/weight.sum()
    chi2[wl] = (((lines.intensity[choose] - mean[wl])/intensityErr[choose])**2).sum()

worst = sorted(chi2.keys(), key=lambda wl: chi2[wl], reverse=True)
print([(wl, chi2[wl]) &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; wl in worst[:10]])
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;yields the result:&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;
[(753.27865, 30.999020699146175), (777.551, 30.257735938302954), (734.2907, 29.114637957334242), (885.22485, 25.031808119535704), (846.76845, 22.07350674889075), (691.45295, 21.767605415662246), (737.13955, 18.922802997897875), (854.10225, 18.811584139994014), (894.58505, 17.468980257836517), (961.0362, 16.9003032349872)]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
</comment>
                            <comment id="22001" author="price" created="Thu, 23 Sep 2021 04:14:18 +0000"  >&lt;p&gt;Oh, I should mention that the OH doublets that we combined into single lines in our linelist are typically separated by something like a tenth (e.g., 6923.152+6923.287) to a few tenths (e.g., 7401.688+7402.029) of an Angstrom, which is about a tenth of a pixel to a few tenths of a pixel in &lt;tt&gt;arm=r&lt;/tt&gt;, so maybe we shouldn&apos;t be surprised that there&apos;s an additional 0.03 pixel systematic error in the spectral dimension compared to the spatial. Centroiding on galaxies is noisier than centroiding on stars. Not sure if the measurement errors should account for that or not, but I don&apos;t think we need to worry too much.&lt;/p&gt;</comment>
                            <comment id="22003" author="hassan" created="Thu, 23 Sep 2021 18:46:19 +0000"  >&lt;p&gt;Reviewed the changes in pfs_utils specifically to allow the repair of the integration test. Those specific changes are fine.&lt;/p&gt;</comment>
                            <comment id="22004" author="hassan" created="Thu, 23 Sep 2021 19:00:29 +0000"  >&lt;p&gt;Now all changes approved. No major comments.&lt;/p&gt;</comment>
                            <comment id="22005" author="price" created="Thu, 23 Sep 2021 19:27:29 +0000"  >&lt;p&gt;Merged.&lt;/p&gt;</comment>
                            <comment id="22198" author="rhl" created="Thu, 30 Sep 2021 13:22:14 +0000"  >&lt;p&gt;I&apos;m not sure that the blending is to blame.  The raw centroid error will be a bit worse, but the code should be handling that (it&apos;s proportional to the FWHM/(SN)), but that should be very small for bright lines.  The usual problem with galaxies is that the PSF changes, and that that changes the bias for the galaxy centroid.  Is there any evidence of this?&lt;/p&gt;</comment>
                            <comment id="22199" author="price" created="Thu, 30 Sep 2021 13:24:59 +0000"  >&lt;p&gt;Adding the deblender made very little difference, if any.&lt;/p&gt;</comment>
                            <comment id="22200" author="rhl" created="Thu, 30 Sep 2021 14:05:13 +0000"  >&lt;p&gt;I&apos;m not sure that I understand.  You mean, simultaneous fitting of a double-line model with known splittings didn&apos;t improve the centroid repeatability?&lt;/p&gt;</comment>
                            <comment id="22201" author="price" created="Thu, 30 Sep 2021 14:41:23 +0000"  >&lt;p&gt;No, I mean adding an SDSS-style deblender (removing pixels that don&apos;t belong to the peak of interest) didn&apos;t help.&lt;/p&gt;</comment>
                            <comment id="22204" author="rhl" created="Thu, 30 Sep 2021 14:55:59 +0000"  >&lt;p&gt;I don&apos;t think I&apos;d do that!  This is much closer to forced-photometry part of the the crowded field problem, with low-spatial order tweaks to the &quot;astrometry&quot;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="15585">PIPE2D-829</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:508yl0chzzy000002jr</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        </customfields>
    </item>
</channel>
</rss>