Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different check of beam_ids for UVSim object #253

Open
piyanatk opened this issue Apr 11, 2023 · 0 comments
Open

Different check of beam_ids for UVSim object #253

piyanatk opened this issue Apr 11, 2023 · 0 comments

Comments

@piyanatk
Copy link
Contributor

When passing a config with a baseline selection keyword to a UVSim run, it will error-exit if not all antennas are present in the selection of baseline because the length of beam_ids does not match the number of antennas in the data, e.g.

Traceback (most recent call last):
  File "/users/piyanat/miniconda3/envs/viscpu/bin/hera-sim-vis.py", line 374, in <module>
    main(args, profiler, simulator)
  File "/users/piyanat/miniconda3/envs/viscpu/bin/hera-sim-vis.py", line 92, in main
    data_model = ModelData.from_config(
  File "/users/piyanat/miniconda3/envs/viscpu/lib/python3.10/site-packages/hera_sim/visibilities/simulators.py", line 202, in from_config
    return ModelData(
  File "/users/piyanat/miniconda3/envs/viscpu/lib/python3.10/site-packages/hera_sim/visibilities/simulators.py", line 87, in __init__
    self._validate_beam_ids(self.beam_ids, self.beams)
  File "/users/piyanat/miniconda3/envs/viscpu/lib/python3.10/site-packages/hera_sim/visibilities/simulators.py", line 176, in _validate_beam_ids
    raise ValueError(
ValueError: Length of beam_ids (12) must match the number of ants (10).

Select keywords should work with the UVSim wrapper, but currently limited by checking through the various ._validate methods, which are currently written with viscpu in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants