Closed steven-murray closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
d89aaff
) 97.17% compared to head (7de3c49
) 97.17%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I think there were two things wrong here. So the way the code works is that it makes
data
andnsamples
masked arrays. The masks are inpaint-aware flags (if inpaint mode is one), but theflags
array is just the raw flags. After setting these masks, I was doing the flag thresholding, which set some new flags based on thresholds over the days for the old flags, but then I reset the masks to these new updated flags, which include all the raw flags. So I've fixed that.Another thing that was happening is that the
std
was using the inpaint-aware flags, but it should be using the raw flags (so a completely flagged (but inpainted) integration should have a mean value, but std=inf.I think the code already naturally handles the case where all the days are flagged (for a particular lst/freq/pol) in inpainted mode by giving it a non-nan average, so the discrepancy there was probably due to the other bugs.