Details
-
Type:
Improvement
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: obs_lsst
-
Labels:None
-
Story Points:2
-
Epic Link:
-
Team:Telescope and Site
Description
Update obs_lsst translators to enable comCam boresight translation. This is an issue for phosim-like-comcam data when making a gen3 repo.
The first steps of repo setup work (LSP, w_2021_10 ) :
butler create DATA
|
butler register-instrument DATA/ lsst.obs.lsst.LsstComCam |
butler ingest-raws DATA /project/scichris/aos/segmentation_update/comcam/arrows_DM-29264/repackaged/CC_H_20000217_006001_R22_S00.fits |
but the following
butler define-visits DATA/ lsst.obs.lsst.LsstComCam |
yields
defineVisits INFO: Preprocessing data IDs.
|
defineVisits INFO: Registering visit_system 1: by-group-metadata. |
defineVisits INFO: Grouping 1 exposure(s) into visits. |
defineVisits INFO: Computing regions and other metadata for 1 visit(s). |
Traceback (most recent call last):
|
File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.4.1/Linux64/daf_butler/21.0.0-49-ge0e32052+e6fd6d9ff9/bin/butler", line 28, in <module> |
sys.exit(main())
|
File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.4.1/Linux64/daf_butler/21.0.0-49-ge0e32052+e6fd6d9ff9/python/lsst/daf/butler/cli/butler.py", line 319, in main |
return cli() |
File "/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.4.1/lib/python3.8/site-packages/click/core.py", line 829, in __call__ |
return self.main(*args, **kwargs) |
File "/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.4.1/lib/python3.8/site-packages/click/core.py", line 782, in main |
rv = self.invoke(ctx) |
File "/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.4.1/lib/python3.8/site-packages/click/core.py", line 1259, in invoke |
return _process_result(sub_ctx.command.invoke(sub_ctx)) |
File "/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.4.1/lib/python3.8/site-packages/click/core.py", line 1066, in invoke |
return ctx.invoke(self.callback, **ctx.params) |
File "/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.4.1/lib/python3.8/site-packages/click/core.py", line 610, in invoke |
return callback(*args, **kwargs) |
File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.4.1/Linux64/obs_base/21.0.0-33-g5aae0e8+953e4345aa/python/lsst/obs/base/cli/cmd/commands.py", line 94, in define_visits |
script.defineVisits(*args, **kwargs) |
File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.4.1/Linux64/obs_base/21.0.0-33-g5aae0e8+953e4345aa/python/lsst/obs/base/script/defineVisits.py", line 61, in defineVisits |
task.run(butler.registry.queryDataIds(["exposure"], dataId={"instrument": instr.getName()}), |
File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.4.1/Linux64/obs_base/21.0.0-33-g5aae0e8+953e4345aa/python/lsst/obs/base/defineVisits.py", line 548, in run |
for visitRecords in allRecords: |
File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.4.1/Linux64/obs_base/21.0.0-33-g5aae0e8+953e4345aa/python/lsst/obs/base/defineVisits.py", line 467, in _buildVisitRecordsSingle |
return self._buildVisitRecords(args[0], collections=args[1]) |
File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.4.1/Linux64/obs_base/21.0.0-33-g5aae0e8+953e4345aa/python/lsst/obs/base/defineVisits.py", line 361, in _buildVisitRecords |
visitRegion, visitDetectorRegions = self.computeVisitRegions.compute(definition, |
File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.4.1/Linux64/obs_base/21.0.0-33-g5aae0e8+953e4345aa/python/lsst/obs/base/defineVisits.py", line 786, in compute |
detectorBounds = self.computeExposureBounds(visit.exposures[0], collections=collections) |
File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.4.1/Linux64/obs_base/21.0.0-33-g5aae0e8+953e4345aa/python/lsst/obs/base/defineVisits.py", line 733, in computeExposureBounds |
orientation = lsst.geom.Angle(exposure.sky_angle, lsst.geom.degrees) |
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
|
1. lsst.geom.Angle(val: float, units: lsst.geom.AngleUnit = <lsst.geom.AngleUnit object at 0x7f829164eb70>) |
2. lsst.geom.Angle() |
this is related to _const_map in https://github.com/lsst/obs_lsst/blob/8f26b9b4c3332bd35c293dce3c3ef53bc4bd82dc/python/lsst/obs/lsst/translators/comCam.py#L45-L51
which forces these to be returned:
_const_map = { |
"instrument": "LSSTComCam", |
"boresight_rotation_coord": "unknown", |
"boresight_rotation_angle": None, |
"boresight_airmass": None, |
"tracking_radec": None, |
}
|
regardless of input FITS header content.
The header from said file was saved as a standard test yaml file and is attached. Currently, the astrometadata translator:
astrometadata -p lsst.obs.lsst.translators translate comCam-CC_H_20000217_006001_R22_S00.yaml |
yields
Analyzing comCam-CC_H_20000217_006001_R22_S00.yaml... |
instrument: LSSTComCam
|
telescope: Simonyi Survey Telescope
|
datetime_begin: 2000-02-17T02:14:40.319 |
altaz_begin: None |
boresight_airmass: None |
boresight_rotation_angle: None |
boresight_rotation_coord: unknown
|
dark_time: 1.0 s |
datetime_end: 2000-02-17T02:14:41.319 |
detector_exposure_id: 4000021706001000 |
detector_group: R22
|
detector_name: S00
|
detector_num: 0 |
detector_serial: ITL-3800C-229 |
detector_unique_name: R22_S00
|
exposure_group: 4000021706001 |
exposure_id: 4000021706001 |
exposure_time: 1.0 s |
location: (1818938.94323602, -5208470.950938, -3195172.08426757) m |
object: UNKNOWN |
observation_counter: 6001 |
observation_id: CC_H_20000217_006001
|
observation_reason: test
|
observation_type: science
|
observing_day: 20000217 |
physical_filter: g_01
|
pressure: None |
relative_humidity: None |
science_program: 9006001 |
temperature: None |
tracking_radec: None |
visit_id: 4000021706001 |
whereas `boresight_rotation_angle` as well as `tracking_radec` are not None in the header.
A related commit to `obs_lsst` that enabled calculation of `boresight_rotation_angle` for `lsstCam` is https://github.com/lsst/obs_lsst/commit/795469ba35c8ee359bac8cb8272a8c8f942d43e5
Attachments
Issue Links
- is child task of
-
DM-29264 Update phosim_syseng4 for ComCam
- Done