From e2540f31bfc9dc08d3a74c58b6808eede64afd6d Mon Sep 17 00:00:00 2001 From: Kim4213 <70318424+Kim4213@users.noreply.github.com> Date: Tue, 11 Apr 2023 12:19:32 +0200 Subject: [PATCH 01/12] Update instruments.py Adding IR-filters to ANDICAM and adding filters for TJO MEIA3 --- flows/instruments/instruments.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index 2689d56..848313f 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -432,7 +432,11 @@ def get_obstime(self): return obstime def get_photfilter(self): - return self.image.header['CCDFLTID'] + instrument = self.image.header['INSTRUME'] + if instrument == 'ANDICAM-IR': + return self.image.header['CCDFLTID'] + elif instrument == 'ANDICAM-CCD': + return self.image.header['CCDFLTID'] class PairTel(Instrument): @@ -473,7 +477,15 @@ def get_obstime(self): obstime = super().get_obstime() obstime += 0.5 * self.image.exptime * u.second return obstime + + def get_photfilter(self): + tjo_filt = self.image.header['FILTER'] + if tjo_filt in ['SDSS g ', 'SDSS r ', 'SDSS i ', 'SDSS z ']: + return {'SDSS g '.'gp', 'SDSS r ':'rp', 'SDSS i ':'ip', 'SDSS z ':'zp'}.get(tjo_filt) + return tjo_filt + + class RATIR(Instrument): siteid = 23 From d1284ffa85a672a4cb78bf0497967415399e2223 Mon Sep 17 00:00:00 2001 From: Kim4213 <70318424+Kim4213@users.noreply.github.com> Date: Wed, 12 Apr 2023 14:21:45 +0200 Subject: [PATCH 02/12] Update instruments.py --- flows/instruments/instruments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index 848313f..225b0e9 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -481,7 +481,7 @@ def get_obstime(self): def get_photfilter(self): tjo_filt = self.image.header['FILTER'] if tjo_filt in ['SDSS g ', 'SDSS r ', 'SDSS i ', 'SDSS z ']: - return {'SDSS g '.'gp', 'SDSS r ':'rp', 'SDSS i ':'ip', 'SDSS z ':'zp'}.get(tjo_filt) + return {'SDSS g ':'gp', 'SDSS r ':'rp', 'SDSS i ':'ip', 'SDSS z ':'zp'}.get(tjo_filt) return tjo_filt From 4e372b69b2e33bc5ee82daccf13c72be8cee6bb0 Mon Sep 17 00:00:00 2001 From: Kim4213 Date: Wed, 12 Apr 2023 14:25:31 +0200 Subject: [PATCH 03/12] Update instruments.py --- flows/instruments/instruments.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index 848313f..fe4c617 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -477,15 +477,15 @@ def get_obstime(self): obstime = super().get_obstime() obstime += 0.5 * self.image.exptime * u.second return obstime - + def get_photfilter(self): tjo_filt = self.image.header['FILTER'] if tjo_filt in ['SDSS g ', 'SDSS r ', 'SDSS i ', 'SDSS z ']: - return {'SDSS g '.'gp', 'SDSS r ':'rp', 'SDSS i ':'ip', 'SDSS z ':'zp'}.get(tjo_filt) + return {'SDSS g ':'gp', 'SDSS r ':'rp', 'SDSS i ':'ip', 'SDSS z ':'zp'}.get(tjo_filt) return tjo_filt - - + + class RATIR(Instrument): siteid = 23 From 8fe39db10cc8c85432416c40fa84a58984a405ac Mon Sep 17 00:00:00 2001 From: Kim4213 Date: Wed, 12 Apr 2023 15:25:44 +0200 Subject: [PATCH 04/12] Update instruments.py --- flows/instruments/instruments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index fe4c617..c5fdd5f 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -434,7 +434,7 @@ def get_obstime(self): def get_photfilter(self): instrument = self.image.header['INSTRUME'] if instrument == 'ANDICAM-IR': - return self.image.header['CCDFLTID'] + return self.image.header['IRFLTID'] elif instrument == 'ANDICAM-CCD': return self.image.header['CCDFLTID'] From 7c63974375f1a7114f1c43bc89d7b155289e8eb2 Mon Sep 17 00:00:00 2001 From: Kim4213 Date: Wed, 12 Apr 2023 15:41:29 +0200 Subject: [PATCH 05/12] Update instruments.py --- flows/instruments/instruments.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index c5fdd5f..bee348b 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -478,14 +478,6 @@ def get_obstime(self): obstime += 0.5 * self.image.exptime * u.second return obstime - def get_photfilter(self): - tjo_filt = self.image.header['FILTER'] - if tjo_filt in ['SDSS g ', 'SDSS r ', 'SDSS i ', 'SDSS z ']: - return {'SDSS g ':'gp', 'SDSS r ':'rp', 'SDSS i ':'ip', 'SDSS z ':'zp'}.get(tjo_filt) - return tjo_filt - - - class RATIR(Instrument): siteid = 23 From ad3ff8938adb2f992c612c09919e38210b169eaf Mon Sep 17 00:00:00 2001 From: Kim4213 Date: Wed, 12 Apr 2023 16:45:21 +0200 Subject: [PATCH 06/12] Update instruments.py --- flows/instruments/instruments.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index bee348b..c7a2134 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -437,6 +437,8 @@ def get_photfilter(self): return self.image.header['IRFLTID'] elif instrument == 'ANDICAM-CCD': return self.image.header['CCDFLTID'] + else: + return self.image.header['CCDFLTID'] class PairTel(Instrument): From 2a7c058e420ce831404c991f03266f194e9edc1b Mon Sep 17 00:00:00 2001 From: Kim4213 Date: Wed, 12 Apr 2023 17:05:32 +0200 Subject: [PATCH 07/12] Update instruments.py --- flows/instruments/instruments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index c7a2134..419b70d 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -438,7 +438,7 @@ def get_photfilter(self): elif instrument == 'ANDICAM-CCD': return self.image.header['CCDFLTID'] else: - return self.image.header['CCDFLTID'] + print("Could not find instrument in header") class PairTel(Instrument): From ad8b9a9cf31dbd443d89be445f347f91268442c9 Mon Sep 17 00:00:00 2001 From: Kim4213 Date: Fri, 14 Apr 2023 10:07:07 +0200 Subject: [PATCH 08/12] Update instruments.py --- flows/instruments/instruments.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index 419b70d..8df2dc9 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -432,13 +432,21 @@ def get_obstime(self): return obstime def get_photfilter(self): - instrument = self.image.header['INSTRUME'] - if instrument == 'ANDICAM-IR': - return self.image.header['IRFLTID'] - elif instrument == 'ANDICAM-CCD': - return self.image.header['CCDFLTID'] - else: - print("Could not find instrument in header") + return self.image.header['CCDFLTID'] + + +class AndiCamIR(Instrument): + siteid = 20 # Hard-coded the siteid for ANDICAM at Cerro Tololo Interamerican Observatory (CTIO) + instrument = 'ANDICAM-IR' + unique_headers = {'OBSERVAT': 'CTIO'} + + def get_obstime(self): + obstime = super().get_obstime() + obstime += 0.5 * self.image.exptime * u.second + return obstime + + def get_photfilter(self): + return self.image.header['IRFLTID'] class PairTel(Instrument): From 6194c5d5d6d8142c4bb0d74c1122d2ae5084e28f Mon Sep 17 00:00:00 2001 From: Kim4213 Date: Fri, 14 Apr 2023 10:46:22 +0200 Subject: [PATCH 09/12] Update instruments.py --- flows/instruments/instruments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index 8df2dc9..0349b9a 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -437,7 +437,7 @@ def get_photfilter(self): class AndiCamIR(Instrument): siteid = 20 # Hard-coded the siteid for ANDICAM at Cerro Tololo Interamerican Observatory (CTIO) - instrument = 'ANDICAM-IR' + instrument = 'ANDICAM-CCD' unique_headers = {'OBSERVAT': 'CTIO'} def get_obstime(self): From 1e4dc9999c77c5c93c01fa2ba6bbe053b5a5ed49 Mon Sep 17 00:00:00 2001 From: Kim4213 Date: Fri, 14 Apr 2023 11:23:35 +0200 Subject: [PATCH 10/12] Update instruments.py --- flows/instruments/instruments.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index 0349b9a..7247045 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -436,14 +436,13 @@ def get_photfilter(self): class AndiCamIR(Instrument): - siteid = 20 # Hard-coded the siteid for ANDICAM at Cerro Tololo Interamerican Observatory (CTIO) + andicam = AndiCam() + siteid = andicam.siteid # Hard-coded the siteid for ANDICAM at Cerro Tololo Interamerican Observatory (CTIO) instrument = 'ANDICAM-CCD' - unique_headers = {'OBSERVAT': 'CTIO'} + unique_headers = andicam.unique_headers def get_obstime(self): - obstime = super().get_obstime() - obstime += 0.5 * self.image.exptime * u.second - return obstime + return andicam.get_obstime() def get_photfilter(self): return self.image.header['IRFLTID'] From 7000a2b320d54c5233675bf5e1594838a9fb584f Mon Sep 17 00:00:00 2001 From: Kim4213 Date: Fri, 14 Apr 2023 11:28:43 +0200 Subject: [PATCH 11/12] Update instruments.py --- flows/instruments/instruments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index 7247045..704fef8 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -445,7 +445,7 @@ def get_obstime(self): return andicam.get_obstime() def get_photfilter(self): - return self.image.header['IRFLTID'] + return self.image.header['CCDFLTID'] class PairTel(Instrument): From c3f9e196797bbefbe9a17db85a94c28e91b7c482 Mon Sep 17 00:00:00 2001 From: Kim4213 Date: Fri, 14 Apr 2023 11:53:21 +0200 Subject: [PATCH 12/12] Update instruments.py --- flows/instruments/instruments.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/flows/instruments/instruments.py b/flows/instruments/instruments.py index 704fef8..952ae5d 100644 --- a/flows/instruments/instruments.py +++ b/flows/instruments/instruments.py @@ -435,17 +435,7 @@ def get_photfilter(self): return self.image.header['CCDFLTID'] -class AndiCamIR(Instrument): - andicam = AndiCam() - siteid = andicam.siteid # Hard-coded the siteid for ANDICAM at Cerro Tololo Interamerican Observatory (CTIO) - instrument = 'ANDICAM-CCD' - unique_headers = andicam.unique_headers - - def get_obstime(self): - return andicam.get_obstime() - def get_photfilter(self): - return self.image.header['CCDFLTID'] class PairTel(Instrument):