diff --git a/VERSION b/VERSION index ca41577..4390d50 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -master-v0.9.4 \ No newline at end of file +master-v0.9.5 \ No newline at end of file diff --git a/flows/load_image.py b/flows/load_image.py index 275a2db..6c38436 100644 --- a/flows/load_image.py +++ b/flows/load_image.py @@ -258,9 +258,14 @@ 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 == 'SWO' and hdr.get('SITENAME') == 'LCO': + elif telescope.upper().startswith('SWO') and (hdr.get('SITENAME') == 'LCO' or origin == 'ziggy'): image.site = api.get_site(10) # Hard-coded the siteid for Swope, Las Campanas Observatory - image.obstime = Time(hdr['JD'], format='jd', scale='utc', location=image.site['EarthLocation']) + jd = hdr.get('JD', '') + if jd: + image.obstime = Time(hdr['JD'], format='jd', scale='utc', location=image.site['EarthLocation']) + else: + image.obstime = Time(hdr['MJD-OBS'], format='mjd', scale='utc', location=image.site['EarthLocation']) + image.obstime += 0.5 * image.exptime * u.second # Make time centre of exposure image.photfilter = { 'u': 'up', 'g': 'gp',