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. Modify the C/GPU power-law code to handle Stokes V #60

Closed JLBLine closed 3 months ago

JLBLine commented 4 months ago

Need to modify the following functions:

source_components::kern_extrap_power_laws_stokesI

to no longer be Stokes I specific, then we can use them for both Stokes I and Stokes V.

Then will have to edit source_components::extrap_curved_power_law_stokesI to call kernel_extrap_curved_power_law, and write a new function source_components::extrap_curved_power_law_stokesV to do the Stokes V.

Need to do exactly the same with extrap_stokes_curved_power_law_stokesI, kern_extrap_curved_power_laws_stokesI, and kern_extrap_curved_power_laws_stokesV for the curved power law case.

As for the fractional polarisation case, will need to write a new function, say source_components::kern_extrap_stokes_frac_pol, that takes in the Stokes I that should have already been extrapolated, an array of fractions, and uses that to calculate Stokes V.

Testing - will have to edit cmake_testing/GPU_code/source_components/test_extrap_stokes.c to include Stokes V, and modify existing tests on the Stokes I as the power-law and curved power-law functions are going to be changed. Likely many other tests in that directory will need to be updated. For Stokes V, need to test the three different possible models, and make sure the extrapolation is correct.

JLBLine commented 3 months ago

Right, all the power-law and curved power-law stuff has been updated for polarisation in bf2e379fa6101c8014e05a6cf03ad0f9d10b71f3. Still need to update functions higher up that call it, as tests for kern_calc_visi_point, kern_calc_visi_point, kern_calc_visi_shape are all now failing