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-28612: Enable tracking ra/dec calculation for LSSTCam #283
Conversation
Currently tests by using the phosim emulation. Punts the comcam work until real examples exist. $ translate_header.py -p lsst.obs.lsst.translators tests/headers/lsstCam-MC_H_20000217_000032_R22_S00.yaml Analyzing tests/headers/lsstCam-MC_H_20000217_000032_R22_S00.yaml... WARNING:lsst.obs.lsst.translators.lsst:tests/headers/lsstCam-MC_H_20000217_000032_R22_S00.yaml(MC_H_20000217_000032): Unable to determine airmass of a science observation, returning 1. instrument: LSSTCam telescope: Simonyi Survey Telescope datetime_begin: 2000-02-17T02:14:33.319 altaz_begin: None boresight_airmass: 1.0 boresight_rotation_angle: 0.0 deg boresight_rotation_coord: sky dark_time: 15.0 s datetime_end: 2000-02-17T02:14:48.319 detector_exposure_id: 4000021700032090 detector_group: R22 detector_name: S00 detector_num: 90 detector_serial: E2V-CCD250-369 detector_unique_name: R22_S00 exposure_group: 4000021700032 exposure_id: 4000021700032 exposure_time: 15.0 s location: (1818938.94323602, -5208470.950938, -3195172.08426757) m object: UNKNOWN observation_counter: 32 observation_id: MC_H_20000217_000032 observation_reason: phosim observation_type: science observing_day: 20000217 physical_filter: g pressure: None relative_humidity: None science_program: 9006001 temperature: None tracking_radec: <SkyCoord (ICRS): (ra, dec) in deg (0., 0.)> visit_id: 4000021700032
0309ccb
to
795469b
Compare
@@ -637,7 +637,7 @@ def to_tracking_radec(self): | |||
if self._header["DATE-OBS"] == self._header["DATE"]: | |||
# A fixed up date -- use AZEL as source of truth | |||
altaz = self.to_altaz_begin() | |||
radec = astropy.coordinates.SkyCoord(altaz.transform_to(astropy.coordinates.ICRS), | |||
radec = astropy.coordinates.SkyCoord(altaz.transform_to(astropy.coordinates.ICRS()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm reading correctly, transform_to()
can accept a class as well as an instance. Why the more verbose usage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I thought too but in astropy 4.2 the code issues a deprecation warning if a class is used.
with warnings.catch_warnings(): | ||
warnings.simplefilter("ignore", category=astropy.utils.exceptions.AstropyWarning) | ||
altaz = radec.transform_to(AltAz) | ||
altaz = radec.transform_to(AltAz()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here about class vs. instance.
No description provided.