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

9. Need to modify `source_components::kern_calc_autos` to use multiple antennas #45

Closed JLBLine closed 4 months ago

JLBLine commented 5 months ago

Actually think it makes more sense to make kern_calc_autos_two_antennas as this will avoid a (if use_dipamps == 1) inside a kernel (if statements cost computation times, bad if happening on every thread). I think this will just need up to using a version of d_ant1_to_baseline_map and d_ant2_to_baseline_map as identical arrays, which are just the indexes of the antennas, so 0-127 if we have 128 antennas.

Testing: Make a new test cmake_testing/CUDA_code/source_components/test_kern_calc_autos_multi_antennas.c. Here we can give a list of beam gains for three antennas, and double check just having a range of 0-127 in the mapping arrays gives a sensible output.

JLBLine commented 4 months ago

This is added in 5d23e7f7adf572c9c4168016aa54617d4746ef39. Tested directly in test_kern_calc_autos_multiants.c and integrated test in test_calculate_visibilities_multibeams.c where I call calculate_visibilities with woden_settings->use_dipamps and woden_settings->do_autos. This checks whether source_component_common works as well.