Eureka
Eureka copied to clipboard
[Enhancement]: Change data.mask convention in Stages 3+
Instrument
Other (any stage)
What is your suggestion?
At present, the Stage 3 code sets data.mask to True where there is good data and data.mask to False where the data is bad. This is the opposite convention of numpy masked arrays and is confusing to understand if you send someone your FluxData.h5 file since most people, including myself, are likely to assume that a point should be masked if data.mask is True. The current convention was moderately convenient at one point since doing flux*mask
zeroes out pixels that shouldn't be used, but I'm pretty sure we're using numpy masked arrays throughout now.
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
We will need to thoroughly test any changes that address this enhancement. There are many places in the code were we could introduce a bug by not accounting for this switch.
@kevin218, since this will break backwards compatibility with old save files, I figure this is a now-or-never task (aka not something we can leave for v1.1). I don't think it critical and we could just abandon it, but it is confusing and has tripped me up on occasion. I'm not 100% sure, but I think the masking convention is also the opposite for Stages 4+ compared to Stage 3.
@taylorbell57 I agree that this is a now or never scenario. I support changing data.mask for v1.0.
Alright, I'll aim to have that done before the end of the week