HERA-Team / hera_qm

HERA Data Quality Metrics
MIT License
2 stars 2 forks source link

Slight speedup of `even_odd_zeros_checker()` #430

Closed jsdillon closed 1 year ago

jsdillon commented 1 year ago

This PR speeds up even_odd_zeros_checker by about 25% by not doing a separate sum calculation for zero_count_by_ant which is only used to order antennas.

FYI, just tested the speedup of even_odd_zeros_checker that @tyler-a-cox and @AaronParsons discussed today. Unfortunately, it makes it less reliable, because there are many more instances where the data and diff_data have the same real component than cases where both the real and imaginary components match. I’m finding baselines with ~20 matches, which is getting uncomfortably close to the size of an X-engine (making absolute bounds trickier). It may be that those antennas are also broken in some other way, but I’d rather eat the extra second and make this a clean test that clearly reports out which antennas are dropping packets or have broken X-engines.

codecov[bot] commented 1 year ago

Codecov Report

Base: 97.04% // Head: 97.04% // No change to project coverage :thumbsup:

Coverage data is based on head (babc29f) compared to base (32bfdb8). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #430 +/- ## ======================================= Coverage 97.04% 97.04% ======================================= Files 9 9 Lines 3515 3515 ======================================= Hits 3411 3411 Misses 104 104 ``` | [Impacted Files](https://codecov.io/gh/HERA-Team/hera_qm/pull/430?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team) | Coverage Δ | | |---|---|---| | [hera\_qm/ant\_class.py](https://codecov.io/gh/HERA-Team/hera_qm/pull/430/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9xbS9hbnRfY2xhc3MucHk=) | `97.43% <100.00%> (ø)` | | 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 at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.