Recently I come across a questions when processing the data:
camera.py of mine:
i = 4
for j in range(0,16):
k = j + i*16
config.detectorList[k] = lsst.afw.cameraGeom.cameraConfig.DetectorConfig()
# y0 of pixel bounding box
config.detectorList[k].bbox_y0 = 0
# y1 of pixel bounding box
config.detectorList[k].bbox_y1 = 4631
# x1 of pixel bounding box
config.detectorList[k].bbox_x1 = 1151
# x0 of pixel bounding box
config.detectorList[k].bbox_x0 = 0
# Name of detector slot
config.detectorList[k].name = f'4_16_{j}'
# Pixel size in the x dimension in mm
config.detectorList[k].pixelSize_x = 0.01
# Name of native coordinate system
config.detectorList[k].transformDict.nativeSys = 'Pixels'
config.detectorList[k].transformDict.transforms = None
# x position of the reference point in the detector in pixels in transposed coordinates.
config.detectorList[k].refpos_x = 4607.5
# y position of the reference point in the detector in pixels in transposed coordinates.
config.detectorList[k].refpos_y = 4615.5
config.detectorList[k].pixelSize_y = 0.01
# Detector type: SCIENCE=0, FOCUS=1, GUIDER=2, WAVEFRONT=3
config.detectorList[k].detectorType = 0
if j//8 ==0:
# x offset from the origin of the camera in mm in the transposed system.
config.detectorList[k].offset_x = 0 + 0.01*1152*(j%8)
# y offset from the origin of the camera in mm in the transposed system.
config.detectorList[k].offset_y = 0
else:
config.detectorList[k].offset_x = 0 + 0.01*1152*(j%8)
# y offset from the origin of the camera in mm in the transposed system.
config.detectorList[k].offset_y = 0 + 0.01*4616
config.detectorList[k].transposeDetector = False
# yaw (rotation about z) of the detector in degrees. This includes any
# necessary rotation to go from detector coordinates to camera coordinates
# after optional transposition.
config.detectorList[k].yawDeg = 0.0
# roll (rotation about x) of the detector in degrees
config.detectorList[k].rollDeg = 0.0
# Serial string associated with this specific detector
config.detectorList[k].serial = f'4_16_{j}'
# pitch (rotation about y) of the detector in degrees
config.detectorList[k].pitchDeg = 0.0
# ID of detector slot
config.detectorList[k].id = k
The code related to the location of amplifier is:
if j//8 ==0:
# x offset from the origin of the camera in mm in the transposed system.
config.detectorList[k].offset_x = 0 + 0.01*1152*(j%8)
# y offset from the origin of the camera in mm in the transposed system.
config.detectorList[k].offset_y = 0
else:
config.detectorList[k].offset_x = 0 + 0.01*1152*(j%8)
# y offset from the origin of the camera in mm in the transposed system.
config.detectorList[k].offset_y = 0 + 0.01*4616
and things goes well for the amplifier in that (j%8 =0,1,2), but to a higher number, for example, I can process detector 64,65,66, well, but if I am going to to processing the detector 67, I get:
Loading reference objects from region bounded by [178.95980960, 179.17247366], [36.54467071, 37.03354999] RA Dec
as you can see, the reference is on the left of the image, and if I turn the config:
config.astromRefObjLoader.pixelMargin=250 from 250 to 1000
the refernce(in the picture is the red) only change in the left,
and I still get a wrong match:
For other detector, things worse, for example: for detector 76:
calibrate INFO: Loading reference objects from region bounded by [178.82656072, 179.04041542], [36.96779216, 37.45667326] RA Dec
calibrate INFO: Loaded 0 reference objects
calibrate.astrometry.referenceSelector INFO: Selected 0/0 references
and for detector 77, things worse:
calibrate INFO: Loading reference objects from region bounded by [178.69353873, 178.90798618], [36.96752792, 37.45663713] RA Dec
ctrl.mpexec.singleQuantumExecutor ERROR: Execution of task 'calibrate' on quantum {instrument: 'WFST', detector: 77, visit: 7, ...} failed. Exception RuntimeError: No reference tables could be found for input region
ctrl.mpexec.mpGraphExecutor ERROR: Task <TaskDef(CalibrateTask, label=calibrate) dataId={instrument: 'WFST', detector: 77, visit: 7, ...}> failed; processing will continue for remaining tasks.
Traceback (most recent call last):
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/ctrl_mpexec/g6727979600+15d2600a0d/python/lsst/ctrl/mpexec/mpGraphExecutor.py", line 363, in _executeQuantaInProcess
self.quantumExecutor.execute(qnode.taskDef, qnode.quantum, butler)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/ctrl_mpexec/g6727979600+15d2600a0d/python/lsst/ctrl/mpexec/singleQuantumExecutor.py", line 174, in execute
self.runQuantum(task, quantum, taskDef, butler)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/ctrl_mpexec/g6727979600+15d2600a0d/python/lsst/ctrl/mpexec/singleQuantumExecutor.py", line 464, in runQuantum
task.runQuantum(butlerQC, inputRefs, outputRefs)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/pipe_tasks/gf1799c5b72+6048f86b6d/python/lsst/pipe/tasks/calibrate.py", line 635, in runQuantum
outputs = self.run(**inputs)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/pipe_base/g5c83ca0194+970dd35637/python/lsst/pipe/base/timer.py", line 181, in wrapper
res = func(self, *args, **keyArgs)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/pipe_tasks/gf1799c5b72+6048f86b6d/python/lsst/pipe/tasks/calibrate.py", line 735, in run
astromRes = self.astrometry.run(
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/pipe_base/g5c83ca0194+970dd35637/python/lsst/pipe/base/timer.py", line 181, in wrapper
res = func(self, *args, **keyArgs)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/meas_astrom/gaf95d0f0f9+8df549a9bd/python/lsst/meas/astrom/astrometry.py", line 178, in run
res = self.solve(exposure=exposure, sourceCat=sourceCat)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/pipe_base/g5c83ca0194+970dd35637/python/lsst/pipe/base/timer.py", line 181, in wrapper
res = func(self, *args, **keyArgs)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/meas_astrom/gaf95d0f0f9+8df549a9bd/python/lsst/meas/astrom/astrometry.py", line 224, in solve
loadRes = self.refObjLoader.loadPixelBox(
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/meas_algorithms/g8d527e0710+15f63ea384/python/lsst/meas/algorithms/loadReferenceObjects.py", line 408, in loadPixelBox
return self.loadRegion(outerSkyRegion, filtFunc=_filterFunction, epoch=epoch, filterName=filterName)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/meas_algorithms/g8d527e0710+15f63ea384/python/lsst/meas/algorithms/loadReferenceObjects.py", line 476, in loadRegion
raise RuntimeError("No reference tables could be found for input region")
RuntimeError: No reference tables could be found for input region
ctrl.mpexec.mpGraphExecutor INFO: Executed 2 quanta successfully, 1 failed and 0 remain out of total 3 quanta.
lsst.daf.butler.cli.utils ERROR: Caught an exception, details are in traceback:
Traceback (most recent call last):
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/ctrl_mpexec/g6727979600+15d2600a0d/python/lsst/ctrl/mpexec/cli/cmd/commands.py", line 107, in run
script.run(qgraphObj=qgraph, **kwargs)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/ctrl_mpexec/g6727979600+15d2600a0d/python/lsst/ctrl/mpexec/cli/script/run.py", line 171, in run
f.runPipeline(qgraphObj, taskFactory, args)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/ctrl_mpexec/g6727979600+15d2600a0d/python/lsst/ctrl/mpexec/cmdLineFwk.py", line 681, in runPipeline
executor.execute(graph, butler)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/ctrl_mpexec/g6727979600+15d2600a0d/python/lsst/ctrl/mpexec/mpGraphExecutor.py", line 302, in execute
self._executeQuantaInProcess(graph, butler)
File "/home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/ctrl_mpexec/g6727979600+15d2600a0d/python/lsst/ctrl/mpexec/mpGraphExecutor.py", line 396, in _executeQuantaInProcess
raise MPGraphExecutorError("One or more tasks failed during execution.")
lsst.ctrl.mpexec.mpGraphExecutor.MPGraphExecutorError: One or more tasks failed during execution.
And if I change a sky region, things occur again, for example:
The reference is all on the bottom:
If I turn the
config.astromRefObjLoader.pixelMargin=1500
Then I get:
Seems like a line prevent the stars to across it.
What caused this, how to fix that?
Thank you!