spacetelescope / hstaxe

hstaxe is the python and C follow on to the aXe package which was maintained in IRAF for many years.
Other
10 stars 14 forks source link

aXeError when running axetasks.axeprep at task aXe_BE (with G141/F160W, new MAST pipeline files) #7

Open bkornpob opened 4 years ago

bkornpob commented 4 years ago

Problem happened when trying to run pyaxe from newly downloaded data from MAST (with PID='14522', filters=['G141','F160W'], target_name='GD-153', productSubGroupDescription=['FLT']; downloaded 2020-01-10 2pm).

Error report:


aXeError Traceback (most recent call last)

in 5 backims="WFC3.IR.G141.sky.V1.0.fits", 6 norm=False, ----> 7 mfwhm=3.0) ~/anaconda3/envs/pyaxe/lib/python3.7/site-packages/pyaxe/axesrc/axetasks.py in axeprep(inlist, configs, wavelength, backgr, backims, backped, mfwhm, norm, gcorr) 168 gcorr=gcorr) 169 --> 170 aXePrep.run() 171 del aXePrep 172 ~/anaconda3/envs/pyaxe/lib/python3.7/site-packages/pyaxe/axesrc/axepreptor.py in run(self) 546 # make a background PET if necessary 547 if 'backgr' in self.params and self.params['backgr']: --> 548 self._subtract_background(ext_info) 549 550 # make a background PET if necessary ~/anaconda3/envs/pyaxe/lib/python3.7/site-packages/pyaxe/axesrc/axepreptor.py in _subtract_background(self, ext_info) 377 378 # generate the mask image --> 379 self._make_mask() 380 381 # check whether we have NICMOS ~/anaconda3/envs/pyaxe/lib/python3.7/site-packages/pyaxe/axesrc/axepreptor.py in _make_mask(self) 162 mask=True, 163 in_af="", --> 164 out_bck=None) 165 166 def _subtract_sky(self, ext_info, flag=-1.0e10): ~/anaconda3/envs/pyaxe/lib/python3.7/site-packages/pyaxe/axesrc/axetasks.py in backest(grism, config, np, interp, niter_med, niter_fit, kappa, smooth_length, smooth_fwhm, old_bck, mask, in_af, out_bck) 557 in_af=in_af, 558 out_bck=out_bck) --> 559 backest.runall() 560 561 ~/anaconda3/envs/pyaxe/lib/python3.7/site-packages/pyaxe/axesrc/axelowlev.py in runall(self, silent) 150 self._cleanup() 151 else: --> 152 self._report_all(silent) 153 154 # return the result ~/anaconda3/envs/pyaxe/lib/python3.7/site-packages/pyaxe/axesrc/axelowlev.py in _report_all(self, silent) 83 # report an error 84 raise aXeError("An error occurred in the aXe task: {0:s}" ---> 85 .format(self.taskname)) 86 87 def run(self, silent=True): aXeError: An error occurred in the aXe task: aXe_BE

This problem is unusual because using the same data downloaded many weeks ago does not cause any problem.

Further investigation: I found out that the extension list in the old file compared the new one is different. The old one has 7 extensions (PRIMARY, SCI, ERR, DQ, SAMP, TIME, WCSCORR) and the new one has 11 (PRIMARY, SCI, ERR, DQ, SAMP, TIME, HDRLET, HDRLET, HDRLET, WCSCORR, HDRLET, HDRLET). I think this might be the cause of the error.

Further investigation: I posted this question on Slacks and the answers were that there was an update to improve the astrometry by integrating Gaia data.

ivastar commented 4 years ago

Here is info about the astrometry: https://outerspace.stsci.edu/pages/viewpage.action?spaceKey=HAdP&title=Improvements+in+HST+Astrometry