Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-20201: Add rotator angle definition for decam #25

Merged
merged 1 commit into from
Jun 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions python/astro_metadata_translator/translators/decam.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ class DecamTranslator(FitsTranslator):
default_search_path = os.path.join(CORRECTIONS_DIR, "DECam")
"""Default search path to use to locate header correction files."""

_const_map = {"boresight_rotation_angle": Angle(float("nan")*u.deg),
"boresight_rotation_coord": "unknown",
# DECam has no rotator, and the instrument angle on sky is set to +Y=East,
# +X=South which we define as a 90 degree rotation and an X-flip.
_const_map = {"boresight_rotation_angle": Angle(90*u.deg),
"boresight_rotation_coord": "sky",
}

_trivial_map = {"exposure_time": ("EXPTIME", dict(unit=u.s)),
Expand Down
11 changes: 7 additions & 4 deletions tests/test_decam.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_decam_translator(self):
test_data = (("fitsheader-decam.yaml",
dict(telescope="CTIO 4.0-m telescope",
instrument="DECam",
boresight_rotation_coord="unknown",
boresight_rotation_coord="sky",
dark_time=201.15662*u.s,
detector_exposure_id=22938825,
detector_name="1",
Expand All @@ -48,7 +48,8 @@ def test_decam_translator(self):
("fitsheader-decam-0160496.yaml",
dict(telescope="CTIO 4.0-m telescope",
instrument="DECam",
boresight_rotation_coord="unknown",
boresight_rotation_coord="sky",
boresight_rotation_angle=90*u.degree,
dark_time=0.0407898*u.s,
detector_exposure_id=None,
detector_name="1",
Expand All @@ -71,7 +72,8 @@ def test_decam_translator(self):
("fitsheader-decam-calexp-0412037_10.yaml",
dict(telescope="CTIO 4.0-m telescope",
instrument="DECam",
boresight_rotation_coord="unknown",
boresight_rotation_coord="sky",
boresight_rotation_angle=90*u.degree,
dark_time=87.1054702*u.s,
detector_exposure_id=41203701,
detector_name="29",
Expand All @@ -94,7 +96,8 @@ def test_decam_translator(self):
("fitsheader-decam-instcal-c4d_190402_050618_ooi_VR_v1.yaml",
dict(telescope="CTIO 4.0-m telescope",
instrument="DECam",
boresight_rotation_coord="unknown",
boresight_rotation_coord="sky",
boresight_rotation_angle=90*u.degree,
dark_time=120.7646399*u.s,
detector_exposure_id=84529101,
detector_name="29",
Expand Down