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 error when running LST-cal smoothing and a day is fully flagged #968

Closed tyler-a-cox closed 3 months ago

tyler-a-cox commented 3 months ago

This PR fixes an error in LST-cal when smooth_gains=True and a full day is flagged. Currently, this smoothing code sets gains to zeros when the entire band is flagged. This update identifies nights where all baselines are flagged and replaces the smoothed gains with ones.

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 97.16%. Comparing base (a114489) to head (196ef19).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #968 +/- ## ======================================= Coverage 97.16% 97.16% ======================================= Files 31 31 Lines 11066 11067 +1 ======================================= + Hits 10752 10753 +1 Misses 314 314 ``` | [Flag](https://app.codecov.io/gh/HERA-Team/hera_cal/pull/968/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/968/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.