katsdpimager.polarization module¶
Routines for dealing with transformations between polarization bases
Enumeration of polarizations uses the CASA enumeration values, which are different from those used in FITS:
-
katsdpimager.polarization.STOKES_I¶
-
katsdpimager.polarization.STOKES_Q¶
-
katsdpimager.polarization.STOKES_U¶
-
katsdpimager.polarization.STOKES_V¶
-
katsdpimager.polarization.STOKES_RR¶
-
katsdpimager.polarization.STOKES_RL¶
-
katsdpimager.polarization.STOKES_LR¶
-
katsdpimager.polarization.STOKES_LL¶
-
katsdpimager.polarization.STOKES_XX¶
-
katsdpimager.polarization.STOKES_XY¶
-
katsdpimager.polarization.STOKES_YX¶
-
katsdpimager.polarization.STOKES_YY¶
-
katsdpimager.polarization.STOKES_COEFF= array([[ 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j], [ 1.+0.j, 0.+0.j, 0.+0.j, 0.+0.j], [ 0.+0.j, 1.+0.j, 0.+0.j, 0.+0.j], [ 0.+0.j, 0.+0.j, 1.+0.j, 0.+0.j], [ 0.+0.j, 0.+0.j, 0.+0.j, 1.+0.j], [ 1.+0.j, 0.+0.j, 0.+0.j, 1.+0.j], [ 0.+0.j, 1.+0.j, 0.+1.j, 0.+0.j], [ 0.+0.j, 1.+0.j, -0.-1.j, 0.+0.j], [ 1.+0.j, 0.+0.j, 0.+0.j, -1.+0.j], [ 1.+0.j, 1.+0.j, 0.+0.j, 0.+0.j], [ 0.+0.j, 0.+0.j, 1.+0.j, 0.+1.j], [ 0.+0.j, 0.+0.j, 1.+0.j, -0.-1.j], [ 1.+0.j, -1.+0.j, 0.+0.j, 0.+0.j]], dtype=complex64)¶ Coefficients for each polarization relative to IQUV
-
katsdpimager.polarization.STOKES_NAMES= [None, 'I', 'Q', 'U', 'V', 'RR', 'RL', 'LR', 'LL', 'XX', 'XY', 'YX', 'YY']¶ Names for polarizations used in display and command line
-
katsdpimager.polarization.parse_stokes(str_value)¶
-
katsdpimager.polarization.polarization_matrices(outputs, inputs)¶ Compute a pair of Mueller matrices for conversion via a circular (RL) frame.
- Parameters
outputs (list) – Output polarizations
inputs (list) – Input polarizations
- Returns
from_circular (matrix) – Mueller matrix from circular frame to output
to_circular (matrix) – Mueller matrix from inputs to circular frame
- Raises
ValueError – If inputs are not a full polarization basis
-
katsdpimager.polarization.polarization_matrix(outputs, inputs)¶ Return a Mueller matrix that will map the input polarizations to the outputs.
The matrix is computed using linear algebra. Let s represent the Stokes parameters (IQUV). The inputs correspond to \(As\), for some matrix A, and similarly the outputs to \(Bs\). We are thus searching for the matrix X such that \(Bs=XAs\) or \(A^TX^T = B^T\).
If redundant inputs are given, then the solution is not uniquely determined.
This function is general, and does not require 4 inputs and outputs, or even the same number of inputs and outputs.
- Raises
ValueError – if the inputs do not contain the necessary elements to compute the outputs.
-
katsdpimager.polarization.unparse_stokes(params)¶