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

Implemented compatibility with UVData future_array_shapes #382

Closed adeliegorce closed 1 year ago

adeliegorce commented 1 year ago

This PR makes hera_pspec compatible with the new version of UVData using future_array_shapes (i.e. spw is no longer an axis in data arrays) whilst remaining compatible with older UVPspec objects that could be read. Main features are:

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.04 :tada:

Comparison is base (a6ea0a4) 95.95% compared to head (68d0995) 95.99%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #382 +/- ## ========================================== + Coverage 95.95% 95.99% +0.04% ========================================== Files 17 17 Lines 6099 6113 +14 ========================================== + Hits 5852 5868 +16 + Misses 247 245 -2 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `95.99% <100.00%> (+0.04%)` | :arrow_up: | 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://app.codecov.io/gh/HERA-Team/hera_pspec/pull/382?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team) | Coverage Δ | | |---|---|---| | [hera\_pspec/pspecbeam.py](https://app.codecov.io/gh/HERA-Team/hera_pspec/pull/382?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9wc3BlYy9wc3BlY2JlYW0ucHk=) | `95.89% <100.00%> (+0.53%)` | :arrow_up: | | [hera\_pspec/pspecdata.py](https://app.codecov.io/gh/HERA-Team/hera_pspec/pull/382?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9wc3BlYy9wc3BlY2RhdGEucHk=) | `97.05% <100.00%> (+<0.01%)` | :arrow_up: | | [hera\_pspec/testing.py](https://app.codecov.io/gh/HERA-Team/hera_pspec/pull/382?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9wc3BlYy90ZXN0aW5nLnB5) | `98.36% <100.00%> (+0.86%)` | :arrow_up: | | [hera\_pspec/utils.py](https://app.codecov.io/gh/HERA-Team/hera_pspec/pull/382?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9wc3BlYy91dGlscy5weQ==) | `91.02% <100.00%> (-0.17%)` | :arrow_down: | | [hera\_pspec/uvpspec.py](https://app.codecov.io/gh/HERA-Team/hera_pspec/pull/382?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9wc3BlYy91dnBzcGVjLnB5) | `97.39% <100.00%> (+0.01%)` | :arrow_up: |

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

bhazelton commented 1 year ago

This looks good and is very timely -- we're actively working on pyuvdata 3.0 where we will remove support for the old shapes. One thing I wanted to mention is that we now have quite good support for spectral windows. Each frequency is assigned to a spectral window using the flex_spw_id_array on UVData and UVCal objects. I know that pspec uses spectral windows, so I wanted to highlight this in case it was useful to you.

adeliegorce commented 1 year ago

One thing I wanted to mention is that we now have quite good support for spectral windows. Each frequency is assigned to a spectral window using the flex_spw_id_array on UVData and UVCal objects. I know that pspec uses spectral windows, so I wanted to highlight this in case it was useful to you.

Hi @bhazelton, thanks for the comments! I think this PR is a good occasion to discuss the structure of UVPSpec objects - but might be beyond its scope. We'll keep this feature in mind when doing the large-scale review of the code in the fall :)

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB