PolarizedTypes
Documentation for PolarizedTypes.
PolarizedTypes.CirBasisPolarizedTypes.CoherencyMatrixPolarizedTypes.CoherencyMatrixPolarizedTypes.CoherencyMatrixPolarizedTypes.CoherencyMatrixPolarizedTypes.CoherencyMatrixPolarizedTypes.ElectricFieldBasisPolarizedTypes.LPolPolarizedTypes.LinBasisPolarizedTypes.PolBasisPolarizedTypes.RPolPolarizedTypes.StokesParamsPolarizedTypes.XPolPolarizedTypes.YPolPolarizedTypes.basis_componentsPolarizedTypes.basis_transformPolarizedTypes.evpaPolarizedTypes.fracpolarizationPolarizedTypes.innerprodPolarizedTypes.linearpolPolarizedTypes.mpolPolarizedTypes.polarizationPolarizedTypes.polellipse
PolarizedTypes.CirBasis — Type
CirBasis <: PolBasisMeasurement uses the circular polarization basis, which is typically used for circular feed interferometers.
PolarizedTypes.CoherencyMatrix — Type
struct CoherencyMatrix{B1, B2, T} <: StaticArraysCore.FieldMatrix{2, 2, T}Coherency matrix for a single baseline with bases B1 and B2. The two bases correspond to the type of feeds used for each telescope and should be subtypes of PolBasis. To see which bases are implemented type subtypes(Rimes.PolBasis) in the REPL.
For a circular basis the layout of the coherency matrix is
RR* RL*
LR* RR*which can be constructed using
c = CoherencyMatrix(RR, LR, RL, LL, CirBasis())For a linear basis the layout of the coherency matrix is
XX* XY*
YX* YY*which can be constructed using
c = CoherencyMatrix(XX, YX, XY, YY, CirBasis())For a mixed (e.g., circular and linear basis) the layout of the coherency matrix is
RX* RY*
LX* LY*or e.g., linear and circular the layout of the coherency matrix is
XR* XL*
YR* YL*These coherency matrices can be constructed using:
# Circular and linear feeds i.e., |R><X|
c = CoherencyMatrix(RX, LX, RY, LY, LinBasis(), CirBasis())
# Linear and circular feeds i.e., |X><R|
c = CoherencyMatrix(XR, YR, XL, YL, LinBasis(), CirBasis())PolarizedTypes.CoherencyMatrix — Type
CoherencyMatrix(s::StokesParams, basis1::PolBasis)
CoherencyMatrix(s::StokesParams, basis1::PolBasis, basis2::PolBasis)
CoherencyMatrix(s::StokesParams, basis1::PolBasis, basis2::PolBasis, refbasis=CirBasis())Constructs the coherency matrix from the set of stokes parameters s. This is specialized on basis1 and basis2 which form the tensor product basis |basis1><basis2|, or if a single basis is given then by |basis><basis|.
For example
CoherencyMatrix(s, CircBasis())will give the coherency matrix
I+V Q+iU
Q-iU I-Vwhile
CoherencyMatrix(s, LinBasis())will give
I+Q U+iV
U-iV I-QNotes
Internally this function first converts to a reference basis and then the final basis. You can select the reference basis used with the optional argument refbasis. By default we use the circular basis as our reference. Note that this is only important for mixed bases, e.g., if basis1 and basis2 are different. If basis1==basis2 then the reference basis is never used.
PolarizedTypes.CoherencyMatrix — Method
CoherencyMatrix(e11, e21, e12, e22, basis1::PolBasis basis2::PolBasis)Constructs the coherency matrix with components e11 e12 e21 e22 relative to the tensor product basis, basis given by |basis1><basis2|.
For instance
c = Coherency(1.0, 0.0, 0.0, 1.0, CirBasis(), LinBasis())elements correspond to RX* RY* LX* LY*
PolarizedTypes.CoherencyMatrix — Method
CoherencyMatrix(e11, e21, e12, e22, basis::PolBasis)Constructs the coherency matrix with components e11 e12 e21 e22 relative to the tensor product basis, basis given by |basis><basis|.
For instance
c = Coherency(1.0, 0.0, 0.0, 1.0, CirBasis())elements correspond to RR* RL* LR* LL*
PolarizedTypes.CoherencyMatrix — Method
CoherencyMatrix(e11, e21, e12, e22, basis::NTuple{2, PolBasis})Constructs the coherency matrix with components e11 e12 e21 e22 relative to the tensor product basis, |basis[1]><basis[2]|. Note that basis[1] and basis[2] could be different.
For instance
c = Coherency(1.0, 0.0, 0.0, 1.0, CirBasis(), LinBasis())elements correspond to RX* RY* LX* LY*
PolarizedTypes.ElectricFieldBasis — Type
abstract type ElectricFieldBasisAn abstract type whose subtypes denote a specific electric field basis.
PolarizedTypes.LPol — Type
struct LPol <: PolarizedTypes.ElectricFieldBasisThe left circular electric field basis, i.e. a left-handed circular feed.
PolarizedTypes.LinBasis — Type
LinBasis <: PolBasisMeasurement uses the linear polarization basis, which is typically used for linear feed interferometers.
PolarizedTypes.PolBasis — Type
struct PolBasis{B1<:Union{Missing, PolarizedTypes.ElectricFieldBasis}, B2<:Union{Missing, PolarizedTypes.ElectricFieldBasis}}Denotes a general polarization basis, with basis vectors (B1,B2) which are typically <: Union{ElectricFieldBasis, Missing}
PolarizedTypes.RPol — Type
struct RPol <: PolarizedTypes.ElectricFieldBasisThe right circular electric field basis, i.e. a right-handed circular feed.
PolarizedTypes.StokesParams — Type
struct StokesParams{T} <: StaticArraysCore.FieldVector{4, T}Static vector that holds the stokes parameters of a polarized complex visibility
To convert between a StokesParams and CoherencyMatrix use the convert function
convert(::CoherencyMatrix, StokesVector(1.0, 0.1, 0.1, 0.4))PolarizedTypes.XPol — Type
struct XPol <: PolarizedTypes.ElectricFieldBasisThe horizontal or X electric feed basis, i.e. the horizontal linear feed.
PolarizedTypes.YPol — Type
struct YPol <: PolarizedTypes.ElectricFieldBasisThe vertical or Y electric feed basis, i.e. the vertical linear feed.
PolarizedTypes.basis_components — Function
basis_components([T=Float64,], e::ElectricFieldBasis, b::PolBasis)Returns a static vector that contains the components of the electric field basis vector e in terms of the polarization basis b. The first argument is optionally the eltype of the static vector.
Examples
julia> basis_components(Float64, RPol(), PolBasis{XPol,YPol}())
2-element StaticArraysCore.SVector{2, ComplexF64} with indices SOneTo(2):
0.7071067811865475 + 0.0im
0.0 - 0.7071067811865475im
julia> basis_components(RPol(), PolBasis{XPol,YPol}())
2-element StaticArraysCore.SVector{2, ComplexF64} with indices SOneTo(2):
0.7071067811865475 + 0.0im
0.0 - 0.7071067811865475im
julia> basis_components(Float64, XPol(), PolBasis{XPol,YPol}())
2-element StaticArraysCore.SVector{2, ComplexF64} with indices SOneTo(2):
1.0 + 0.0im
0.0 + 0.0imPolarizedTypes.basis_transform — Function
basis_transform([T=Float64,], b1::PolBasis, b2::PolBasis)
basis_transform([T=Float64,], b1::PolBasis=>b2::PolBasis)Produces the transformation matrix that transforms the vector components from basis b1 to basis b2. This means that if for example E is the circular basis then basis_transform(CirBasis=>LinBasis)E is in the linear basis. In other words the columns of the transformation matrix are the coordinate vectors of the new basis vectors in the old basis.
Example
julia> basis_transform(CirBasis()=>LinBasis())
2×2 StaticArraysCore.SMatrix{2, 2, ComplexF64, 4} with indices SOneTo(2)×SOneTo(2):
0.707107-0.0im 0.707107-0.0im
0.0-0.707107im 0.0+0.707107imPolarizedTypes.evpa — Method
evpa(m::Union{StokesParams, CoherencyMatrix})Compute the evpa of a stokes vect or cohereny matrix.
PolarizedTypes.fracpolarization — Method
fracpolarization(s::StokesParams)Returns the (Q/I, U/I, V/I) fractional polarization vector as a 3-element static vector.
PolarizedTypes.innerprod — Function
innerprod(::Type{T}, XPol(), YPol())Computes the complex inner product of two elements of a complex Hilbert space X and Y where base element of the output is T.
PolarizedTypes.linearpol — Method
linearpol(s::StokesParams)Computes linearpol from a set of stokes parameters s.
PolarizedTypes.mpol — Method
mpol(m::StokesParams)Compute the complex fractional linear polarization of a Stokes Parameter m
PolarizedTypes.polarization — Method
linearpol(s::StokesParams)Returns the (Q, U, V) polarization vector as a 3-element static vector.
PolarizedTypes.polellipse — Method
polellipse(s::StokesParams)Returns the polarization ellipse of the Stokes parameters s. The results is a named tuple with elements
a: The semi-major axis of the polarization ellipseb: The semi-minor axis of the polarization ellipseevpa: The electric vector position angle ofsor the PA of the ellipse.sn: The sign of the StokesV.
Notes
The semi-major and semi-minor axes are defined as
a = 1/2(Iₚ + |L|)
b = 1/2(Iₚ - |L|)where Iₚ = √(Q² + U² + V²) and |L| = √(Q² + U²).
In general the area of the ellipse is given by
πab = π/4|V|²For sources with zero linear polarization a = b so we have a circle with radius |V|. For purely linear polarization b = 0 giving a line with length |L|.