HERA-Team / hera_sim

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

Vis sim cli #223

Closed steven-murray closed 2 years ago

steven-murray commented 2 years ago

Adds a simulator CLI interface.

Usage: hera_sim_vis.py <obsparams> <simulator-config> where both of the configs are YAML files.

An example of the new simulator config file that matches what @piyanatk was using for the IDR3 sims is in example_configs/

codecov[bot] commented 2 years ago

Codecov Report

Merging #223 (264758e) into main (7c71f29) will increase coverage by 0.00%. The diff coverage is 97.22%.

@@           Coverage Diff           @@
##             main     #223   +/-   ##
=======================================
  Coverage   96.55%   96.55%           
=======================================
  Files          24       24           
  Lines        2813     2846   +33     
=======================================
+ Hits         2716     2748   +32     
- Misses         97       98    +1     
Impacted Files Coverage Δ
hera_sim/visibilities/simulators.py 87.27% <96.29%> (+1.76%) :arrow_up:
hera_sim/__init__.py 93.54% <100.00%> (ø)
hera_sim/visibilities/__init__.py 100.00% <100.00%> (ø)
hera_sim/visibilities/vis_cpu.py 93.83% <100.00%> (+0.26%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 976a794...264758e. Read the comment docs.

steven-murray commented 2 years ago

Thanks for the review, @piyanatk. I've made the requested changes, and also added a small tutorial on the CLI.

steven-murray commented 2 years ago

@piyanatk I think I've addressed all your comments here -- could you do another check?

piyanatk commented 2 years ago

@steven-murray All looks good and it ran through (both with and without mpi)! The only thing that did not work as expected for me was that the check marks were still displayed as :heavy-checkmark: on my terminal, but it is probably just that my terminal is not unicode capable, and it is cosmetic. I approved the PR

steven-murray commented 2 years ago

Thanks @piyanatk! Actually I think I did screw up the :heavy-checkmark: -- I just checked and it's supposed to be :heavy_check_mark:. I've fixed it now -- would it be easy for you to check that it outputs a ✔️ ?

piyanatk commented 2 years ago

@steven-murray Yep! Check marks are there now.