<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:54:14 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-509] How much do we need to defocus in order to measure change of effective frd</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-509</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;The task is to analyze and find how much defocus is needed in order to measure the realistic change of frd, in realistic conditions. This is to be done with our current knowledge about the system and with the 2d psf modeling code.&#160;&lt;/p&gt;

&lt;p&gt;The task includes (we might break this into finer additional tickets):&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;determining what values of frd change we expect and what level do we need to measure (we might need to solicit some input from Jim on this)&lt;/li&gt;
	&lt;li&gt;Determine defocus values that allow to measure these changes as a function of signal-noise and position on the detector (center, edges...)&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;This is rehashing of &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-452&quot; title=&quot;Develop methods to quickly estimate effective FRD from defocused images&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-452&quot;&gt;&lt;del&gt;PIPE2D-452&lt;/del&gt;&lt;/a&gt;&#160;updated to signify updated constraints and the transfer of this work to Caltech&lt;/p&gt;</description>
                <environment></environment>
        <key id="14194">PIPE2D-509</key>
            <summary>How much do we need to defocus in order to measure change of effective frd</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="1" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="bbelland">Brent Belland</assignee>
                                    <reporter username="ncaplar">ncaplar</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 Jan 2020 14:32:42 +0000</created>
                <updated>Thu, 13 Jan 2022 14:40:20 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                <comments>
                            <comment id="16644" author="ncaplar" created="Mon, 27 Jan 2020 14:57:05 +0000"  >&lt;p&gt;I have placed pandas dataframe describing the spots across the detector at [https://github.com/Subaru-PFS/dev_2ddrp/tree/master/2d_PSF_code/Data/results_of_fit_many_interpolation_HgAr_from_Dec04.pkl|https://github.com/Subaru-PFS/dev_2ddrp/tree/master/2d_PSF_code/Data/[results_of_fit_many_interpolation_HgAr_from_Dec04.pkl]. Brent you can load it by&#160;&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; pickle
 DATAFRAMES_FOLDER=&lt;span class=&quot;code-quote&quot;&gt;&apos;/Users/nevencaplar/Documents/PFS/Fit_Results/Dec040119/&apos;&lt;/span&gt;
 with open(DATAFRAMES_FOLDER+&lt;span class=&quot;code-quote&quot;&gt;&apos;results_of_fit_many_interpolation_HgAr_from_Dec04.pkl&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;rb&apos;&lt;/span&gt;) as f:
 &#160; &#160; results_of_fit_many_interpolation_HgAr_from_Dec04=pickle.load(f)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;where you replace the path in `DATAFRAMES_FOLDER` to where you have placed the file. Then you can access the values for each defocus by specifying in the label e.g.,&#160;&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;
results_of_fit_many_interpolation_HgAr_from_Dec04[&lt;span class=&quot;code-quote&quot;&gt;&apos;m1&apos;&lt;/span&gt;]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;would give the values of parameters at minus 1 mm of slit defocus at LAM. Other values are m45,m4,m35,m3,m25,m2,m15,m1,m05,0,p05,p1,p15,p2,p25,p3,p35,p4,p45. I recommend that at the start you use values for spot 1 (spot in the lower left corner of the detector ) and spot 55 (roughly in the center). To get values for these spots at a given defocus one would do something like&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;
results_of_fit_many_interpolation_HgAr_from_Dec04[&lt;span class=&quot;code-quote&quot;&gt;&apos;p35&apos;&lt;/span&gt;].loc[1]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;to get, for instance, values for spot 1, at plus 3.5 mm defocus of slit at LAM.&#160;&lt;/p&gt;</comment>
                            <comment id="16653" author="bbelland" created="Fri, 31 Jan 2020 22:19:15 +0000"  >&lt;p&gt;As to work on part 1: Based on a report&#160;PFS-PFI-IPM000003-02_SuccessCriteriaCobraModuleFRDandRelativeThroughput I find that cable A has an expected average FRD of 10 mrad and Cable B has an expected average FRD of 17 mrad. Cable C has an average of 10 mrad; two ~10 mrad angular misalignments in connections between cables are introduced. Variations in Cobra angular error and nontelecentricity as well as uncertainties in Cable C FRD (standard deviation of 2 mrad) can be incorporated.&lt;/p&gt;

&lt;p&gt;An overall range of FRD in a single fiber with variation in angle. The&#160;&lt;/p&gt;

&lt;p&gt;In an very extreme minimum case, FRD^2 ~ 100+289+36+0+100 ~&amp;gt; FRD of 20 mrad (no Cobra angular misalignment + perfect C cable)&lt;/p&gt;

&lt;p&gt;Then for the most variation in that fiber, FRD^2 ~ 100+289+36+312.5+100 ~&amp;gt; FRD of 29 mrad (high end of Cobra angular misalignment)&lt;/p&gt;

&lt;p&gt;Notably, an extreme maximal case of FRD^2 ~ 100+289+196+312.5+100 ~&amp;gt; FRD of 32 mrad. (max Cobra angular misalignment + high FRD C cable) if a stress were imposed on the cable.&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;I&apos;ll post an image detailing how FRD and angle vary soon.&lt;/p&gt;

&lt;p&gt;As to part 2: I had an issue reading the files which was entirely on my end; python incompatibility. Updated my python but completing the upgrade will take a bit of time. I can access all of the data though and am starting to go through it.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="16860" author="bbelland" created="Mon, 16 Mar 2020 13:34:49 +0000"  >&lt;p&gt;I&apos;ve run tests to calculate the change in FRD. To calculate the change in profile, I took the residual of images generated in Neven&#8217;s 2D-DRP code at varying FRD values . Zernike coefficients provided by Neven from LAM data in the HgAr lamp on December 4th were used to accurately simulate the profile images.&lt;/p&gt;

&lt;p&gt;Variations in FRD were considered over a variety of defocus values (0-4 mm in steps of 0.5 mm) and signal to noise ratio. Noise was modeled as Poisson noise plus a read noise of ~6.5 counts (40 counts in variance), and signal was increased from scaling the brightest pixel in each image to a uniform value.&lt;/p&gt;

&lt;p&gt;For uniformity, initial FRD was taken to be the value from the FRD data. The corresponding value of sigma_FRD in the data is 0.0603; converting from this code value to a real value of FRD using the logic in &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-508&quot; title=&quot;Find out translation from real frd to `frd_sigma` parameter 2d psf_model &quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-508&quot;&gt;&lt;del&gt;PIPE2D-508&lt;/del&gt;&lt;/a&gt; yields an effective FRD of 0.17857*sqrt(2)*0.0603/0.92 ~ 16.5 milliradians, assuming an input f/number of 2.8. Then, FRD was scaled up and down from this value: 0.8 times this FRD (13.2 milliradians) to 1.2 times this FRD (19.9 milliradians).&lt;/p&gt;

&lt;p&gt;Chi squared was selected as an appropriate metric to characterize the FRD image residuals as it could be meaningfully applied across images at varying defocus and did not depend on any local features in the pupil images. However, at larger defocus the residuals across FRD have a distinct structure that could be utilized in both distinguishing FRD from competing effects and approximating FRD changes in a linear approximation fashion. Work in this area is ongoing.&lt;/p&gt;

&lt;p&gt;Detectability was quantified by measuring the standard deviation of the averaged chi squared metric when just the noise data was considered. Only pixels brighter than a threshold of ~2% maximum brightness plus read noise were considered in the chi squared calculation, since the addition of pixels outside the image decreases the effective The detectability criterion was taken to be three times this standard deviation at every defocus. At smaller defocus, the standard deviation in chi squared is larger due to the lower number of pixels, which matches intuition that changes in the PSF are harder to detect at low defocus.&lt;/p&gt;

&lt;p&gt;Variations of Chi squared versus defocus at four signals are shown in FRD_Change_Detect_Center. Note that the Chi squared axis is logarithmic and not the same between plots. Error bars for a given FRD indicate the 16%-84% percentile of Chi squared variation at that combination of defocus, SNR, and FRD over 100 trials.&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/12526/12526_image-2020-03-16-06-34-09-667.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Even at brightest signal of 60000 counts (~90% of the saturation limit of 65k counts), a defocus of 1mm is required to reasonably confidently detect a change on the order of 1.5 mrad, but at lower signal a larger defocus is required.&lt;/p&gt;</comment>
                            <comment id="16861" author="bbelland" created="Mon, 16 Mar 2020 13:39:16 +0000"  >&lt;p&gt;To visualize the residual variation with FRD change, Residuals_Analysis was also uploaded. This indicates the FRD images at 16.5 mrad FRD (top left), 31.0 mrad FRD (top right), noise residual (bottom left) and image residual (bottom right). While FRD change is more extreme than would be expected in the PFS, the structure of the residuals is very apparent. Smaller FRD changes have similar residuals at smaller magnitudes and are a promising avenue to speed up the analysis and robustly detect FRD variation.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;12533_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/12533/12533_FRD_Change_Detect_Corner.png&quot; title=&quot;FRD_Change_Detect_Corner.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;12533&quot; file-preview-title=&quot;FRD_Change_Detect_Corner.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/12527/_thumb_12527.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="16862" author="bbelland" created="Mon, 16 Mar 2020 13:41:48 +0000"  >&lt;p&gt;A basic example of the masking used in the chi squared calculation is shown below in Masking_Simple. An image example spectrograph image is shown above, and the selected pixels for the analysis are shown below in yellow. Pixels on the order of brightness of the background are not considered in the analysis.&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/12529/12529_image-2020-03-16-10-53-22-346.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="16903" author="bbelland" created="Wed, 18 Mar 2020 18:04:53 +0000"  >&lt;p&gt;Below are plots that correspond to the FRD change detectability at a corner of the spectrograph. It seems like it&apos;s actually easier to detect changes near the edges, but I plan on investigating at other locations as well.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;12532_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/12532/12532_Residuals_Analysis_Corner.png&quot; title=&quot;Residuals_Analysis_Corner.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;12532&quot; file-preview-title=&quot;Residuals_Analysis_Corner.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/12533/_thumb_12533.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;12532_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/12532/12532_Residuals_Analysis_Corner.png&quot; title=&quot;Residuals_Analysis_Corner.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;12532&quot; file-preview-title=&quot;Residuals_Analysis_Corner.png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/12532/_thumb_12532.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="16967" author="bbelland" created="Mon, 30 Mar 2020 23:25:06 +0000"  >&lt;p&gt;Changes in FRD (even on the order of 1.5 mrad) are readily detectable at ~60000 counts at defocuses &amp;gt;= 1mm. The amount of defocus needed to measure changes in FRD seems to be quantified to a degree that this purpose of the ticket is answered.&#160;&lt;/p&gt;

&lt;p&gt;However, from a conversation with Jim and Neven, the current focus of the investigation should be on FRD-induced variations on the PSF when the instrument is at or near focus (&amp;lt; 1mm). This work relates to &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-285&quot; title=&quot;Quantify the effect of FRD variations on the PSF&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-285&quot;&gt;&lt;del&gt;PIPE2D-285&lt;/del&gt;&lt;/a&gt;, but this new work will have its own ticket.&lt;/p&gt;

&lt;p&gt;This ticket will be closed with future work added to upcoming tickets.&lt;/p&gt;</comment>
                            <comment id="16968" author="rhl" created="Tue, 31 Mar 2020 14:22:30 +0000"  >&lt;p&gt;You should be able to convert &quot;readily detectable&quot; into a quantitative statement about the in-focus PSFs given Neven&apos;s optical model, or possibly even a simple pupil model and perfect optics.  Do you have any feeling for the size of the effect?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="14193">PIPE2D-508</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="14371">PIPE2D-574</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="12634">PIPE2D-285</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="13758">PIPE2D-452</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="12533" name="FRD_Change_Detect_Corner.png" size="144618" author="bbelland" created="Wed, 18 Mar 2020 18:04:22 +0000"/>
                            <attachment id="12526" name="image-2020-03-16-06-34-09-667.png" size="137160" author="bbelland" created="Mon, 16 Mar 2020 13:34:11 +0000"/>
                            <attachment id="12528" name="image-2020-03-16-06-41-39-796.png" size="46587" author="bbelland" created="Mon, 16 Mar 2020 13:41:40 +0000"/>
                            <attachment id="12529" name="image-2020-03-16-10-53-22-346.png" size="42488" author="bbelland" created="Mon, 16 Mar 2020 17:53:22 +0000"/>
                            <attachment id="12532" name="Residuals_Analysis_Corner.png" size="242572" author="bbelland" created="Wed, 18 Mar 2020 18:04:22 +0000"/>
                            <attachment id="12527" name="Residuals_Analysis.png" size="124269" author="bbelland" created="Mon, 16 Mar 2020 13:36:02 +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|02qpq3:r3s2r</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10005" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="93">2DDRP-2021 A</customfieldvalue>

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