Skip to content

Commit

Permalink
Merge branch 'master' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
rhandberg committed May 12, 2022
2 parents b46432b + 6189dd2 commit cf55dba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
master-v0.9.4
master-v0.9.5
14 changes: 14 additions & 0 deletions flows/load_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,20 @@ def get_exptime(self):
raise ValueError("Image exposure time could not be extracted")
return exptime

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
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',
'r': 'rp',
'i': 'ip',
}.get(hdr['FILTER'], hdr['FILTER'])
def get_obstime(self):
"""Default for JD, jd, utc."""
return Time(self.image.header['JD'], format='jd', scale='utc', location=self.image.site['EarthLocation'])
Expand Down

3 comments on commit cf55dba

@emirkmo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second part of this commit is wrong, only the version should have been updated. Reminder to myself to fix this. Not sure why this got merged into devel.

@rhandberg
Copy link
Contributor Author

@rhandberg rhandberg commented on cf55dba May 16, 2022 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emirkmo
Copy link
Member

@emirkmo emirkmo commented on cf55dba May 16, 2022 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.