casa
5.7.0-16
|
Two specialized 4-vector classes for polarization handling. More...
#include <StokesVector.h>
Public Member Functions | |
CStokesVector () | |
CStokesVector(casacore::Int n):RigidVector<casacore::Complex,4>(n) {} The casacore::Complex data members are automatically initialized to 0. More... | |
CStokesVector (const casacore::Complex &c) | |
Construct from scalar, setting all values to a constant. More... | |
CStokesVector (const casacore::Complex &v0, const casacore::Complex &v1, const casacore::Complex &v2, const casacore::Complex &v3) | |
Construct with four values specified. More... | |
CStokesVector (const casacore::Complex v[4]) | |
Construct from c-array. More... | |
CStokesVector (const CStokesVector &v) | |
Construct from casacore::Vector (should have length 4) CStokesVector(const casacore::Vector<casacore::Complex> & v):RigidVector<casacore::Complex,4>(v) {} Copy constructor with copy semantics. More... | |
CStokesVector & | operator= (const CStokesVector &v) |
Construct from RigidVector CStokesVector(const casacore::RigidVector<casacore::Complex,4>& v):RigidVector<casacore::Complex,4>(v) {} Assignment. More... | |
CStokesVector & | operator= (const casacore::Vector< casacore::Complex > &v) |
Assign from a Vector. More... | |
CStokesVector & | operator= (const casacore::Complex &c) |
Assign from a scalar, setting all values to a constant. More... | |
CStokesVector & | operator- () |
Negation. More... | |
CStokesVector & | operator+= (const CStokesVector &v) |
Addition. More... | |
CStokesVector & | operator-= (const CStokesVector &v) |
Subtraction. More... | |
CStokesVector & | operator*= (const CStokesVector &v) |
CStokesVector & | operator*= (const casacore::SquareMatrix< casacore::Complex, 4 > &m) |
casacore::Matrix multiplication - v*=m is equivalent to v=m*v More... | |
CStokesVector & | operator*= (casacore::Float f) |
casacore::Bool | operator== (const CStokesVector &v) const |
Equality. More... | |
casacore::Bool | operator!= (const CStokesVector &v) const |
Inequality. More... | |
CStokesVector & | applySlin () |
Apply conversion matrix from casacore::Stokes to linear, in place. More... | |
CStokesVector & | applyScirc () |
Apply conversion matrix from casacore::Stokes to circular, in place. More... | |
CStokesVector & | applySlinInv () |
Apply conversion matrix from linear to casacore::Stokes, in place. More... | |
CStokesVector & | applyScircInv () |
Apply conversion matrix from circular to casacore::Stokes, in place. More... | |
Public Member Functions inherited from casacore::RigidVector< casacore::Complex, 4 > | |
RigidVector< casacore::Complex, n > & | operator- () |
Negation. More... | |
RigidVector () | |
RigidVector(Int dummy) { for (Int i=0; i<n; i++) v_p[i]=T(0); } Default constructor. More... | |
RigidVector (const casacore::Complex &c) | |
Construct from scalar, sets all elements to c. More... | |
RigidVector (const casacore::Complex &v0, const casacore::Complex &v1) | |
Construct a 2-element vector, fails for wrong size vectors. More... | |
RigidVector (const casacore::Complex &v0, const casacore::Complex &v1, const casacore::Complex &v2) | |
Construct a 3-element vector, fails for wrong size vectors. More... | |
RigidVector (const casacore::Complex &v0, const casacore::Complex &v1, const casacore::Complex &v2, const casacore::Complex &v3) | |
Construct a 4-element vector, fails for wrong size vectors. More... | |
RigidVector (const casacore::Complex &v0, const casacore::Complex &v1, const casacore::Complex &v2, const casacore::Complex &v3, const casacore::Complex &v4) | |
Construct a 5-element vector, fails for wrong size vectors. More... | |
RigidVector (const casacore::Complex &v0, const casacore::Complex &v1, const casacore::Complex &v2, const casacore::Complex &v3, const casacore::Complex &v4, const casacore::Complex &v5) | |
Construct a 6-element vector, fails for wrong size vectors. More... | |
RigidVector (const casacore::Complexv[n]) | |
Construct from a c-array (copy semantics) More... | |
RigidVector (const Vector< casacore::Complex > &v) | |
Construct from a Vector. More... | |
RigidVector (const RigidVector< casacore::Complex, n > &v) | |
Copy constructor, copy semantics. More... | |
RigidVector< casacore::Complex, n > & | operator= (const RigidVector< casacore::Complex, n > &v) |
Assign from a RigidVector. More... | |
RigidVector< casacore::Complex, n > & | operator= (const Vector< casacore::Complex > &v) |
Assign from a Vector. More... | |
RigidVector< casacore::Complex, n > & | operator= (const casacore::Complex &c) |
Assign a scalar, sets all elements to c. More... | |
RigidVector< casacore::Complex, n > & | operator+= (const RigidVector< casacore::Complex, n > &v) |
Addition. More... | |
RigidVector< casacore::Complex, n > & | operator*= (const RigidVector< casacore::Complex, n > &v) |
RigidVector< casacore::Complex, n > & | operator*= (const casacore::Complex &val) |
Multiplication by scalar. More... | |
RigidVector< casacore::Complex, n > & | operator*= (const SquareMatrix< casacore::Complex, n > &m) |
Multiply vector by matrix: v*=M is equivalent to v=M*v;. More... | |
RigidVector< casacore::Complex, n > & | operator-= (const RigidVector< casacore::Complex, n > &v) |
Subtraction. More... | |
casacore::Complex & | operator() (Int i) |
Indexing by reference. More... | |
const casacore::Complex & | operator() (Int i) const |
Indexing by const reference. More... | |
Vector< casacore::Complex > | vector () const |
Convert to a regular Vector. More... | |
RigidVector< casacore::Complex, n > | sqrt (const RigidVector< casacore::Complex, n > &v) |
Square Root. More... | |
Static Public Member Functions | |
static casacore::String | dataTypeId () |
Friends | |
casacore::Complex | innerProduct (const CStokesVector &l, const CStokesVector &r) |
Return a StokesVector with the real part. More... | |
double | norm (const CStokesVector &l) |
std::ostream & | operator<< (std::ostream &os, const CStokesVector &v) |
Write out a CStokesVector using the casacore::Vector output method. More... | |
Additional Inherited Members | |
Protected Attributes inherited from casacore::RigidVector< casacore::Complex, 4 > | |
casacore::Complex | v_p [n] |
// The following are needed for Image<RigidVector> More... | |
Two specialized 4-vector classes for polarization handling.
Public interface
StokesVector and CStokesVector (casacore::Complex StokesVector) are two classes designed to handle a 4-vector of polarization values (I,Q,U,V or e.g., RR,RL,LR,LL).
StokesVectors are RigidVectors of length 4. They have a few special member functions to do polarization conversions efficiently. CStokesVector also has a real() member function to get at the real part of the components.
Full polarization processing of interferometry data uses real and complex valued 4-vectors. The StokesVector specialization handles this more efficiently than a standard casacore::Vector of size 4.
Definition at line 103 of file StokesVector.h.
|
inline |
CStokesVector(casacore::Int n):RigidVector<casacore::Complex,4>(n) {} The casacore::Complex data members are automatically initialized to 0.
Definition at line 109 of file StokesVector.h.
|
inlineexplicit |
Construct from scalar, setting all values to a constant.
Definition at line 111 of file StokesVector.h.
|
inline |
Construct with four values specified.
Definition at line 113 of file StokesVector.h.
|
inline |
Construct from c-array.
Definition at line 117 of file StokesVector.h.
|
inline |
Construct from casacore::Vector (should have length 4) CStokesVector(const casacore::Vector<casacore::Complex> & v):RigidVector<casacore::Complex,4>(v) {} Copy constructor with copy semantics.
Definition at line 121 of file StokesVector.h.
|
inline |
Apply conversion matrix from casacore::Stokes to circular, in place.
Definition at line 177 of file StokesVector.h.
References casacore::RigidVector< casacore::Complex, 4 >::v_p.
Referenced by casa::applyScirc().
|
inline |
Apply conversion matrix from circular to casacore::Stokes, in place.
Definition at line 192 of file StokesVector.h.
References casacore, and casacore::RigidVector< casacore::Complex, 4 >::v_p.
Referenced by casa::applyScircInv().
|
inline |
Apply conversion matrix from casacore::Stokes to linear, in place.
Definition at line 170 of file StokesVector.h.
References casacore::RigidVector< casacore::Complex, 4 >::v_p.
Referenced by casa::applySlin().
|
inline |
Apply conversion matrix from linear to casacore::Stokes, in place.
Definition at line 184 of file StokesVector.h.
References casacore, and casacore::RigidVector< casacore::Complex, 4 >::v_p.
Referenced by casa::applySlinInv().
|
inlinestatic |
Definition at line 106 of file StokesVector.h.
|
inline |
Inequality.
Definition at line 164 of file StokesVector.h.
References casacore::RigidVector< casacore::Complex, 4 >::v_p, and casacore::RigidVector< T, n >::v_p.
|
inline |
Definition at line 148 of file StokesVector.h.
References casacore::RigidVector< T, n >::operator*=().
|
inline |
casacore::Matrix multiplication - v*=m is equivalent to v=m*v
Definition at line 152 of file StokesVector.h.
References casacore::RigidVector< T, n >::operator*=().
|
inline |
Definition at line 155 of file StokesVector.h.
References casacore::RigidVector< casacore::Complex, 4 >::v_p.
|
inline |
Addition.
Definition at line 141 of file StokesVector.h.
References casacore::RigidVector< T, n >::operator+=().
|
inline |
Negation.
Definition at line 137 of file StokesVector.h.
References casacore::RigidVector< T, n >::operator-().
|
inline |
Subtraction.
Definition at line 145 of file StokesVector.h.
References casacore::RigidVector< T, n >::operator-=().
|
inline |
Construct from RigidVector CStokesVector(const casacore::RigidVector<casacore::Complex,4>& v):RigidVector<casacore::Complex,4>(v) {} Assignment.
Definition at line 125 of file StokesVector.h.
References casacore::RigidVector< T, n >::operator=().
|
inline |
Assign from a Vector.
Definition at line 129 of file StokesVector.h.
References casacore::RigidVector< T, n >::operator=().
|
inline |
Assign from a scalar, setting all values to a constant.
Definition at line 133 of file StokesVector.h.
References casacore::RigidVector< T, n >::operator=().
|
inline |
Equality.
Definition at line 159 of file StokesVector.h.
References casacore::RigidVector< casacore::Complex, 4 >::v_p, and casacore::RigidVector< T, n >::v_p.
|
friend |
Return a StokesVector with the real part.
StokesVector real(); inner product of two complex vectors
Definition at line 202 of file StokesVector.h.
|
friend |
Definition at line 207 of file StokesVector.h.
|
friend |
Write out a CStokesVector using the casacore::Vector output method.
Definition at line 215 of file StokesVector.h.