HERA-Team / hera_cal

Library for HERA data reduction, including redundant calibration, absolute calibration, and LST-binning.
MIT License
11 stars 8 forks source link

fix: force flagged averaged data to be inf #975

Closed steven-murray closed 2 months ago

steven-murray commented 2 months ago

Fixes a weird bug where flagged values in the mean turned out to be 0 regardless of the value of mean_fill_value, and this was causing nans in the variance in simultaneous inpainting. This fix is a patch-up; we should investigate the root cause (something to do with MaskedArray behaviour that I don't understand).

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.16%. Comparing base (62196c7) to head (529e3f4).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #975 +/- ## ======================================= Coverage 97.16% 97.16% ======================================= Files 31 31 Lines 11063 11064 +1 ======================================= + Hits 10749 10750 +1 Misses 314 314 ``` | [Flag](https://app.codecov.io/gh/HERA-Team/hera_cal/pull/975/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/HERA-Team/hera_cal/pull/975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team) | `97.16% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.