casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Friends
casa::CStokesVector Class Reference

Two specialized 4-vector classes for polarization handling. More...

#include <StokesVector.h>

Inheritance diagram for casa::CStokesVector:
casa::RigidVector< Complex, 4 >

List of all members.

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.
CStokesVectoroperator= (const CStokesVector &v)
 Construct from RigidVector CStokesVector(const RigidVector<Complex,4>& v):RigidVector<Complex,4>(v) {} Assignment.
CStokesVectoroperator= (const Vector< Complex > &v)
 Assign from a Vector.
CStokesVectoroperator= (const Complex &c)
 Assign from a scalar, setting all values to a constant.
CStokesVectoroperator- ()
 Negation.
CStokesVectoroperator+= (const CStokesVector &v)
 Addition.
CStokesVectoroperator-= (const CStokesVector &v)
 Subtraction.
CStokesVectoroperator*= (const CStokesVector &v)
CStokesVectoroperator*= (const SquareMatrix< Complex, 4 > &m)
 Matrix multiplication - v*=m is equivalent to v=m*v.
CStokesVectoroperator*= (Float f)
Bool operator== (const CStokesVector &v) const
 Equality.
Bool operator!= (const CStokesVector &v) const
 Inequality.
CStokesVectorapplySlin ()
 Apply conversion matrix from Stokes to linear, in place.
CStokesVectorapplyScirc ()
 Apply conversion matrix from Stokes to circular, in place.
CStokesVectorapplySlinInv ()
 Apply conversion matrix from linear to Stokes, in place.
CStokesVectorapplyScircInv ()
 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.

Detailed Description

Two specialized 4-vector classes for polarization handling.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

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).

Synopsis

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.

Example

    // 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;

Motivation

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.

Thrown Exceptions

To Do

Definition at line 103 of file StokesVector.h.


Constructor & Destructor Documentation

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.

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.


Member Function Documentation

Apply conversion matrix from Stokes to circular, in place.

Definition at line 176 of file StokesVector.h.

References casa::RigidVector< Complex, 4 >::v_p.

Apply conversion matrix from circular to Stokes, in place.

Definition at line 190 of file StokesVector.h.

References casa::RigidVector< Complex, 4 >::v_p.

Apply conversion matrix from Stokes to linear, in place.

Definition at line 169 of file StokesVector.h.

References casa::RigidVector< Complex, 4 >::v_p.

Apply conversion matrix from linear to Stokes, in place.

Definition at line 183 of file StokesVector.h.

References casa::RigidVector< Complex, 4 >::v_p.

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.

References casa::RigidVector< Complex, 4 >::v_p, and casa::RigidVector< T, n >::v_p.

CStokesVector& casa::CStokesVector::operator*= ( const CStokesVector v) [inline]

Definition at line 147 of file StokesVector.h.

Referenced by operator*=().

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*= ( Float  f) [inline]

Definition at line 154 of file StokesVector.h.

References casa::RigidVector< Complex, 4 >::v_p.

CStokesVector& casa::CStokesVector::operator+= ( const CStokesVector v) [inline]

Addition.

Definition at line 140 of file StokesVector.h.

CStokesVector& casa::CStokesVector::operator- ( ) [inline]

Negation.

Reimplemented from casa::RigidVector< Complex, 4 >.

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 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=().

CStokesVector& casa::CStokesVector::operator= ( const Vector< Complex > &  v) [inline]

Assign from a Vector.

Reimplemented from casa::RigidVector< Complex, 4 >.

Definition at line 128 of file StokesVector.h.

References operator=().

CStokesVector& casa::CStokesVector::operator= ( const Complex &  c) [inline]

Assign from a scalar, setting all values to a constant.

Reimplemented from casa::RigidVector< Complex, 4 >.

Definition at line 132 of file StokesVector.h.

References operator=().

Bool casa::CStokesVector::operator== ( const CStokesVector v) const [inline]

Equality.

Definition at line 158 of file StokesVector.h.

References casa::RigidVector< Complex, 4 >::v_p, and casa::RigidVector< T, n >::v_p.


Friends And Related Function Documentation

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.


The documentation for this class was generated from the following file: