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

8. `get_beam_gains_two_antennas` will need some kind of baseline to antenna mapping. This indexing only needs to be done once, so it makes sense to do it at the highest function, which is `calculate_visibilities::calculate_visibilities` #44

Closed JLBLine closed 5 months ago

JLBLine commented 5 months ago

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 and d_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.

JLBLine commented 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

JLBLine commented 5 months ago

First step of this is tested in 25cf255396b37c0f81a6f1afa008bafbb924c522

JLBLine commented 5 months ago

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.

JLBLine commented 5 months ago

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.