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

1. Get new columns into the FITS sky model that has RM/pol frac/intrinsic pol angle and Stokes V flux #56

Closed JLBLine closed 2 months ago

JLBLine commented 3 months ago

Copy the StokesI version of things for Stokes V so add columns of:

Column name Units Description
V_MOD_TYPE NA Can be either pf (just use the VPOL_FRAC to multiply Stokes I), pl to use V_NORM_COMP_PL,V_ALPHA_PL, or cpl to use V_NORM_COMP_CPL,V_ALPHA_CPL,V_CURVE_CPL
VPOL_FRAC NA (Optional) Set the Stokes V to be a this fraction of the Stokes I. Should be mutually exclusive to setting a Stokes V power or curved power law as outlined below
V_NORM_COMP_PL Jy (Optional) The Stokes V reference flux for a power-law pl component model, must be at the reference frequency 200MHz
V_ALPHA_PL NA (Optional) The Stokes V spectral index for a power-law pl component model, must be at the reference frequency 200MHz.
V_NORM_COMP_CPL Jy (Optional) The Stokes V reference flux for a curved power-law cpl component model, must be at the reference frequency 200MHz.
V_ALPHA_CPL NA (Optional) The Stokes V spectral index for a curved power-law cpl component model, must be at the reference frequency 200MHz.
V_CURVE_CPL NA (Optional) The Stokes V curvature q for a curved power-law cpl component model
And then add some new columns for the RM/pol frac/intrinsic pol angle: Column name Units Description
RM rad m $^{-2}$ Rotation measure of the source
LINPOL_FRAC NA Linear polarised fraction of the source. Amplitudes of Q and U will be this fraction of Stokes $I(\nu)$. If LINPOL_MOD_ZERO=True, and this isn't set, default is set to 1.0
INTR_POL_ANGLE NA (Optional) column. Intrinsic polarisation angle of the source; if blank, assumed as zero
LINPOL_ZERO_I NA (Optional) True/False. Assumed behaviour is using Stokes I and LINPOL_FRAC columns to get overall polarisation flux, and that we should retain the Stokes I; this is False for this column. Add True to set Stokes I to zero after calculating QU.

Make sure wodenpy can read these new things in.

Testing need to update cmake_testing/wodenpy/skymodel/test_read_FITS_skymodel_chunk.py to check all these news values are read in, and update cmake_testing/wodenpy/skymodel/common_skymodel_test.py and cmake_testing/wodenpy/skymodel/read_skymodel_common.py with new polarisation options. Should probably write a new test test_read_yaml_radec_count_components.py as we don't explicitly test that at the moment (it's tested within test_read_FITS_skymodel_chunk.py)

JLBLine commented 3 months ago

After discussions with the community, it will be clearer to ditch the LINPOL_ZERO_I option, and instead explicitly set the linear polarisation flux. With this option, the Stokes I is completely ignored for linear polarisation. Adding the columns below should make things explicit. Will need code down the line to respect this.

Column name Units Description
LIN_NORM_COMP_PL Jy (Optional) The linear polarisation reference flux for a power-law pl component model, must be at the reference frequency 200MHz
LIN_ALPHA_PL NA (Optional) The linear polarisation spectral index for a power-law pl component model, must be at the reference frequency 200MHz.
LIN_NORM_COMP_CPL Jy (Optional) The linear polarisation reference flux for a curved power-law cpl component model, must be at the reference frequency 200MHz.
LIN_ALPHA_CPL NA (Optional) The linear polarisation spectral index for a curved power-law cpl component model, must be at the reference frequency 200MHz.
LIN_CURVE_CPL NA (Optional) The linear polarisation curvature q for a curved power-law cpl component model
JLBLine commented 3 months ago

Aight, with 5f16b6460891d1d7e2096edebf55297b352dea80 the testing code that writes out example FITS files cmake_testing/wodenpy/skymodel/fits_skymodel_common.write_full_test_skymodel_fits can now write out all the above columns

JLBLine commented 2 months ago

OK these columns all get written in test code, and read into the sky model chunks on the python side as of c8688f8f30b01c75ba08e8548b6f4f457e3d35fd