<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:05:32 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-1289] Refactor fitting of detectorMaps to specify what should be fit</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1289</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;We need to be able to simply specify what elements of a detectorMap are to be fit.&lt;/p&gt;</description>
                <environment></environment>
        <key id="23814">PIPE2D-1289</key>
            <summary>Refactor fitting of detectorMaps to specify what should be fit</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>
                            <label>EngRun</label>
                    </labels>
                <created>Tue, 29 Aug 2023 00:25:08 +0000</created>
                <updated>Sat, 30 Sep 2023 00:37:58 +0000</updated>
                            <resolved>Sat, 30 Sep 2023 00:37:58 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="35156" author="price" created="Wed, 20 Sep 2023 19:53:52 +0000"  >&lt;p&gt;detectorMap fitting occurs in two contexts: fitDetectorMap (called by reduceArc) and adjustDetectorMap (called by reduceExposure, etc).&lt;br/&gt;
fitDetectorMap fits separately a distortion field (PolynomialDistortion or DoubleDistortion, depending on whether the detector is monolithic or not) and a set of slit offsets in x and y. The distortion field is fit by solving a linear least-squares matrix problem, and the current user control consists solely of selecting the polynomial order (which is identical in x and y). The slit offsets are fit by iteratively measuring the mean residual after removing the distortion field, and the current user control consists solely of selecting whether the slit offsets will be fit or not.&lt;br/&gt;
adjustDetectorMap fits a distortion field (RotScaleDistortion or DoubleRotScaleDistortion, depending on whether the detector is monolithic or not). The distortion field is fit by solving a linear least-squares matrix problem, and there is no user control beyond turning this task on or off.&lt;/p&gt;

&lt;p&gt;In order to satisfy the requirements introduced by this ticket, I propose to:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;add an array of booleans to the linear least-squares fitting (PolynomialDistortion, DoubleDistortion, RotScaleDistortion, DoubleRotScaleDistortion) that specifies if a parameter should not be fit (and therefore default to zero).&lt;/li&gt;
	&lt;li&gt;add a configuration parameter that allows the user to directly set these booleans.&lt;/li&gt;
	&lt;li&gt;add configuration parameters that allow the user to specify which fibers should have x or y slit offsets measured.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="35216" author="price" created="Thu, 21 Sep 2023 19:41:57 +0000"  >&lt;p&gt;We agreed at our weekly meeting that we would be able to provide values in addition to turning parameters on/off (i.e., don&apos;t default the value to zero if not being fit).&lt;/p&gt;

&lt;p&gt;&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; asked for a more detailed description of the detectorMap fitting process:&lt;/p&gt;

&lt;p&gt;The MultipleDistortionsDetectorMap consists of the following layers:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The &quot;base&quot; model is a SplinedDetectorMap, which comes from the optical model.&lt;/li&gt;
	&lt;li&gt;Slit offsets are applied (a spatial and spectral offset per fiber) to the optical model.&lt;/li&gt;
	&lt;li&gt;A series of distortion fields are applied on top of these, which may be of different kinds. We currently have defined:&lt;br/&gt;
    + PolynomialDistortion: a 2D normalised polynomial (ordinary polynomial normalised to the range -1,+1)&lt;br/&gt;
    + DoubleDistortion: one PolynomialDistortion for each CCD&lt;br/&gt;
    + RotScaleDistortion: translation, rotation and scale (common between x and y)&lt;br/&gt;
    + DoubleRotScaleDistortion: one RotScaleDistortion for each CCD&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;When running reduceArc (which calls fitDetectorMap), we have the measured distortions from the lines and traces relative to the base model. We iteratively:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Set all the slit offsets to the mean of the measured offsets&lt;/li&gt;
	&lt;li&gt;Fit a distortion field:&lt;br/&gt;
        + PolynomialDistortion for arm=n (monolithic detector)&lt;br/&gt;
        + DoubleDistortion for arm=b and arm=r (two CCDs)&lt;/li&gt;
	&lt;li&gt;Iteratively measure the slit offsets per fiber from the residuals&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;When running reduceExposure (which calls adjustDetectorMap), we have the measured distortions from the lines and traces relative to the best detectorMap. We iteratively fit a distortion field (RotScaleDistortion for arm=n monolithic detector; DoubleDistortion for arm=b and arm=r two CCDs).&lt;/p&gt;</comment>
                            <comment id="35321" author="price" created="Sat, 30 Sep 2023 00:37:58 +0000"  >&lt;p&gt;Also added &lt;tt&gt;MosaicPolynomialDistortion&lt;/tt&gt;, which I think is more the sort of distortion model RHL was thinking (single distortion field, but with additional affine transform for the one of the CCDs) and fixed a few fitting things.&lt;/p&gt;

&lt;p&gt;Merged to master.&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|zzszcn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10005" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="167">Eng13Oct</customfieldvalue>

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