JLBLine / WODEN

CUDA code designed to simulate interferometric data using point, Gaussian, and shapelet sky models
https://woden.readthedocs.io/en/latest/
Mozilla Public License 2.0
5 stars 0 forks source link

7. Create a new function `source_component_common::get_beam_gains_two_antennas` that can read in beam gains from multiple antennas. Needs to be called from `source_component_common::update_sum_visis_stokesI` and `source_component_common::update_sum_visis_stokesIQUV`. #43

Closed JLBLine closed 2 months ago

JLBLine commented 2 months ago

This will be a function that given a specific baseline, component, time, and frequency, chose the two primary beam values that need to be applied to the visibility. This makes sense to be a new function, as it will need to calculate two different indexes in the beam gain arrays instead of one (in the case of everything with the same primary beam).

Testing: Give the function an array of beam gain values (similar to test_get_beam_gains.c), but this time with say three antennas. Will need to supply d_ant1_to_baseline_map and d_ant2_to_baseline_map on the CUDA side of things, so we can setup code to produce those arrays in the test. That can be copied into calculate_visibilities::calculate_visibilities later.

JLBLine commented 2 months ago

With 25cf255396b37c0f81a6f1afa008bafbb924c522, the function source_component_common::get_beam_gains_two_antennas and is tested as working via cmake_testing/CUDA_code/source_components/test_source_component_common_two_antennas.c. The test is working. Next, hook it into update_sum_visis_stokesI.

JLBLine commented 2 months ago

In 53df7c997d7abe94e4b6af0dfc2d47f2f09e3c70 added cmake_testing/CUDA_code/source_components/test_update_sum_visis_multiants.c which demonstrates that update_sum_visis_stokesI(QUV) can now call get_beam_gains_two_antennas. Have updated existing tests to still use one primary beam for all antennas using the same functions.