[PIPE2D-358] DetectorMap updates should be global, not fiber-fiber Created: 19/Feb/19  Updated: 05/Jan/21  Resolved: 25/Sep/20

Status: Done
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: hassan Assignee: price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to PIPE2D-340 Provide method to adjust detector map... Done
Story Points: 4
Sprint: 2DDRP-2021 A
Reviewers: hassan

 Description   

The method CalibrateWavelengthsTask.fitWavelengthSolution() updates the detectorMap based on new arc data. The current implementation performs this update on a fiber-by-fiber basis. Change this such that the update is done globally, ie., across all fibers at once.



 Comments   
Comment by price [ 30/Jul/20 ]

I think I'm done banging my head on this, having achieved sub-km/s RMS the first time I tried it on real data.

$ reduceArc.py /projects/HSC/PFS/Subaru --calib=/projects/HSC/PFS/Subaru/CALIB-price --rerun=price/pipe2d-358 --id visit=18577 arm=r

reduceArc.fitDetectorModel INFO: Final fit: chi2=224.346214 xRMS=0.053974 yRMS=0.028801 (0.002491 nm, 0.933024 km/s) from 217/219 lines
reduceArc.fitDetectorModel DEBUG:     Model: GlobalDetectorModel(fiberCenter=332.291, fiberPitch=-6.16892, wavelengthCenter=801.012, dispersion=0.0864977, ccdRotation=0.000517996, xy0=(2041.03,2033.31), xyGap=(-73.6047,-1.10033), xDistortion=[4.24904e-06, 1.00001, 0.000405752, 0.00712836, 0.000470946, -0.000308668, -0.000316134, 7.79662e-05, 0.00244859, -0.00012895, -0.0173589, 3.80331e-05, -0.000120442, 0.000253118, 0.000988404, 0.00270288, -0.000273452, 0.00385268, 0.000118333, 0.00362501, -6.42576e-05, 0.0104819, 0.000140662, -0.000116482, 0.000284904, 0.000243509, -0.000280598, -0.00170299, -0.00078614, 0.000144483, -0.00037612, 0.000243847, -0.00102174, -0.000428461, -0.0019592, 0.000739211], yDistortion=[-1.60052e-05, -6.0378e-05, 1.0001, 0.0230838, -0.000254465, 0.0155239, 0.000922278, 0.00384039, 0.000254343, 0.00468012, 0.00106382, -0.000126003, 6.11022e-05, -7.28816e-05, 0.00178635, -0.00259075, 0.00167231, -0.000269819, 0.00388316, -0.00045924, -0.00471183, -0.000660477, 2.17569e-05, 0.000296298, -2.79199e-05, 0.00026548, 0.000151485, -0.00347985, 0.00169531, -1.55191e-05, 6.43486e-05, -0.000480967, 0.000443129, -0.000266667, -0.000351572, 0.00844538], spatialOffsets=[0.0215725, -0.00138737, -0.0682133, 0.0424107, 0.13649, -0.328949, 1.56173, -0.647606, 0.0956323, -0.00854651], spectralOffsets=[0.00244941, 0.00160458, 0.00433619, 0.00566214, -0.00207837, -0.00204595, 0.00159544, -0.00268849, -0.000249456, -0.00165473])

Just for fun, I'll note that the position of the right-hand CCD (xyGap=(-73.6047,-1.10033)) is off horizontally by about 4.5 pixels from the design in the simulator (for which I get xyGap=(-69.2997,-0.000911715)) and a whole pixel vertically misaligned with the left-hand CCD!

Need to clean up and add tests.

Comment by cloomis [ 30/Jul/20 ]

Nice!

Not sure whether it is worth pursuing, but the simulator adds 1.040 mm between the two detectors, based on the CCD and substrate design, plus an additional 20um measured physically on the CMM. Umm:

interCcdGap = 1.040 # 31.440 (physical) - 30.720 (active) + 0.300 (physical gap) + 0.020 (observed)

So an additional 60+um is a lot.

The R1 FPA mechanical report does not really address the gap, just coplanarity and surface flatness. But I bet we can find measured data if we care.

Comment by rhl [ 30/Jul/20 ]

I don't think that we care much about the design or even as-built. Only things visible in the data are of interest at this point.

But how exciting. Was that sub-km/s based on fitting to a set of arcs and measuring on another?

Comment by price [ 30/Jul/20 ]

No, it's the RMS from the solution on a single arc.

Comment by rhl [ 30/Jul/20 ]

That's good, but not quite sub-km/s accuracy yet. Does this code produce debug/QA information on how it's tweaked things?

Comment by price [ 14/Aug/20 ]

This is a BIG change, adding GlobalDetectorMap.

Comment by price [ 18/Aug/20 ]

rhl requests that BaseDetectorMap in the submitted patch be renamed as DetectorMap.

Comment by price [ 25/Sep/20 ]

Merged to master.

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