-
Type:
Story
-
Status: Done (View Workflow)
-
Priority:
Normal
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Story Points:1
-
Sprint:2DDRP-2021 A
The detectorMaps coming from the simulator have non-physical features at either end, possibly due to spline artifacts. Here is a plot of the residual after removing a constant dispersion (wavelength change per pixel) as a function of detector row for one of the central fibers of the m arm, showing the problem:

Jim Gunn says, "There is nothing physical which could cause this." We suspect the problem is in the splining of the optical model in the simulator. A workaround is to drop the second, third, third-to-last and second-to-last knots for the wavelength solution from the detectorMap, e.g.:
import numpy as np from pfs.drp.stella import SplinedDetectorMap detMap = SplinedDetectorMap.readFits("/home/pfs/pfs/drp_pfs_data/detectorMap/detectorMap-sim-m1.fits") def selectArray(array): result = np.empty(len(array) - 4, dtype=np.float32) result[0] = array[0] result[-1] = array[-1] result[1:-1] = array[3:-3] return result SplinedDetectorMap(detMap.bbox, detMap.fiberId, [detMap.getXCenterSpline(ff).getX() for ff in detMap.fiberId], [detMap.getXCenterSpline(ff).getY() for ff in detMap.fiberId], [selectArray(detMap.getWavelengthSpline(ff).getX()) for ff in detMap.fiberId], [selectArray(detMap.getWavelengthSpline(ff).getY()) for ff in detMap.fiberId], detMap.getSpatialOffsets(), detMap.getSpectralOffsets(), detMap.visitInfo, detMap.getMetadata()).writeFits("detectorMap-simhack-m1.fits")
This ticket will implement this workaround in the simulator.