BANE crashes if BSCALE is used due to memmap=True
Closed this issue · 4 comments
BANE is currently crashing if BSCALE is used (and I believe if it is not 1) because BSCALE is not compatible with memmap=True
.
A workaround is to use do_not_scale_image_data=True
in fits.open
within the sigma_filter
function, and operations are then performed on unscaled data, which should (?) be fine as the BSCALE keyword should be propagated into the rms and bkg image headers later on when the images are written to disk anyway.
I'm unsure how this affects aegean (read: I haven't look into how it affects aegean).
Thanks for this report and for your suggestion.
do_not_scale_image_data=True
does indeed avoid the crash, however since the sigma_filter
function is exposed part of the API i'll do the BSCALE correction manually so that we always get the right answer. I'll scale back again when we save to a file.
I can confirm that Aegean is immune to this problem because it doesn't use memmap
to load the fits files (although it should).
This issue has been fixed as of PR #123