<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:56:36 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-693] Flux errors near the dichroic are underestimated</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-693</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;The extracted spectra in the pfsArm file can be very unstable near the dichroic transitions; this is not surprising, but the errors are underestimated. &#160;Please fix.&lt;/p&gt;

&lt;p&gt;This could be due to inaccurate fibre traces or to some other problem.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="15208">PIPE2D-693</key>
            <summary>Flux errors near the dichroic are underestimated</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="rhl">rhl</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Jan 2021 17:38:27 +0000</created>
                <updated>Fri, 19 Feb 2021 21:18:14 +0000</updated>
                            <resolved>Fri, 19 Feb 2021 21:18:14 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="18326" author="rhl" created="Fri, 8 Jan 2021 17:40:33 +0000"  >&lt;p&gt;See e.g.  &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/13313/_thumb_13313.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt; from the 2020-12-14 weekly. &#160;The fits are a 5th-order spline but that is irrelevant here.&lt;/p&gt;</comment>
                            <comment id="18327" author="rhl" created="Fri, 8 Jan 2021 17:41:56 +0000"  >&lt;p&gt;That data is the &lt;tt&gt;b&lt;/tt&gt; arm of visit 47, spectrograph 1&lt;/p&gt;</comment>
                            <comment id="18427" author="price" created="Mon, 1 Feb 2021 21:17:46 +0000"  >&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; Could you please attach the script used to create this plot?&lt;/p&gt;</comment>
                            <comment id="18468" author="price" created="Wed, 10 Feb 2021 22:51:05 +0000"  >&lt;p&gt;I found a sky fiber (&lt;tt&gt;fiberId=350&lt;/tt&gt;) with some crazy fluxes and a bad chi value (&amp;gt; 100) between 643 and 645 nm (fairly clean region of sky, without strong lines). I tracked this down to a bad fiberProfile, due to not neglecting the &lt;tt&gt;BAD_FLAT&lt;/tt&gt; mask plane.&lt;/p&gt;

&lt;p&gt;Bad chi: &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/13342/13342_pipe2d-693-chi-bad.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Bad profile: &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/13345/13345_pipe2d-693.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Fixed profile: &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/13344/13344_pipe2d-693-fixed.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;New chi: &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/13343/13343_pipe2d-693-chi.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="18469" author="price" created="Wed, 10 Feb 2021 22:53:28 +0000"  >&lt;p&gt;Notes:&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;
PIPE2D-693: Flux errors near the dichroic are underestimated

(Had to hack repositoryCfg.yaml to replace /scratch/pprice/jenkins/weekly/2020-12-14 with /projects/HSC/PFS/saved/weekly-2020-12-14)


def fitLine(xx, yy):
    xMean = xx.mean()
    yMean = yy.mean()
    dx = xx - xMean
    dy = yy - yMean
    xySum = np.sum(dx*dy)
    xxSum = np.sum(dx**2)
    slope = xySum/xxSum
    intercept = yMean - slope*xMean
    from types &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; SimpleNamespace
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; SimpleNamespace(slope=slope, intercept=intercept, xMean=xMean, yMean=yMean)


&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; numpy as np
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; matplotlib.pyplot as plt
from lsst.daf.persistence &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Butler
from pfs.datamodel &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; TargetType
butler = Butler(&lt;span class=&quot;code-quote&quot;&gt;&quot;/projects/HSC/PFS/saved/weekly-2020-12-14/process/rerun/weekly/pipeline/brn/pipeline&quot;&lt;/span&gt;)
dataId = dict(visit=47, arm=&lt;span class=&quot;code-quote&quot;&gt;&quot;b&quot;&lt;/span&gt;)
pfsArm = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsArm&quot;&lt;/span&gt;, dataId)
pfsConfig = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsConfig&quot;&lt;/span&gt;, dataId)
skyIndices = pfsConfig.selectByTargetType(TargetType.SKY, pfsArm.fiberId)
wlMin, wlMax = 641, 646
chiRms = []
&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ii in skyIndices:
    wlSelect = (pfsArm.wavelength[ii] &amp;gt; wlMin) &amp;amp; (pfsArm.wavelength[ii] &amp;lt; wlMax)
    wl = pfsArm.wavelength[ii][wlSelect]
    flux = pfsArm.flux[ii][wlSelect]
    error = np.sqrt(pfsArm.variance[ii][wlSelect])
    line = fitLine(wl, flux)
    fit = line.slope*wl + line.intercept
    chi = (flux - fit)/error
    lq, uq = np.percentile(chi, (25.0, 75.0))
    rms = 0.741*(uq - lq)
    chiRms.append(rms)
    print(pfsArm.fiberId[ii], rms)
    _ = plt.plot(wl, chi, &lt;span class=&quot;code-quote&quot;&gt;&quot;k-&quot;&lt;/span&gt;)

plt.xlabel(&lt;span class=&quot;code-quote&quot;&gt;&quot;Wavelength (nm)&quot;&lt;/span&gt;)
plt.ylabel(r&lt;span class=&quot;code-quote&quot;&gt;&quot;\chi&quot;&lt;/span&gt;)
plt.show()



fiberId=350 has a bad chi in the 641-646 region. pfsArm.plot([350]) shows a strange feature in that region.

detrend.py /projects/HSC/PFS/saved/weekly-2020-12-14/process --calib /projects/HSC/PFS/saved/weekly-2020-12-14/process/CALIB --rerun price/pipe2d-693 --id visit=47 arm=b

fiberId = 350
from lsst.afw.display &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Display
ds9 = Display(backend=&lt;span class=&quot;code-quote&quot;&gt;&quot;ds9&quot;&lt;/span&gt;, frame=1)
butler = Butler(&lt;span class=&quot;code-quote&quot;&gt;&quot;/projects/HSC/PFS/saved/weekly-2020-12-14/process/rerun/price/pipe2d-693&quot;&lt;/span&gt;)
calexp = 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&quot;&lt;/span&gt;, dataId)
ds9.mtv(calexp)
detMap.display(ds9, [fiberId], [wlMin, wlMax])

Looks clean. The peak in the spectrum is at y=3966, but there&apos;s nothing there in the image.
Maybe the problem is in the fiberTrace?

profiles = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;fiberProfiles&quot;&lt;/span&gt;, dataId)
ft = profiles[fiberId].makeFiberTraceFromDetectorMap(detMap, fiberId)
ds9.mtv(ft.trace)

Yes, there&lt;span class=&quot;code-quote&quot;&gt;&apos;s a strange discontinuity in the fiberTrace image at y=3966, so that&apos;&lt;/span&gt;s the source of the problem.

detrend.py /projects/HSC/PFS/saved/weekly-2020-12-14/process --calib /projects/HSC/PFS/saved/weekly-2020-12-14/process/CALIB --rerun price/pipe2d-693 --id visit=36^38 arm=b

quartz = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;calexp&quot;&lt;/span&gt;, visit=36, arm=&lt;span class=&quot;code-quote&quot;&gt;&quot;b&quot;&lt;/span&gt;)
ds9.mtv(quartz)
detMap.display(ds9, [fiberId], [wlMin, wlMax])

Confirmed that the fiber of interest is on visit=36. No obvious problems apparent in the image.

prof = profiles[fiberId]
plt.plot(prof.norm, &lt;span class=&quot;code-quote&quot;&gt;&quot;k-&quot;&lt;/span&gt;)
plt.xlim(3966, 3982)
plt.show()

The normalisation is negative...?

prof.plot()

The &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; sub-profile (y=4016) looks awful: no clear locus of points. It seems likely that &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; is the cause.

The calexp has a lot of BAD_FLAT masked pixels at the end, but that&apos;s not in the list of mask planes &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; buildFiberProfiles... fixed.

constructFiberProfiles.py /projects/HSC/PFS/saved/weekly-2020-12-14/process --calib=/projects/HSC/PFS/saved/weekly-2020-12-14/process/CALIB --rerun=price/pipe2d-693 --doraise --cores 1 --id visit=35^37 arm=b

from pfs.drp.stella &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; FiberProfileSet
profiles = FiberProfileSet.readFits(&lt;span class=&quot;code-quote&quot;&gt;&quot;/projects/HSC/PFS/saved/weekly-2020-12-14/process/rerun/price/pipe2d-693/FIBERPROFILES/pfsFiberProfiles-2020-11-26-000036-b1.fits&quot;&lt;/span&gt;)

The &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; sub-profile (now at y=3950) now looks MUCH nicer!
There&apos;s still a discontinuity in the fiberTrace, now at y=4048. The normalisation is now noise around zero rather than crazy negative.
Let&lt;span class=&quot;code-quote&quot;&gt;&apos;s extract spectra with &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;, and see &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; it&apos;&lt;/span&gt;s improved...

(lsst-scipipe) pprice@tiger2-sumire:/scratch/pprice/pipe2d-693 $ combineFiberProfiles.py pfsFiberProfiles-2020-11-26-000035-b1.fits /projects/HSC/PFS/saved/weekly-2020-12-14/process/rerun/price/pipe2d-693/FIBERPROFILES/pfsFiberProfiles-2020-11-26-00003?-b1.fits

profiles = FiberProfileSet(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsFiberProfiles-2020-11-26-000035-b1.fits&quot;&lt;/span&gt;)
traces = profiles.makeFiberTracesFromDetectorMap(detMap)
spectra = traces.extractSpectra(calexp.maskedImage)
&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ss in spectra:
    ss.setWavelength(detMap.getWavelength(ss.fiberId))
pfsArm = spectra.toPfsArm(dataId)

Now when I plot chi between 643 and 645 nm, all values are less than 3, and generally less than 2: there are no wild outliers.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="18569" author="price" created="Thu, 18 Feb 2021 16:42:02 +0000"  >&lt;p&gt;More notes:&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;

RHL asks:
&amp;gt; Have you checked that the quoted errors across the dichroic are correct, in the sense that the red-side and blue-side measurements of the flux at a given wavelength are statistically consistent?


(lsst-scipipe) pprice@tiger2-sumire:/scratch/pprice/pipe2d-693 $ $PFS_PIPE2D_DIR/weekly/process_weekly.sh -r pipe2d-693 -D /scratch/pprice/pipe2d-693/fixed/

detrend.py /scratch/pprice/pipe2d-693/fixed --calib /scratch/pprice/pipe2d-693/fixed/CALIB --rerun pipe2d-693/pipeline/brn/pipeline --id visit=47 arm=b^r -j 2

&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; numpy as np
from lsst.daf.persistence &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Butler
butler = Butler(&lt;span class=&quot;code-quote&quot;&gt;&quot;/scratch/pprice/pipe2d-693/fixed/rerun/pipe2d-693/pipeline/brn/pipeline&quot;&lt;/span&gt;)
blueId = dict(visit=47, arm=&lt;span class=&quot;code-quote&quot;&gt;&quot;b&quot;&lt;/span&gt;)
redId = dict(visit=47, arm=&lt;span class=&quot;code-quote&quot;&gt;&quot;r&quot;&lt;/span&gt;)
blue = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsArm&quot;&lt;/span&gt;, blueId)
red = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsArm&quot;&lt;/span&gt;, redId)
wlMin, wlMax = 643, 645
&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ii in range(len(red)):
    redSelect = (red.wavelength[ii] &amp;gt; wlMin) &amp;amp; (red.wavelength[ii] &amp;lt; wlMax)
    redFlux = red.flux[ii][redSelect].mean()
    redErr = np.sqrt(red.variance[ii][redSelect]).mean()
    blueSelect = (blue.wavelength[ii] &amp;gt; wlMin) &amp;amp; (blue.wavelength[ii] &amp;lt; wlMax)
    blueFlux = blue.flux[ii][blueSelect].mean()
    blueErr = np.sqrt(blue.variance[ii][blueSelect]).mean()
    diff = np.abs(redFlux - blueFlux)
    err = np.hypot(redErr, blueErr)
    nSigma = diff/err
    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; nSigma &amp;gt; 3:
        print(ii, red.fiberId[ii], blue.fiberId[ii], redFlux, redErr, redSelect.sum(), blueFlux, blueErr, blueSelect.sum())

151 160 160 0.004514443263991073 0.000411609902932711 23 0.04298878209533732 0.0013043212679074675 30
162 171 171 0.12044178672043664 0.0016886640203687363 23 0.13277716863815206 0.00340707000100194 31
163 172 172 0.13493079559900753 0.001793808020948718 23 0.156978592248888 0.0037948187510930113 31
327 364 364 0.1681084379102511 0.0022442062516512913 23 0.13056916431689652 0.0031925625966626276 30
337 374 374 0.12048133641788118 0.001687048880942079 23 0.16057112050003808 0.004201387857562435 31
392 433 433 0.12349895673745459 0.001663794545175998 23 0.18600130173594448 0.004604363788815017 31
396 437 437 0.0038277092440687304 0.0003792050218488275 23 0.1664399803512527 0.04771144933588916 30
419 460 460 0.12122264921626778 0.0016422057235593282 23 0.14605515479435868 0.0036308343087460503 31

index = 392
fiberId = blue.fiberId[index]
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; matplotlib.pyplot as plt
plt.plot(blue.wavelength[index], blue.flux[index], &lt;span class=&quot;code-quote&quot;&gt;&quot;b-&quot;&lt;/span&gt;)
plt.plot(red.wavelength[index], red.flux[index], &lt;span class=&quot;code-quote&quot;&gt;&quot;r-&quot;&lt;/span&gt;)
plt.xlabel(&lt;span class=&quot;code-quote&quot;&gt;&quot;Wavelength (nm)&quot;&lt;/span&gt;)
plt.ylabel(&lt;span class=&quot;code-quote&quot;&gt;&quot;Flux (uncalibrated)&quot;&lt;/span&gt;)
plt.show()

There&lt;span class=&quot;code-quote&quot;&gt;&apos;s a large bump in the blue that isn&apos;&lt;/span&gt;t there in the red.

blueDetMap = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;detectorMap&quot;&lt;/span&gt;, blueId)
redDetMap = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;detectorMap&quot;&lt;/span&gt;, redId)
blueImage = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;calexp&quot;&lt;/span&gt;, blueId)
redImage = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;calexp&quot;&lt;/span&gt;, redId)

from lsst.afw.display &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Display
blueDisplay = Display(backend=&lt;span class=&quot;code-quote&quot;&gt;&quot;ds9&quot;&lt;/span&gt;, frame=1)
blueDisplay.mtv(blueImage)
blueDetMap.display(blueDisplay, [blue.fiberId[index]], [wlMin, wlMax])
redDisplay = Display(backend=&lt;span class=&quot;code-quote&quot;&gt;&quot;ds9&quot;&lt;/span&gt;, frame=2)
redDisplay.mtv(redImage)
redDetMap.displindeay(redDisplay, [red.fiberId[index]], [wlMin, wlMax])

It&lt;span class=&quot;code-quote&quot;&gt;&apos;s not visible in the image. It must be in the fiberTrace. It can&apos;&lt;/span&gt;t be in the flat, since I&apos;m looking at the flattened image.

profiles = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;fiberProfiles&quot;&lt;/span&gt;, blueId)
prof = profiles[fiberId]
Display(backend=&lt;span class=&quot;code-quote&quot;&gt;&quot;ds9&quot;&lt;/span&gt;, frame=2).mtv(prof.makeFiberTraceFromDetectorMap(blueDetMap, fiberId).trace)

There&apos;s a negative feature that peaks around y=4004, x=-4 relative to the trace --&amp;gt; 647.1 nm.

The bump in the spectrum is peaked at 643.2 nm --&amp;gt; y=3945. There&lt;span class=&quot;code-quote&quot;&gt;&apos;s a smaller negative feature in the trace there too. But that more extreme negative feature doesn&apos;&lt;/span&gt;t appear to have done anything awful to the spectrum.

Could it be due to some coupling to the neighbouring fibers?
Nothing in their fiberTraces around the row of interest, and no flux stolen from their spectra.

plt.plot(profiles[432].norm, &lt;span class=&quot;code-quote&quot;&gt;&quot;r-&quot;&lt;/span&gt;)
plt.plot(profiles[433].norm, &lt;span class=&quot;code-quote&quot;&gt;&quot;k-&quot;&lt;/span&gt;)
plt.plot(profiles[434].norm, &lt;span class=&quot;code-quote&quot;&gt;&quot;b-&quot;&lt;/span&gt;)
plt.show()

The black line, which is &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the troublesome fiber, undercuts the line &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; both the other fibers, at around the right place. Dividing by &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; deficit is causing an excess in the extracted spectrum.

plt.plot(profiles[434].norm/profiles[433].norm, &lt;span class=&quot;code-quote&quot;&gt;&quot;k-&quot;&lt;/span&gt;)
plt.show()

Yes, there&apos;s the bump, peaking at 3945.


constructFiberProfiles.py /scratch/pprice/pipe2d-693/fixed --calib=/scratch/pprice/pipe2d-693/fixed/CALIB --rerun=fiberProfiles --doraise --batch-type=smp --cores=10 --no-versions --clobber-config --id visit=37

butler = Butler(&lt;span class=&quot;code-quote&quot;&gt;&quot;/scratch/pprice/pipe2d-693/fixed/rerun/fiberProfiles&quot;&lt;/span&gt;)
exposure = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;postISRCCD&quot;&lt;/span&gt;, visit=37, arm=&lt;span class=&quot;code-quote&quot;&gt;&quot;b&quot;&lt;/span&gt;)
profiles = FiberProfileSet.readFits(&lt;span class=&quot;code-quote&quot;&gt;&quot;/scratch/pprice/pipe2d-693/fixed/rerun/fiberProfiles/FIBERPROFILES/pfsFiberProfiles-2020-01-01-000037-b1.fits&quot;&lt;/span&gt;)

plt.plot(profiles[435].norm/profiles[433].norm, &lt;span class=&quot;code-quote&quot;&gt;&quot;k-&quot;&lt;/span&gt;)
plt.show()

The bump is gone now. Not sure why. Maybe I got some versions wrong? Let&apos;s re-run everything after checking the versions.

(lsst-scipipe) pprice@tiger2-sumire:/scratch/pprice/pipe2d-693 $ $PFS_PIPE2D_DIR/weekly/process_weekly.sh -r pipe2d-693 -D /scratch/pprice/pipe2d-693/revised

The bump is still there.

constructFiberProfiles.py /scratch/pprice/pipe2d-693/revised --calib=/scratch/pprice/pipe2d-693/revised/CALIB --rerun=fiberProfiles --doraise --batch-type=smp --cores=10 --no-versions --clobber-config --id visit=35^37 arm=b
combineFiberProfiles.py pfsFiberProfiles-2020-01-01-000000-b1.fits revised/rerun/fiberProfiles/FIBERPROFILES/pfsFiberProfiles-2020-01-01-00003*.fits

Looks fine. Must be something to &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; with the timing of the construction of the profiles. Maybe the detectorMap? reduceArc.py is run after constructFiberProfiles.py, so the official profiles must be created using the original detectorMap, which is slightly off. Let&lt;span class=&quot;code-quote&quot;&gt;&apos;s turn on doBlindFind. In fact, it&apos;&lt;/span&gt;s on by &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;. But the extraction of the spectra uses the old detectorMap, rather than the results of the blind find! Fix that.

(lsst-scipipe) pprice@tiger2-sumire:/scratch/pprice/pipe2d-693 $ $PFS_PIPE2D_DIR/weekly/process_weekly.sh -r pipe2d-693 -D /scratch/pprice/pipe2d-693/fix2

The bump is gone!

merged = butler.get(&lt;span class=&quot;code-quote&quot;&gt;&quot;pfsMerged&quot;&lt;/span&gt;, blueId)
merged.plot([433])

Good!

There&apos;s something at y=209, at wavelength=389nm, which might be a bit bluer than we care about (&amp;lt;10% throughput). Increased profiles.centerFit.order=9 to get better fits to the traces and ran again as fix3. Ideally, we should fit a detectorMap and measure the profile at the same time (the detectorMap gives the best model of the traces, but the traces are used to extract the spectra, which is (currently) required to &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; line identification.

Looking &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; red-blue differences &amp;gt; 3 sigma on &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; dataset, we find:

151 160 160 0.004270502681566373 0.0003893999866585177 23 0.03895871326810748 0.0012311061697475381 30

There&apos;s a huge spike in the blue, which is due to a CR visible in the image. Ready to call &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; done.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="18570" author="price" created="Thu, 18 Feb 2021 16:46:16 +0000"  >&lt;p&gt;Not a lot of changes, but enough to make the fluxes in the dichroic consistent.&lt;/p&gt;</comment>
                            <comment id="18575" author="price" created="Fri, 19 Feb 2021 21:18:14 +0000"  >&lt;p&gt;Merged to master.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13313" name="badDichroicErrors.png" size="500136" author="rhl" created="Fri, 8 Jan 2021 17:38:50 +0000"/>
                            <attachment id="13342" name="pipe2d-693-chi-bad.png" size="24370" author="price" created="Wed, 10 Feb 2021 22:49:18 +0000"/>
                            <attachment id="13343" name="pipe2d-693-chi.png" size="73504" author="price" created="Wed, 10 Feb 2021 22:49:19 +0000"/>
                            <attachment id="13344" name="pipe2d-693-fixed.png" size="76792" author="price" created="Wed, 10 Feb 2021 22:49:19 +0000"/>
                            <attachment id="13345" name="pipe2d-693.png" size="77507" author="price" created="Wed, 10 Feb 2021 22:49: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|02qpt6:508yl0chzzy00006</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="98">2DDRP-2021 A 2</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>