HERA-Team / hera_pspec

HERA power spectrum estimation code and data formats
http://hera-pspec.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Fix bug in log messages. #377

Closed aewallwi closed 1 year ago

aewallwi commented 1 year ago

Errors are being caused by log message line trying to index with upper end of spw_range. The spw-ranges are meant to be inclusive for the base index and exclusive for the end-index (hence being allowed to range up to Nfreqs). Thus we should actually print spw[1] - 1 in the log-error message. If spw[1] = Nfreqs then an error will occur.

codecov[bot] commented 1 year ago

Codecov Report

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

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #377 +/- ## ======================================= Coverage 95.98% 95.98% ======================================= Files 17 17 Lines 6053 6053 ======================================= Hits 5810 5810 Misses 243 243 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `95.98% <100.00%> (ø)` | | 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. | [Impacted Files](https://codecov.io/gh/HERA-Team/hera_pspec/pull/377?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team) | Coverage Δ | | |---|---|---| | [hera\_pspec/pspecdata.py](https://codecov.io/gh/HERA-Team/hera_pspec/pull/377?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9wc3BlYy9wc3BlY2RhdGEucHk=) | `97.11% <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.