HERA-Team / hera_cal

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

Allow update_vis_from_data() to better handle weights that sum to 0 (e.g. flags) #880

Closed jsdillon closed 1 year ago

jsdillon commented 1 year ago

This PR adds handling intelligent handling of weights that include 0s (i.e. flags). Within a baseline group, if everything is flagged, then all weights are equal. If everything is flagged for a single freq/time, but some baselines are completely flagged and others are only partially flagged, the average for that single freq/time is done over the not-completely-flagged baselines.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (7c00d5f) 97.11% compared to head (bef0f6d) 97.12%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #880 +/- ## ======================================= Coverage 97.11% 97.12% ======================================= Files 20 20 Lines 9092 9100 +8 ======================================= + Hits 8830 8838 +8 Misses 262 262 ``` | [Impacted Files](https://codecov.io/gh/HERA-Team/hera_cal/pull/880?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team) | Coverage Δ | | |---|---|---| | [hera\_cal/redcal.py](https://codecov.io/gh/HERA-Team/hera_cal/pull/880?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9jYWwvcmVkY2FsLnB5) | `98.33% <100.00%> (+0.01%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.