From 53f79199d3acb9e7763f27f93f4fe06870d36720 Mon Sep 17 00:00:00 2001 From: Emir K Date: Tue, 26 Apr 2022 20:38:36 +0200 Subject: [PATCH 1/2] add ratir to load_image --- flows/load_image.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flows/load_image.py b/flows/load_image.py index 3693582..e97857d 100644 --- a/flows/load_image.py +++ b/flows/load_image.py @@ -381,6 +381,11 @@ def load_image(FILENAME, target_coord=None): image.obstime += 0.5*image.exptime * u.second # Make time centre of exposure image.photfilter = hdr['FILTER'] + elif telescope == "OAN/SPM Harold L. Johnson 1.5-meter": + image.site = api.get_site(23) # Hard-coded the siteid for Harold L. Johnson 1.5-meter + image.obstime = Time(hdr['DATE-OBS'], format='isot', scale='utc', location=image.site['EarthLocation']) + image.photfilter = hdr['FILTER'] + else: raise RuntimeError("Could not determine origin of image") From b8bde28c975eeb3696cc97a50087234d0d89677d Mon Sep 17 00:00:00 2001 From: Emir K Date: Tue, 26 Apr 2022 20:46:26 +0200 Subject: [PATCH 2/2] tabs --- flows/load_image.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/flows/load_image.py b/flows/load_image.py index e97857d..275a2db 100644 --- a/flows/load_image.py +++ b/flows/load_image.py @@ -380,12 +380,10 @@ def load_image(FILENAME, target_coord=None): image.obstime = Time(hdr['JD'], format='jd', scale='utc', location=image.site['EarthLocation']) image.obstime += 0.5*image.exptime * u.second # Make time centre of exposure image.photfilter = hdr['FILTER'] - - elif telescope == "OAN/SPM Harold L. Johnson 1.5-meter": - image.site = api.get_site(23) # Hard-coded the siteid for Harold L. Johnson 1.5-meter - image.obstime = Time(hdr['DATE-OBS'], format='isot', scale='utc', location=image.site['EarthLocation']) - image.photfilter = hdr['FILTER'] - + elif telescope == "OAN/SPM Harold L. Johnson 1.5-meter": + image.site = api.get_site(23) # Hard-coded the siteid for Harold L. Johnson 1.5-meter + image.obstime = Time(hdr['DATE-OBS'], format='isot', scale='utc', location=image.site['EarthLocation']) + image.photfilter = hdr['FILTER'] else: raise RuntimeError("Could not determine origin of image")