<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:04:25 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-1221] Create fiber flats from 2023 Apr/May engineering data</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1221</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;During the 2023 Apr/May engineering run, we obtained data from which to generate fiber flats for n1. Build fiber flats and install in a new calib repository (&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1216&quot; title=&quot;Create calibs in support of 2023 Apr/May engineering run&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1216&quot;&gt;&lt;del&gt;PIPE2D-1216&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;</description>
                <environment></environment>
        <key id="23437">PIPE2D-1221</key>
            <summary>Create fiber flats from 2023 Apr/May engineering data</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, 12 May 2023 17:52:45 +0000</created>
                <updated>Fri, 26 May 2023 15:51:50 +0000</updated>
                            <resolved>Fri, 26 May 2023 15:51:50 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="32676" author="rhl" created="Fri, 12 May 2023 18:30:45 +0000"  >&lt;p&gt;How does this relate to &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1194&quot; title=&quot;Generate flat fields for n1&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1194&quot;&gt;PIPE2D-1194&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="32678" author="price" created="Fri, 12 May 2023 18:33:09 +0000"  >&lt;p&gt;That one says &quot;based on lab flats&quot;. It may not be necessary once these are available, but I don&apos;t know the true goal of that ticket (looks like something to do with persistence).&lt;/p&gt;</comment>
                            <comment id="32698" author="price" created="Tue, 16 May 2023 17:47:49 +0000"  >&lt;p&gt;From my notes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Running the following with &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1205&quot; title=&quot;Improve the ISR for the HgCdTe detectors on the 2023-04 run&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1205&quot;&gt;&lt;del&gt;PIPE2D-1205&lt;/del&gt;&lt;/a&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;
constructFiberFlat.py /work/drp --calib=/work/price/CALIB-202304-eng --rerun=price/pipe2d-1221 --id visit=91203..91235:2^91292..91339:2 arm=n spectrograph=1 --cores 50 -c profiles.profileSwath=2000 profiles.profileOversample=5 minSNR=20 profiles.pruneMinLength=3000 profiles.associationDepth=100
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Having problems with transactions, and then it can&apos;t find a dark.&lt;br/&gt;
There&apos;s a dark with a bad name: &lt;tt&gt;pfsDark-2023-04-19T16:32:16.617-000000-n1.fits&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Let&apos;s build a new dark.&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;
(lsst-scipipe-3.0.0) price@pfsa-usr02-gb:/work/price/CALIB-202304-eng/DARK $ rm pfsDark-2023-04-19T16\:32\:16.617-000000-n1.fits
sqlite&amp;gt; DELETE FROM dark WHERE arm = &lt;span class=&quot;code-quote&quot;&gt;&quot;n&quot;&lt;/span&gt;;
sqlite&amp;gt; DELETE FROM dark_visit WHERE arm = &lt;span class=&quot;code-quote&quot;&gt;&quot;n&quot;&lt;/span&gt;;

constructPfsDark.py /work/drp --calib /work/price/CALIB-202304-eng --rerun price/pipe2d-1221 --id visit=90792..90797 arm=n --batch-type=none
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That worked, and looks like the name is correct.&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;
ingestPfsCalibs.py /work/drp --calib /work/price/CALIB-202304-eng /work/drp/rerun/price/pipe2d-1221/DARK/pfsDark-2023-04-19-090792-n1.fits --validity 1000 --mode=copy -c clobber=True
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Back to the flat.&lt;br/&gt;
Final result looks good.&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;
sqlite&amp;gt; DELETE FROM flat WHERE arm = &lt;span class=&quot;code-quote&quot;&gt;&quot;n&quot;&lt;/span&gt;;
sqlite&amp;gt; DELETE FROM flat_visit WHERE arm = &lt;span class=&quot;code-quote&quot;&gt;&quot;n&quot;&lt;/span&gt;;

ingestPfsCalibs.py /work/drp --calib /work/price/CALIB-202304-eng /work/drp/rerun/price/pipe2d-1221/FLAT/pfsFlat-2023-04-23-091203-n1.fits --validity 1000 --mode=copy -c clobber=True
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;</comment>
                            <comment id="32699" author="price" created="Wed, 17 May 2023 19:31:33 +0000"  >&lt;p&gt;The new n1 flat doesn&#8217;t serve to flatten the data: the &#8220;flattened&#8221; data still has strong detector features visible. I&#8217;m thinking that this must be the result of persistence, but perhaps I&#8217;ve missed something?&lt;br/&gt;
 In the below plot, I&#8217;ve taken two points on the detector (one is deliberately selected to be on a strong positive feature in the flat), separated by 6 pixels (about one fiber) horizontally. I&#8217;ve found fiber traces on the image, and then used the traces and extracted spectra to create a model for the image. I&#8217;ve divided the image by the model to give a normalised image, and then plotted the mean and ratio of the values on the normalised image at the two points of interest. We have multiple images as the slit is dithered, giving many points, but there is not a consistent ratio of flux between the two points (despite the fixed distance between them in the spatial dimension). The black cross is the corresponding point for the flat-field image.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15632/15632_image+%288%29.png&quot; width=&quot;900&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="32700" author="rhl" created="Wed, 17 May 2023 20:11:22 +0000"  >&lt;p&gt;Can we see some images too, please?&lt;/p&gt;</comment>
                            <comment id="32701" author="price" created="Wed, 17 May 2023 20:36:16 +0000"  >&lt;p&gt;In the below image,&#160;the unflattened image is shown on the left, and the flattened image is on the right.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15633/15633_91594n1_flat_noFlat.jpg&quot; width=&quot;900&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="32702" author="rhl" created="Wed, 17 May 2023 20:39:11 +0000"  >&lt;p&gt;That&apos;s depressing.   What does the flat look like?&lt;/p&gt;</comment>
                            <comment id="32703" author="price" created="Wed, 17 May 2023 20:47:24 +0000"  >&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15634/15634_91594n1_noFlat_flattened_flat.jpeg&quot; width=&quot;900&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="32704" author="rhl" created="Wed, 17 May 2023 20:50:04 +0000"  >&lt;p&gt;What&apos;s the ratio of the pre- and post-flattened images?  The flat looks fine, so I don&apos;t understand why it didn&apos;t work better.  With proper handling of 0/0&lt;/p&gt;</comment>
                            <comment id="32705" author="price" created="Wed, 17 May 2023 20:59:14 +0000"  >&lt;p&gt;The ratio of the pre- and post-flattened images is the flat.&lt;/p&gt;

&lt;p&gt;If you look carefully, the flat has removed high-frequency structure. The bright features are smeared out in the post-flattened image.&lt;/p&gt;</comment>
                            <comment id="32706" author="rhl" created="Wed, 17 May 2023 21:02:27 +0000"  >&lt;p&gt;Yes, the ratio should be the flat modulo bugs.  However, something is wrong.   If you take two quartz exposures and divide one by the other you should get something close to unity;  right?  Your findings suggest that the dithered flat code isn&apos;t equivalent to that procedure.&lt;/p&gt;</comment>
                            <comment id="32757" author="price" created="Fri, 26 May 2023 15:51:50 +0000"  >&lt;p&gt;The problem was due to the normalisation of the individual exposures, wherein we measure the fiber profile, extract spectra, and produce a model image which we use to normalise the exposure. This process naturally samples things nicely in the spatial dimension (through the combination of reducing every row of every fiber to a single number, and then dithering). The problem is that because we have been dividing by the actual spectra, the normalised image didn&apos;t contain any structure in the spectral dimension. I&apos;ve been trying to deal with that by applying a median filter to each spectrum, and I like the results I get with a median filter of half-width 400 pixels. &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=rhl&quot; class=&quot;user-hover&quot; rel=&quot;rhl&quot;&gt;rhl&lt;/a&gt; has suggested we normalise by an average spectrum, which will require future developement (&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1226&quot; title=&quot;Use average spectrum to normalise traces for flat fields&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1226&quot;&gt;PIPE2D-1226&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;I have installed the flats in &lt;tt&gt;CALIB-2023-04-v2&lt;/tt&gt;.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="15633" name="91594n1_flat_noFlat.jpg" size="559696" author="price" created="Wed, 17 May 2023 20:32:52 +0000"/>
                            <attachment id="15634" name="91594n1_noFlat_flattened_flat.jpeg" size="110225" author="price" created="Wed, 17 May 2023 20:46:43 +0000"/>
                            <attachment id="15632" name="image (8).png" size="87072" author="price" created="Wed, 17 May 2023 19:30:19 +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|zzsx6f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>