rfahed
(Remi Fahed)
June 7, 2022, 9:09am
#1
Hello,
I am having the following error message when launching the “calibrate” pipetask :
lsst.ctrl.mpexec.singleQuantumExecutor ERROR: Execution of task 'calibrate' on quantum {instrument: 'LSSTCam-imSim', detector: 72, visit: 341340, ...} failed. Exception TaskError: Fatal astrometry failure detected: mean on-sky distance = 0.450 arcsec > 0.300 (maxMeanDistanceArcsec)
Which says that calibration failed on detector 72. However, my input images are referenced with the pair [raftName, detectorName] and not [detector]. Would someone know where I can find a table with the correspondance between these two numberings ?
And also, how does the code gets this correspondance ? Is it an internal table ?
Thank you for your help.
Rémi
merlin
(Merlin)
June 7, 2022, 9:20am
#2
You can do the following to print out the mapping:
from lsst.obs.lsst import LsstCam
camera = LsstCam.getCamera()
for detector in camera:
print(f"{detector.getId()}: {detector.getName()}")
There is also a camera.getNameMap()
method which gives a dictionary, keyed by the amplifier name, with the values being the detector objects themselves, if you want to interact with the names more programatically.
merlin
(Merlin)
June 7, 2022, 9:28am
#3
For the convenience of those reading and wanting the output but who can’t easily run that, the above prints:
0: R01_S00
1: R01_S01
2: R01_S02
3: R01_S10
4: R01_S11
5: R01_S12
6: R01_S20
7: R01_S21
8: R01_S22
9: R02_S00
10: R02_S01
11: R02_S02
12: R02_S10
13: R02_S11
14: R02_S12
15: R02_S20
16: R02_S21
17: R02_S22
18: R03_S00
19: R03_S01
20: R03_S02
21: R03_S10
22: R03_S11
23: R03_S12
24: R03_S20
25: R03_S21
26: R03_S22
27: R10_S00
28: R10_S01
29: R10_S02
30: R10_S10
31: R10_S11
32: R10_S12
33: R10_S20
34: R10_S21
35: R10_S22
36: R11_S00
37: R11_S01
38: R11_S02
39: R11_S10
40: R11_S11
41: R11_S12
42: R11_S20
43: R11_S21
44: R11_S22
45: R12_S00
46: R12_S01
47: R12_S02
48: R12_S10
49: R12_S11
50: R12_S12
51: R12_S20
52: R12_S21
53: R12_S22
54: R13_S00
55: R13_S01
56: R13_S02
57: R13_S10
58: R13_S11
59: R13_S12
60: R13_S20
61: R13_S21
62: R13_S22
63: R14_S00
64: R14_S01
65: R14_S02
66: R14_S10
67: R14_S11
68: R14_S12
69: R14_S20
70: R14_S21
71: R14_S22
72: R20_S00
73: R20_S01
74: R20_S02
75: R20_S10
76: R20_S11
77: R20_S12
78: R20_S20
79: R20_S21
80: R20_S22
81: R21_S00
82: R21_S01
83: R21_S02
84: R21_S10
85: R21_S11
86: R21_S12
87: R21_S20
88: R21_S21
89: R21_S22
90: R22_S00
91: R22_S01
92: R22_S02
93: R22_S10
94: R22_S11
95: R22_S12
96: R22_S20
97: R22_S21
98: R22_S22
99: R23_S00
100: R23_S01
101: R23_S02
102: R23_S10
103: R23_S11
104: R23_S12
105: R23_S20
106: R23_S21
107: R23_S22
108: R24_S00
109: R24_S01
110: R24_S02
111: R24_S10
112: R24_S11
113: R24_S12
114: R24_S20
115: R24_S21
116: R24_S22
117: R30_S00
118: R30_S01
119: R30_S02
120: R30_S10
121: R30_S11
122: R30_S12
123: R30_S20
124: R30_S21
125: R30_S22
126: R31_S00
127: R31_S01
128: R31_S02
129: R31_S10
130: R31_S11
131: R31_S12
132: R31_S20
133: R31_S21
134: R31_S22
135: R32_S00
136: R32_S01
137: R32_S02
138: R32_S10
139: R32_S11
140: R32_S12
141: R32_S20
142: R32_S21
143: R32_S22
144: R33_S00
145: R33_S01
146: R33_S02
147: R33_S10
148: R33_S11
149: R33_S12
150: R33_S20
151: R33_S21
152: R33_S22
153: R34_S00
154: R34_S01
155: R34_S02
156: R34_S10
157: R34_S11
158: R34_S12
159: R34_S20
160: R34_S21
161: R34_S22
162: R41_S00
163: R41_S01
164: R41_S02
165: R41_S10
166: R41_S11
167: R41_S12
168: R41_S20
169: R41_S21
170: R41_S22
171: R42_S00
172: R42_S01
173: R42_S02
174: R42_S10
175: R42_S11
176: R42_S12
177: R42_S20
178: R42_S21
179: R42_S22
180: R43_S00
181: R43_S01
182: R43_S02
183: R43_S10
184: R43_S11
185: R43_S12
186: R43_S20
187: R43_S21
188: R43_S22
189: R00_SG0
190: R00_SG1
191: R00_SW0
192: R00_SW1
193: R04_SG0
194: R04_SG1
195: R04_SW0
196: R04_SW1
197: R40_SG0
198: R40_SG1
199: R40_SW0
200: R40_SW1
201: R44_SG0
202: R44_SG1
203: R44_SW0
204: R44_SW1
merlin
(Merlin)
June 7, 2022, 9:33am
#4
Alternatively:
nameMap = camera.getNameMap()
for detectorFullName, detector in nameMap.items():
raftName, detectorName = detectorFullName.split('_')
detectorNumber = detector.getId()
print(f"{detectorNumber} = {raftName}, {detectorName}")
Will print off:
0 = R01, S00
1 = R01, S01
2 = R01, S02
...
timj
(Tim Jenness)
June 7, 2022, 3:41pm
#5
@merlin ’s answer is correct for the specific case of wanting to know about cameras, but it’s not the general butler solution for how to map a data ID to more detailed information. For this specific case you want to do something like:
$ butler query-dimension-records REPO detector --where "instrument = 'LSSTCam-imSim' and detector = 72"
instrument id full_name name_in_raft raft purpose
------------- --- --------- ------------ ---- -------
LSSTCam-imSim 72 R20_S00 S00 R20 SCIENCE
where the where
clause is effectively the dataId that was reported in the log.
1 Like
rfahed
(Remi Fahed)
June 8, 2022, 12:34pm
#6
Thank you. I was also wondering what was the meaning of this maxMeanDistanceArcsec parameter for the astrometry fit. Is it the RMS of the fit ? And what would be a reasonable value for this parameter ?
parejkoj
(John Parejko)
June 8, 2022, 6:35pm
#7
The documentation for that config is online: AstrometryTask — LSST Science Pipelines