Closed JLBLine closed 5 months ago
Actually I think this should be tested using a new function cmake_testing/CUDA_code/calculate_visibilities/test_calculate_visibilities_multi_ants.c
where we mirror what happens in test_calculate_visibilities_mwafeebeam.c
but with dipole amplitudes
First step of this is tested in 25cf255396b37c0f81a6f1afa008bafbb924c522
Added a function source_components:fill_ant_to_baseline_mapping
in 53df7c997d7abe94e4b6af0dfc2d47f2f09e3c70 that does this. Just gotta have calculate_visibilities
call this and pass it through a few functions.
Can run calculate_visibilities
with multiple primary beams in 1473faf2d9b19e8c6db46159e0b5ad5db7fc322f. Tested via cmake_testing/CUDA_code/calculate_visibilities/test_calculate_visibilities_multibeams.c
. This means calculate_visibilities
is creating those baseline mapping functions and passing it all the way through the where needed.
To get the correct indexing, it'll be easiest to have two arrays that contain the index of the first and second antenna in the baseline (let's say
d_ant1_to_baseline_map
andd_ant2_to_baseline_map
) Each array only needs to be 8128 long for 128 tiles; can do modulo maths with existing iBaseline kernel index to work out which baseline we're on.Testing: This will be tested while testing 7.