Source code for gemini_instruments.cirpass.adclass

#
#                                                            Gemini Observatory
#
#                                                                        Dragons
#                                                             gemini_instruments
#                                                             cirpass.adclass.py
# ------------------------------------------------------------------------------

from astrodata import astro_data_tag
from astrodata import astro_data_descriptor
from astrodata import returns_list
from astrodata import TagSet

from ..gemini import AstroDataGemini

# ------------------------------------------------------------------------------
[docs]class AstroDataCirpass(AstroDataGemini): __keyword_dict = dict( ra = 'TEL_RA', dec = 'TEC_DEC', ) @staticmethod def _matches_data(source): return source[0].header.get('INSTRUME', '') == 'CIRPASS' @astro_data_tag def _tag_instrument(self): return TagSet(['CIRPASS']) @astro_data_tag def _tag_image(self): return TagSet(['IMAGE']) @astro_data_tag def _tag_dark(self): if 'dark' in self.phu.get('OBSTYPE', '').lower(): return TagSet(['DARK', 'CAL'], blocks=['IMAGE']) @astro_data_tag def _tag_flat(self): if 'flat' in self.phu.get('OBSTYPE', '').lower(): return TagSet(['FLAT', 'CAL']) @astro_data_tag def _tag_bias(self): if 'bias' in self.phu.get('OBSTYPE', '').lower(): return TagSet(['BIAS', 'CAL'], blocks=['IMAGE'])
[docs] @astro_data_descriptor def ra(self): """ Returns the name of the Returns ------- <str>: right ascension """ return self.target_ra()
[docs] @astro_data_descriptor def dec(self): """ Returns the name of the Returns ------- <str>: declination """ return self.target_dec()
[docs] @astro_data_descriptor def target_ra(self): return self.phu.get(self._keyword_for('ra'))
[docs] @astro_data_descriptor def target_dec(self): return self.phu.get(self._keyword_for('dec'))