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

2. Modify `woden_struct_defs::woden_settings_t` to store dipole amplitudes for the C side #38

Closed JLBLine closed 2 months ago

JLBLine commented 2 months ago

OK so all memory passed between Python and C are stored in a class in Python, or a struct in C. These have to be defined on both sides, and must match exactly (even the order of the attributes). So we'll have to add a pointer to an array of doubles (say fee_dipole_amps) to both the wodenpy.use_libwoden.woden_settings.Woden_Settings_Float/Double classes and the woden_struct_defs::woden_settings_t struct. We should also add a boolean flag use_dipamps so the C/CUDA code knows to have different primary beams per antenna.

Testing: Modify cmake_testing/wodenpy/use_libwoden/test_make_woden_settings.py and cmake_testing/wodenpy/use_libwoden/read_woden_settings.c to ensure that the new attributes are bing passed in C correctly

JLBLine commented 2 months ago

Tested that dipole amplitude flag and value array are populated in Woden_Settings_Float/Double from the args and successfully passed into woden_settings_t by adding the functionality and updating test_make_woden_settings.py in a6696543f50d3094a14466d8b1a309033de90851