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

5. Make a function like `primary_beam_cuda::run_hyperbeam_cuda` to handle multiple dipole amplitudes #41

Closed JLBLine closed 2 months ago

JLBLine commented 2 months ago

I think we can make a single function that works for however many antennas there are. run_hyperbeam_cuda calls kern_map_hyperbeam_gains, which has the number of tiles as the second dimension in the block/grid. So if we make the a single dimension when all the beams are the same, it shouldn't incur any more calculations. Will need to slightly update existing tests as we'll have to have number of antennas as an input. Need to make sure the outputs are ordered slowest changing to fastest changing as antenna,time,freq,component. This means when using the same primary beam for everything, we

Testing:

JLBLine commented 2 months ago

In the end, edited run_hyperbeam_cuda to be able to run in both cases. User now has to supply the num_ants variable, which means you can run everything with same primary beam for all antennas if num_ants=1. All old tests were updated, and new test test_run_hyperbeam_multi_antennas.c checks it works for a different primary beam for each antenna. Everything changed in 15337e2e3ea18f19c2d974a212f1e73734406871