Skip to content

Commit

Permalink
use ra,dec in degrees in the modified fits header
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolffu committed Nov 2, 2022
1 parent ef45935 commit 1faf705
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/addheaderinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def UtcHours(utctime):
coord = SkyCoord(otbl['hmsdms'].values, frame='icrs',
unit=(u.hourangle, u.deg))
otbl['rah'] = coord.ra.to(u.hourangle).value
otbl['radeg'] = coord.ra.to(u.degree).value
otbl['decdeg'] = coord.dec.to(u.degree).value
notbl = otbl.merge(fitslist, on="filen")
notbl['utctime'] = map(NewUtc, notbl['filen'])
Expand Down Expand Up @@ -99,10 +100,6 @@ def UtcHours(utctime):
iraf.hedit.delete = False
iraf.hedit.update = True
iraf.hedit.verify = False
iraf.hedit(images=notbl['filen'][i],
fields='ra', value=notbl['rah'][i])
iraf.hedit(images=notbl['filen'][i],
fields='dec', value=notbl['decdeg'][i])
iraf.hedit(images=notbl['filen'][i],
fields='object', value=notbl['Obj'][i])
iraf.hedit(images=notbl['filen'][i], fields='st', value=notbl['st'][i])
Expand All @@ -119,5 +116,9 @@ def UtcHours(utctime):
st='st',
ut='ut',
date='UTDTIME')
iraf.hedit(images=notbl['filen'][i],
fields='ra', value=notbl['radeg'][i])
iraf.hedit(images=notbl['filen'][i],
fields='dec', value=notbl['decdeg'][i])
except:
pass

0 comments on commit 1faf705

Please sign in to comment.