[PIPE2D-792] DetectorMap updated using reduceArc doesn't capture slit offsets Created: 23/Mar/21  Updated: 27/Mar/21  Resolved: 27/Mar/21

Status: Won't Fix
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Normal
Reporter: rhl Assignee: price
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File stabilityDetMap.png    
Sprint: 2DDRP-2021 A3

 Description   
reduceArc.py /projects/HSC/PFS/Subaru --calib /scratch/pprice/pipe2d-706/CALIB --rerun rhl/stability -c reduceExposure.isr.doFlat=False reduceExposure.useCalexp=True readLineList.restrictByLamps=False fitDetectorMap.soften=0.2 identifyLines.findLines.doSubtractContinuum=True identifyLines.findLines.threshold=10 reduceExposure.doOffsetDetectorMap=False doUpdateDetectorMap=True fitDetectorMap.doSlitOffsets=True identifyLines.findLines.fittingRadius=2 --id arm=b^r visit=41374..41377^41381..41384^41418..41421^41425..41428 -j 20

should generate a good detectorMap from a set of Ar/Ne/Kr/ArHg lines. However, when I look at the offsets from the resulting detectorMap it seems that fiberId 464 is off by c. 0.025 pixels in x (see ).

Note that fitDetectorMap.doSlitOffsets=True so I am expecting to update the slit offsets in this case.



 Comments   
Comment by price [ 24/Mar/21 ]

I can't reproduce this. I wonder if you're reading the correct detectorMap?

reduceArc.py /projects/HSC/PFS/Subaru --calib /scratch/pprice/pipe2d-706/CALIB --rerun price/pipe2d-792 -c reduceExposure.isr.doFlat=False reduceExposure.useCalexp=True readLineList.restrictByLamps=False fitDetectorMap.soften=0.2 identifyLines.findLines.doSubtractContinuum=True identifyLines.findLines.threshold=10 reduceExposure.doOffsetDetectorMap=False doUpdateDetectorMap=True fitDetectorMap.doSlitOffsets=True identifyLines.findLines.fittingRadius=2 --id arm=r visit=41374..41377^41381..41384^41418..41421^41425..41428 -j 20

reduceArc.fitDetectorMap INFO: Final fit: chi2=1562.356214 dof=5298 xRMS=0.046792 yRMS=0.150495 (0.012952 nm, 4.836037 km/s) from 2667/2738 lines
reduceArc.fitDetectorMap INFO: Fit quality from reserved lines: chi2=317.102439 xRMS=0.027624 yRMS=0.055329 (0.004762 nm, 1.777947 km/s) from 303 lines (10.0%)
reduceArc.fitDetectorMap INFO: Softening errors by 0.068387 pixels (0.005886 nm, 2.197560 km/s) to yield chi^2/dof=1
reduceArc.fitDetectorMap INFO: Softened fit: chi2=5158.014724 dof=5298 xRMS=0.035890 yRMS=0.098473 (0.008475 nm, 3.164337 km/s) from 2667/3041 lines
reduceArc.fitDetectorMap INFO: Softened fit quality from reserved lines: chi2=1426.640587 xRMS=0.026431 yRMS=0.051665 (0.004446 nm, 1.660197 km/s) from 303 lines (10.0%)

>>> from lsst.daf.persistence import Butler
>>> from pfs.drp.stella import DetectorMap
>>> butler = Butler("/projects/HSC/PFS/Subaru/rerun/price/pipe2d-792")
>>> lines = butler.get("arcLines", visit=41374, arm="r")
>>> detMap = DetectorMap.readFits("/projects/HSC/PFS/Subaru/rerun/price/pipe2d-792/DETECTORMAP/pfsDetectorMap-041374-r1.fits")
>>> xyFit = detMap.findPoint(lines.fiberId, lines.wavelength)
>>> select = lines.fiberId == 464
>>> (xyFit[:, 0] - lines.x)[select]
array([-0.01342672,  0.00048829,  0.00229483, -0.00329692,  0.01108743,
        0.00165179, -0.02782915,  0.00258571, -0.00547261, -0.00282912,
       -0.00731705, -0.02812789,  0.01557468,  0.01771366,  0.1476121 ,
        0.03942108])

The above values are with PIPE2D-780, but I get very similar values with master.

Comment by rhl [ 27/Mar/21 ]

Looks like user error, as Paul suspected.  Closing.

Generated at Sat Feb 10 15:58:09 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.