<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:06:20 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-1342] Slit offsets should be applied _before_ modelling the optics and detectors</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1342</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;The DetectorMap code to adjust the spatial (and spectral) offsets of individual fibres appears to adjust the position of the traces on the detector rather than moving the trace relative to the full optical model (including the gap between the two CCDs in the optical arms).&lt;/p&gt;

&lt;p&gt;This didn&apos;t matter when we were making small adjustments, but to model the drift flat data we need to handle the higher-order corrections, and the chip gaps.&lt;/p&gt;

&lt;p&gt;On slack I&apos;d complained that there was structure in the resulting images, but on further consideration I think that this is beating between the non-integral step and the fact that the motion is treated as a set of steps (i.e. there is structure on the scale of the step, but it appears at a larger scale).   This is not a problem.&lt;/p&gt;

&lt;p&gt;The code to make this model looks like this (using rerun &lt;tt&gt;rhl/tmp&lt;/tt&gt; in Hilo).&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;
from pfs.datamodel &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; TargetType
from pfs.drp.stella &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; SpectrumSet, FiberTraceSet
from pfs.drp.stella.buildFiberProfiles &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; BuildFiberProfilesTask

dataId = {&lt;span class=&quot;code-quote&quot;&gt;&apos;visit&apos;&lt;/span&gt;: 103274, &lt;span class=&quot;code-quote&quot;&gt;&apos;arm&apos;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&apos;r&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;spectrograph&apos;&lt;/span&gt;: 3}

exp = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;calexp&quot;&lt;/span&gt;, dataId)
detMap = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;detectorMap_used&quot;&lt;/span&gt;, dataId)
pfsConfig = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsConfig&quot;&lt;/span&gt;, dataId).select(spectrograph=dataId[&lt;span class=&quot;code-quote&quot;&gt;&quot;spectrograph&quot;&lt;/span&gt;])

fiberId = pfsConfig.select(spectrograph=dataId[&lt;span class=&quot;code-quote&quot;&gt;&quot;spectrograph&quot;&lt;/span&gt;], targetType=TargetType.DCB).fiberId

spec = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsArm&quot;&lt;/span&gt;, dataId)
spec.flux[(spec.mask &amp;amp; ~spec.flags[&lt;span class=&quot;code-quote&quot;&gt;&quot;REFLINE&quot;&lt;/span&gt;]) != 0x0] = np.NaN
spectra = SpectrumSet.fromPfsArm(spec)
#
# Build the profiles
#
config = BuildFiberProfilesTask.ConfigClass()
config.profileRadius = 5
buildFiberProfilesTask = BuildFiberProfilesTask(config)

fiberProfiles = buildFiberProfilesTask.run(exp, None, detectorMap=detMap, pfsConfig=pfsConfig).profiles    
#
# Simulate drifted data
#
driftedModel = None
&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; dx in np.arange(-20, 20, 0.55):
    detMap = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;detectorMap_used&quot;&lt;/span&gt;, dataId)

    &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; fid in fiberId:
        detMap.setSlitOffsets(fid, detMap.getSpatialOffset(fid) + dx, detMap.getSpectralOffset(fid))

    fts = fiberProfiles.makeFiberTracesFromDetectorMap(detMap)

    image = spectra.makeImage(exp.getDimensions(), fts)
    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; driftedModel is None:
        driftedModel = image
    &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;:
        driftedModel += image
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="24348">PIPE2D-1342</key>
            <summary>Slit offsets should be applied _before_ modelling the optics and detectors</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="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="price">price</assignee>
                                    <reporter username="rhl">rhl</reporter>
                        <labels>
                            <label>EngRun</label>
                    </labels>
                <created>Thu, 21 Dec 2023 09:55:20 +0000</created>
                <updated>Fri, 19 Jan 2024 17:19:36 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                        <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|zzt0q7:</customfieldvalue>

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