Two specialized 4-vector classes for polarization handling. More...
#include <StokesVector.h>
Public Member Functions | |
| CStokesVector () | |
| CStokesVector(Int n):RigidVector<Complex,4>(n) {} The Complex data members are automatically initialized to 0. | |
| CStokesVector (const Complex &c) | |
| Construct from scalar, setting all values to a constant. | |
| CStokesVector (const Complex &v0, const Complex &v1, const Complex &v2, const Complex &v3) | |
| Construct with four values specified. | |
| CStokesVector (const Complex v[4]) | |
| Construct from c-array. | |
| CStokesVector (const CStokesVector &v) | |
| Construct from Vector (should have length 4) CStokesVector(const Vector<Complex> & v):RigidVector<Complex,4>(v) {} Copy constructor with copy semantics. | |
| CStokesVector & | operator= (const CStokesVector &v) |
| Construct from RigidVector CStokesVector(const RigidVector<Complex,4>& v):RigidVector<Complex,4>(v) {} Assignment. | |
| CStokesVector & | operator= (const Vector< Complex > &v) |
| Assign from a Vector. | |
| CStokesVector & | operator= (const Complex &c) |
| Assign from a scalar, setting all values to a constant. | |
| CStokesVector & | operator- () |
| Negation. | |
| CStokesVector & | operator+= (const CStokesVector &v) |
| Addition. | |
| CStokesVector & | operator-= (const CStokesVector &v) |
| Subtraction. | |
| CStokesVector & | operator*= (const CStokesVector &v) |
| CStokesVector & | operator*= (const SquareMatrix< Complex, 4 > &m) |
| Matrix multiplication - v*=m is equivalent to v=m*v. | |
| CStokesVector & | operator*= (Float f) |
| Bool | operator== (const CStokesVector &v) const |
| Equality. | |
| Bool | operator!= (const CStokesVector &v) const |
| Inequality. | |
| CStokesVector & | applySlin () |
| Apply conversion matrix from Stokes to linear, in place. | |
| CStokesVector & | applyScirc () |
| Apply conversion matrix from Stokes to circular, in place. | |
| CStokesVector & | applySlinInv () |
| Apply conversion matrix from linear to Stokes, in place. | |
| CStokesVector & | applyScircInv () |
| Apply conversion matrix from circular to Stokes, in place. | |
Static Public Member Functions | |
| static String | dataTypeId () |
Friends | |
| Complex | innerProduct (const CStokesVector &l, const CStokesVector &r) |
| Return a StokesVector with the real part. | |
| double | norm (const CStokesVector &l) |
| ostream & | operator<< (ostream &os, const CStokesVector &v) |
| Write out a CStokesVector using the Vector output method. | |
Two specialized 4-vector classes for polarization handling.
Public interface
StokesVector and CStokesVector (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.
// Create a real valued I,Q,U,V StokesVector StokesVector pixel(4.0,2.0,1.0,0.1); // convert to a Complex valued vector of linear polarizations CStokesVector cohVec=applySlin(pixel); // convert back to I,Q,U,V cohVec.applySlinInv(); // Write out the real part cout<< cohVec.real() <<endl;
Full polarization processing of interferometry data uses real and complex valued 4-vectors. The StokesVector specialization handles this more efficiently than a standard Vector of size 4.
Definition at line 103 of file StokesVector.h.
| casa::CStokesVector::CStokesVector | ( | ) | [inline] |
CStokesVector(Int n):RigidVector<Complex,4>(n) {} The Complex data members are automatically initialized to 0.
Definition at line 108 of file StokesVector.h.
| casa::CStokesVector::CStokesVector | ( | const Complex & | c | ) | [inline] |
Construct from scalar, setting all values to a constant.
Definition at line 110 of file StokesVector.h.
| casa::CStokesVector::CStokesVector | ( | const Complex & | v0, | |
| const Complex & | v1, | |||
| const Complex & | v2, | |||
| const Complex & | v3 | |||
| ) | [inline] |
Construct with four values specified.
Definition at line 112 of file StokesVector.h.
| casa::CStokesVector::CStokesVector | ( | const Complex | v[4] | ) | [inline] |
Construct from c-array.
Definition at line 116 of file StokesVector.h.
| casa::CStokesVector::CStokesVector | ( | const CStokesVector & | v | ) | [inline] |
Construct from Vector (should have length 4) CStokesVector(const Vector<Complex> & v):RigidVector<Complex,4>(v) {} Copy constructor with copy semantics.
Definition at line 120 of file StokesVector.h.
| CStokesVector& casa::CStokesVector::applyScirc | ( | ) | [inline] |
Apply conversion matrix from Stokes to circular, in place.
Definition at line 176 of file StokesVector.h.
| CStokesVector& casa::CStokesVector::applyScircInv | ( | ) | [inline] |
Apply conversion matrix from circular to Stokes, in place.
Definition at line 190 of file StokesVector.h.
| CStokesVector& casa::CStokesVector::applySlin | ( | ) | [inline] |
Apply conversion matrix from Stokes to linear, in place.
Definition at line 169 of file StokesVector.h.
| CStokesVector& casa::CStokesVector::applySlinInv | ( | ) | [inline] |
Apply conversion matrix from linear to Stokes, in place.
Definition at line 183 of file StokesVector.h.
| static String casa::CStokesVector::dataTypeId | ( | ) | [inline, static] |
Definition at line 105 of file StokesVector.h.
| Bool casa::CStokesVector::operator!= | ( | const CStokesVector & | v | ) | const [inline] |
Inequality.
Definition at line 163 of file StokesVector.h.
| CStokesVector& casa::CStokesVector::operator*= | ( | Float | f | ) | [inline] |
Definition at line 154 of file StokesVector.h.
| CStokesVector& casa::CStokesVector::operator*= | ( | const SquareMatrix< Complex, 4 > & | m | ) | [inline] |
Matrix multiplication - v*=m is equivalent to v=m*v.
Definition at line 151 of file StokesVector.h.
References operator*=().
| CStokesVector& casa::CStokesVector::operator*= | ( | const CStokesVector & | v | ) | [inline] |
Definition at line 147 of file StokesVector.h.
Referenced by operator*=().
| CStokesVector& casa::CStokesVector::operator+= | ( | const CStokesVector & | v | ) | [inline] |
Addition.
Definition at line 140 of file StokesVector.h.
| CStokesVector& casa::CStokesVector::operator- | ( | ) | [inline] |
Negation.
Definition at line 136 of file StokesVector.h.
| CStokesVector& casa::CStokesVector::operator-= | ( | const CStokesVector & | v | ) | [inline] |
Subtraction.
Definition at line 144 of file StokesVector.h.
| CStokesVector& casa::CStokesVector::operator= | ( | const Complex & | c | ) | [inline] |
Assign from a scalar, setting all values to a constant.
Definition at line 132 of file StokesVector.h.
References operator=().
| CStokesVector& casa::CStokesVector::operator= | ( | const Vector< Complex > & | v | ) | [inline] |
| CStokesVector& casa::CStokesVector::operator= | ( | const CStokesVector & | v | ) | [inline] |
Construct from RigidVector CStokesVector(const RigidVector<Complex,4>& v):RigidVector<Complex,4>(v) {} Assignment.
Definition at line 124 of file StokesVector.h.
Referenced by operator=().
| Bool casa::CStokesVector::operator== | ( | const CStokesVector & | v | ) | const [inline] |
Equality.
Definition at line 158 of file StokesVector.h.
| Complex innerProduct | ( | const CStokesVector & | l, | |
| const CStokesVector & | r | |||
| ) | [friend] |
Return a StokesVector with the real part.
StokesVector real(); inner product of two complex vectors
Definition at line 199 of file StokesVector.h.
| double norm | ( | const CStokesVector & | l | ) | [friend] |
Definition at line 204 of file StokesVector.h.
| ostream& operator<< | ( | ostream & | os, | |
| const CStokesVector & | v | |||
| ) | [friend] |
Write out a CStokesVector using the Vector output method.
Definition at line 211 of file StokesVector.h.
1.6.1