diff --git a/ctapipe/containers.py b/ctapipe/containers.py index 3fbb88a762c..bd2ea03d479 100644 --- a/ctapipe/containers.py +++ b/ctapipe/containers.py @@ -1056,6 +1056,8 @@ class TelescopePointingContainer(Container): between camera and sky coordinates. """ + default_prefix = "telescope_pointing" + azimuth = Field(nan * u.rad, "Azimuth, measured N->E", unit=u.rad) altitude = Field(nan * u.rad, "Altitude", unit=u.rad) diff --git a/ctapipe/io/pointing.py b/ctapipe/io/pointing.py index 81f1683504f..e78e913ccbe 100644 --- a/ctapipe/io/pointing.py +++ b/ctapipe/io/pointing.py @@ -44,10 +44,10 @@ def _read_pointing_table(self, tel_id): pointing_table.sort("time") mjd = pointing_table["time"].tai.mjd - az = pointing_table["azimuth"].quantity.to_value(u.rad) + az = pointing_table["telescope_pointing_azimuth"].quantity.to_value(u.rad) # prepare azimuth for interpolation "unwrapping", i.e. turning 359, 1 into 359, 361 az = np.unwrap(az) - alt = pointing_table["altitude"].quantity.to_value(u.rad) + alt = pointing_table["telescope_pointing_altitude"].quantity.to_value(u.rad) self._az_interpolators[tel_id] = interp1d(mjd, az, **self.interp_options) self._alt_interpolators[tel_id] = interp1d(mjd, alt, **self.interp_options) diff --git a/ctapipe/io/tests/test_table_loader.py b/ctapipe/io/tests/test_table_loader.py index 8f066c6d02c..b25460f7bf7 100644 --- a/ctapipe/io/tests/test_table_loader.py +++ b/ctapipe/io/tests/test_table_loader.py @@ -462,7 +462,13 @@ def test_interpolate_pointing(dl1_file, tmp_path): alt = (69 + 2 * dt / dt[-1]) * u.deg az = (180 + 5 * dt / dt[-1]) * u.deg - table = Table({"time": time_mon, "azimuth": az, "altitude": alt}) + table = Table( + { + "time": time_mon, + "telescope_pointing_azimuth": az, + "telescope_pointing_altitude": alt, + } + ) for tel_id in subarray.tel: write_table(table, path, f"/dl0/monitoring/telescope/pointing/tel_{tel_id:03d}")