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

Fix red groups #938

Closed steven-murray closed 5 months ago

steven-murray commented 6 months ago

This fixes a subtle bug in defining redundant groups.

The bug was manifesting when using the keyed_on_bls() method. This method is meant to take a particular set of redundant baselines, which have a particular unique key, and re-key so that the key must be one of a given set of baselines. However, when the given set of baselines contains the reverse of the given key, this was failing.

Along with fixing this problem, this adds the .get_bls_in_set() method, which is a more intuitive way of doing the same operation (but is not cached for re-use as the re-keying is).

codecov[bot] commented 5 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (54dc2ed) 97.17% compared to head (bdc4b0e) 97.17%.

:exclamation: Current head bdc4b0e differs from pull request most recent head eb3ba7e. Consider uploading reports for the commit eb3ba7e to get more accurate results

Files Patch % Lines
hera_cal/lst_stack/binning.py 80.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #938 +/- ## ========================================== - Coverage 97.17% 97.17% -0.01% ========================================== Files 28 28 Lines 10218 10250 +32 ========================================== + Hits 9929 9960 +31 - Misses 289 290 +1 ``` | [Flag](https://app.codecov.io/gh/HERA-Team/hera_cal/pull/938/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/938/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team) | `97.17% <98.03%> (-0.01%)` | :arrow_down: | 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.