Skip to content

Commit

Permalink
Catch AttributeError on RA,DEC for very early science data
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrory committed Nov 8, 2024
1 parent be46ba3 commit 7a01361
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python/lvmdrp/functions/imageMethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -3568,8 +3568,13 @@ def getobsparam(tel):
posangrad=-1*numpy.arctan(CDmatrix[1,0]/CDmatrix[0,0])
PAobs=posangrad*180/numpy.pi
IFUcencoords=outw.pixel_to_world(2500,1000)
RAobs=IFUcencoords.ra.value
DECobs=IFUcencoords.dec.value
try:
# some very early science data apparently fails here
RAobs=IFUcencoords.ra.value
DECobs=IFUcencoords.dec.value
except AttributeError:
RAobs=0
DECobs=0
org_img.setHdrValue('ASTRMSRC', 'GDR coadd', comment='Source of astrometric solution: guider')
copy_guider_keyword(mfheader, 'FRAME0 ', org_img)
copy_guider_keyword(mfheader, 'FRAMEN ', org_img)
Expand Down

0 comments on commit 7a01361

Please sign in to comment.