Open kbwestfall opened 2 weeks ago
astropy==6.1.4 ccdproc==2.4.2 numpy==2.1.2
The current implementation of Combine.sigma_clipping overwrites any existing mask. Is that intended?
Combine.sigma_clipping
I.e., instead of:
self.data_arr.mask = sigma_clip(self.data_arr.data, sigma_lower=low_thresh, sigma_upper=high_thresh, axis=kwd.get('axis', 0), copy=kwd.get('copy', False), maxiters=kwd.get('maxiters', 1), cenfunc=func, stdfunc=dev_func, masked=True, **kwd).mask
would it make sense to instead do:
self.data_arr.mask |= sigma_clip(self.data_arr.data, sigma_lower=low_thresh, sigma_upper=high_thresh, axis=kwd.get('axis', 0), copy=kwd.get('copy', False), maxiters=kwd.get('maxiters', 1), cenfunc=func, stdfunc=dev_func, masked=True, **kwd).mask
If so, I can submit a short PR.
Good catch, I think you are right
astropy==6.1.4 ccdproc==2.4.2 numpy==2.1.2
The current implementation of
Combine.sigma_clipping
overwrites any existing mask. Is that intended?I.e., instead of:
would it make sense to instead do:
If so, I can submit a short PR.