Coverage for python/lsst/obs/lsst/translators/imsim.py : 63%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# This file is currently part of obs_lsst but is written to allow it # to be migrated to the astro_metadata_translator package at a later date. # # This product includes software developed by the LSST Project # (http://www.lsst.org). # See the LICENSE file in this directory for details of code ownership. # # Use of this source code is governed by a 3-clause BSD-style # license that can be found in the LICENSE file.
"""Metadata translation class for ImSim headers"""
"""Name of this translation class"""
"instrument": "ImSim", "boresight_rotation_coord": "sky", "object": "UNKNOWN", "pressure": None, "temperature": None, "relative_humidity": 40.0, }
"detector_group": "RAFTNAME", "detector_name": "SENSNAME", "observation_id": "OBSID", "science_program": "RUNNUM", "exposure_id": "OBSID", "visit_id": "OBSID", "physical_filter": "FILTER", "dark_time": ("DARKTIME", dict(unit=u.s)), "exposure_time": ("EXPTIME", dict(unit=u.s)), "detector_serial": "LSST_NUM", "boresight_rotation_angle": ("ROTANGLE", dict(unit=u.deg)), }
"""Indicate whether this translation class can translate the supplied header.
There is no ``INSTRUME`` header in ImSim data. Instead we use the ``TESTTYPE`` header.
Parameters ---------- header : `dict`-like Header to convert to standardized form. filename : `str`, optional Name of file being translated.
Returns ------- can : `bool` `True` if the header is recognized by this class. `False` otherwise. """ return cls.can_translate_with_options(header, {"TESTTYPE": "IMSIM"}, filename=filename)
def to_tracking_radec(self): # Docstring will be inherited. Property defined in properties.py radecsys = ("RADESYS",) radecpairs = (("RATEL", "DECTEL"),) return tracking_from_degree_headers(self, radecsys, radecpairs)
def to_boresight_airmass(self): # Docstring will be inherited. Property defined in properties.py altaz = self.to_altaz_begin() if altaz is not None: return altaz.secz.to_value() return None |