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

perf: faster updating of RedundantGroups objects #896

Closed steven-murray closed 1 year ago

steven-murray commented 1 year ago

This adds the ability to update the underlying dictionaries mapping baseline groups to their keys (and vice versa) in-place without re-calculating the whole dictionary. This should be quite a bit faster than the original. It also speeds up re-keying on a subset of baselines, which was the problem @tyler-a-cox was seeing previously.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (cd86d09) 97.20% compared to head (7b01f17) 97.20%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #896 +/- ## ======================================= Coverage 97.20% 97.20% ======================================= Files 21 21 Lines 9365 9414 +49 ======================================= + Hits 9103 9151 +48 - Misses 262 263 +1 ``` | [Impacted Files](https://app.codecov.io/gh/HERA-Team/hera_cal/pull/896?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team) | Coverage Δ | | |---|---|---| | [hera\_cal/datacontainer.py](https://app.codecov.io/gh/HERA-Team/hera_cal/pull/896?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9jYWwvZGF0YWNvbnRhaW5lci5weQ==) | `98.37% <100.00%> (-0.01%)` | :arrow_down: | | [hera\_cal/red\_groups.py](https://app.codecov.io/gh/HERA-Team/hera_cal/pull/896?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9jYWwvcmVkX2dyb3Vwcy5weQ==) | `99.50% <100.00%> (-0.50%)` | :arrow_down: |

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