Skip to content

Commit

Permalink
Merge pull request #123 from SNflows/add_filter
Browse files Browse the repository at this point in the history
Added TNG filter
  • Loading branch information
Kim4213 authored Nov 10, 2022
2 parents 172a442 + 17fe0e8 commit c7e98d2
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions flows/instruments/instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,3 +550,34 @@ def get_photfilter(self):
# RetroCam, 'Baade': Baade,
# 'Sofi': Sofi, 'EFOSC': EFOSC, 'AstroNIRCam': AstroNIRCam, 'OmegaCam': OmegaCam, 'AndiCam': AndiCam,
# 'PairTel': PairTel, 'TJO_Meia2': TJO_MEIA2, 'TJO_Meia3': TJO_MEIA3, 'RATIR': RATIR, "Schmidt": Schmidt, "AFOSC": AFOSC}

class TNG(Instrument):
siteid = 5 # same as NOT
peakmax = None # Lluis did not provide this so it is in header??
#instrument = 'LRS'
#telescope = 'TNG'

unique_headers = {'TELESCOP':'TNG', 'INSTRUME':'LRS'} # assume we use unique headers?


def get_obstime(self):
return Time(self.image.header['DATE-OBS'], format='isot', scale='utc',
location=self.image.site['EarthLocation'])


def get_exptime(self):
exptime = super().get_exptime()
exptime *= int(self.image.header['EXPTIME'])
return exptime

def get_photfilter(self):
ratir_filt = self.image.header['FLT_ID']
if ratir_filt in ['B_John_10', 'g_sdss_30', 'r_sdss_31', 'i_sdss_32',
'u_sdss_29', 'V_John_11']:
return {'B_John_10': 'B', 'g_sdss_30':'g', 'r':'r_sdss_31',
'i_sdss_32':'i', 'u_sdss_29':'u', 'V_John_11':'V_John_11' }.get(ratir_filt)
return ratir_filt




0 comments on commit c7e98d2

Please sign in to comment.