You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because numpy's default dtype for arrays is float64 the precision of the SCI, ERR, and TIME arrays get stored with twice the precision they start with in the IMA. This isn't a huge deal overall, but it increases file size by a good chunk (I think ~60%) and for some reason, causes TweakReg to crash when attempting to find sources. Putting a .astype(np.float32) on the end of the data = science_data[5:-5,5:-5] and similar for the other two arrays should fix this.
The diff output files also have the EXTVER keyword set to whatever it was in the IMA for that extension. This also causes crashes in drizzlepac tools, as they can't find extension 'SCI', 1 as the EXTVER for all but one of the diff files is set to something >1. Manually setting the EXTVER to 1 fixes the crash.
Lastly, the diff files do not carry the distortion information in the headers of the SCI hdus. This causes a crash when attempting to align/drizzle the files. Running updatewcs() fixes that.
If, in practice drizzlepac, tools aren't going to be used for these reductions then most of this issue may not matter, but with these changes the files behave well with Drizzle.
The text was updated successfully, but these errors were encountered:
Vb2341
changed the title
split_ima() output files have wrong data type and EXTVER, also lack distortion info
split_ima() output files have wrong data type and EXTVER, also lack distortion info
Jan 31, 2019
wfc3_dash/wfc3_dash/reduce_dash.py
Line 165 in 359a3e8
Because numpy's default dtype for arrays is float64 the precision of the SCI, ERR, and TIME arrays get stored with twice the precision they start with in the IMA. This isn't a huge deal overall, but it increases file size by a good chunk (I think ~60%) and for some reason, causes TweakReg to crash when attempting to find sources. Putting a
.astype(np.float32)
on the end of thedata = science_data[5:-5,5:-5]
and similar for the other two arrays should fix this.The
diff
output files also have theEXTVER
keyword set to whatever it was in the IMA for that extension. This also causes crashes in drizzlepac tools, as they can't find extension'SCI', 1
as theEXTVER
for all but one of thediff
files is set to something >1. Manually setting theEXTVER
to 1 fixes the crash.Lastly, the
diff
files do not carry the distortion information in the headers of theSCI
hdus. This causes a crash when attempting to align/drizzle the files. Runningupdatewcs()
fixes that.If, in practice drizzlepac, tools aren't going to be used for these reductions then most of this issue may not matter, but with these changes the files behave well with Drizzle.
The text was updated successfully, but these errors were encountered: