HERA-Team / hera_sim

Simple simulation code for HERA-like redundant interferometric arrays
Other
16 stars 8 forks source link

Memory profiling #237

Closed steven-murray closed 1 year ago

steven-murray commented 2 years ago

This PR adds quite a lot of functionality/performance improvement.

Fixes #191

Highlights include:

Overall, with these improvements, I was able to take a run of 5760 times and 126 antennas from 5min + >30min (for simulation + setup/reorder/write) down to 5min + ~40sec.

steven-murray commented 2 years ago

I should say that this is waiting on https://github.com/RadioAstronomySoftwareGroup/pyuvdata/pull/1205 and https://github.com/RadioAstronomySoftwareGroup/pyuvsim/pull/410 before it will pass tests.

piyanatk commented 1 year ago

This line in hera-sim-vis.py will error when using analytic beams https://github.com/HERA-Team/hera_sim/blob/03d13da0b921216855e10ac15b36d83013631254/scripts/hera-sim-vis.py#L128 Should I open an issue? It is still in a PR so I am not sure if I should

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 90.49% and project coverage change: -3.00 :warning:

Comparison is base (7d860d8) 96.04% compared to head (833c03c) 93.04%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #237 +/- ## ========================================== - Coverage 96.04% 93.04% -3.00% ========================================== Files 23 24 +1 Lines 2961 3165 +204 Branches 0 692 +692 ========================================== + Hits 2844 2945 +101 - Misses 117 121 +4 - Partials 0 99 +99 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `93.01% <90.04%> (-3.04%)` | :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. | [Impacted Files](https://app.codecov.io/gh/HERA-Team/hera_sim/pull/237?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team) | Coverage Δ | | |---|---|---| | [hera\_sim/adjustment.py](https://app.codecov.io/gh/HERA-Team/hera_sim/pull/237?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9zaW0vYWRqdXN0bWVudC5weQ==) | `99.48% <ø> (-0.52%)` | :arrow_down: | | [hera\_sim/visibilities/vis\_cpu.py](https://app.codecov.io/gh/HERA-Team/hera_sim/pull/237?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9zaW0vdmlzaWJpbGl0aWVzL3Zpc19jcHUucHk=) | `84.78% <83.05%> (-8.13%)` | :arrow_down: | | [hera\_sim/visibilities/simulators.py](https://app.codecov.io/gh/HERA-Team/hera_sim/pull/237?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9zaW0vdmlzaWJpbGl0aWVzL3NpbXVsYXRvcnMucHk=) | `80.31% <92.59%> (+1.48%)` | :arrow_up: | | [hera\_sim/visibilities/cli.py](https://app.codecov.io/gh/HERA-Team/hera_sim/pull/237?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9zaW0vdmlzaWJpbGl0aWVzL2NsaS5weQ==) | `92.96% <92.96%> (ø)` | | | [hera\_sim/beams.py](https://app.codecov.io/gh/HERA-Team/hera_sim/pull/237?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9zaW0vYmVhbXMucHk=) | `97.73% <100.00%> (-0.91%)` | :arrow_down: | | [hera\_sim/cli\_utils.py](https://app.codecov.io/gh/HERA-Team/hera_sim/pull/237?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9zaW0vY2xpX3V0aWxzLnB5) | `93.97% <100.00%> (-4.81%)` | :arrow_down: | | [hera\_sim/visibilities/pyuvsim\_wrapper.py](https://app.codecov.io/gh/HERA-Team/hera_sim/pull/237?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team#diff-aGVyYV9zaW0vdmlzaWJpbGl0aWVzL3B5dXZzaW1fd3JhcHBlci5weQ==) | `95.45% <100.00%> (-4.55%)` | :arrow_down: | ... and [11 files with indirect coverage changes](https://app.codecov.io/gh/HERA-Team/hera_sim/pull/237/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=HERA-Team)

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

steven-murray commented 1 year ago

@piyanatk thanks for the review! I've addressed your two comments.