diff --git a/src/addheaderinfo.py b/src/addheaderinfo.py index d3628dd..50c506e 100755 --- a/src/addheaderinfo.py +++ b/src/addheaderinfo.py @@ -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']) @@ -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]) @@ -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