29 #ifndef MSVIS_STOKESVECTOR_H
30 #define MSVIS_STOKESVECTOR_H
156 v_p[0]*=f;
v_p[1]*=f;
v_p[2]*=f;
v_p[3]*=f;
return *
this;
172 v_p[0]=(i+q);
v_p[1]=(u+iv);
173 v_p[2]=(u-iv);
v_p[3]=(i-q);
179 v_p[0]=(i+v);
v_p[1]=(q+iu);
180 v_p[2]=(q-iu);
v_p[3]=(i-v);
187 v_p[0]=(xx+yy)/2;
v_p[1]=(xx-yy)/2;
195 v_p[0]=(rr+ll)/2;
v_p[3]=(rr-ll)/2;
369 result(0)=
real(v(0)+v(3))/2;
370 result(1)=
real(v(0)-v(3))/2;
371 result(2)=
real(v(1)+v(2))/2;
385 result(0)=
real(v(0)+v(3))/2;
386 result(1)=
real(v(1)+v(2))/2;
388 result(3)=
real(v(0)-v(3))/2;
StokesVector()
StokesVector(casacore::Int n):RigidVector<casacore::Float,4>(n) {} Default constructor zeroes vector...
StokesVector & operator*=(const StokesVector &v)
CStokesVector & operator=(const casacore::Vector< casacore::Complex > &v)
Assign from a Vector.
CStokesVector & applySlin()
Apply conversion matrix from casacore::Stokes to linear, in place.
CStokesVector(const casacore::Complex v[4])
Construct from c-array.
Two specialized 4-vector classes for polarization handling.
CStokesVector & operator=(const CStokesVector &v)
Construct from RigidVector CStokesVector(const casacore::RigidVector<casacore::Complex,4>& v):RigidVector<casacore::Complex,4>(v) {} Assignment.
std::complex< Float > Complex
casacore::Bool operator!=(const StokesVector &v) const
Inequality.
CStokesVector & operator-()
Negation.
friend casacore::Float innerProduct(const StokesVector &l, const StokesVector &r)
The innerproduct of 2 StokesVectors.
CStokesVector & operator*=(const casacore::SquareMatrix< casacore::Complex, 4 > &m)
casacore::Matrix multiplication - v*=m is equivalent to v=m*v
friend casacore::Complex operator*(const RigidVector< casacore::Complex, n > &l, const RigidVector< casacore::Complex, n > &r)
The innerproduct of 2 RigidVectors.
CStokesVector(const casacore::Complex &v0, const casacore::Complex &v1, const casacore::Complex &v2, const casacore::Complex &v3)
Construct with four values specified.
StokesVector(casacore::Float v0, casacore::Float v1, casacore::Float v2, casacore::Float v3)
Construct with four values specified.
CStokesVector & operator=(const casacore::Complex &c)
Assign from a scalar, setting all values to a constant.
RigidVector< T, n > & operator=(const RigidVector< T, n > &v)
Assign from a RigidVector.
StokesVector & operator-=(const StokesVector &v)
Subtraction.
friend std::ostream & operator<<(std::ostream &os, const CStokesVector &v)
Write out a CStokesVector using the casacore::Vector output method.
RigidVector< T, n > & operator+=(const RigidVector< T, n > &v)
Addition.
CStokesVector()
CStokesVector(casacore::Int n):RigidVector<casacore::Complex,4>(n) {} The casacore::Complex data memb...
StokesVector & operator+=(const StokesVector &v)
Addition.
CStokesVector & operator+=(const CStokesVector &v)
Addition.
CStokesVector & applyScirc()
Apply conversion matrix from casacore::Stokes to circular, in place.
LatticeExprNode conj(const LatticeExprNode &expr)
Fast Vector classes with fixed (templated) length.
friend casacore::Complex innerProduct(const CStokesVector &l, const CStokesVector &r)
Return a StokesVector with the real part.
StokesVector & operator=(const StokesVector &v)
Construct from RigidVector StokesVector(const casacore::RigidVector<casacore::Float,4>& v):RigidVector<casacore::Float,4>(v) {} Assignment.
casacore::Bool operator==(const CStokesVector &v) const
Equality.
Fast Square Matrix class with fixed (templated) size.
T determinant(const casacore::Matrix< T > &A)
The determinant of a matrix; Note: The LU decomposition of the matrix is a hidden calculation; ...
friend std::ostream & operator<<(std::ostream &os, const StokesVector &v)
Write out a StokesVector using the casacore::Vector output method.
static casacore::String dataTypeId()
StokesVector(casacore::Float f)
Construct from scalar, setting all values to a constant.
LatticeExprNode sqrt(const LatticeExprNode &expr)
CStokesVector & operator-=(const CStokesVector &v)
Subtraction.
bool Bool
Define the standard types used by Casacore.
Vector< T > vector() const
Convert to a regular Vector.
StokesVector & operator=(casacore::Float f)
Assign from a scalar, setting all values to a constant.
RigidVector< T, n > & operator*=(const RigidVector< T, n > &v)
casacore::Complex v_p[n]
// The following are needed for Image<RigidVector>
CStokesVector & operator*=(const CStokesVector &v)
StokesVector & operator-()
Negation.
casacore::Bool operator!=(const CStokesVector &v) const
Inequality.
casacore::Bool operator==(const StokesVector &v) const
Equality.
CStokesVector & operator*=(casacore::Float f)
StokesVector & operator*=(casacore::Float f)
StokesVector(const StokesVector &v)
Construct from casacore::Vector (should have length 4) StokesVector(const casacore::Vector<casacore::...
friend double norm(const CStokesVector &l)
CStokesVector & applySlinInv()
Apply conversion matrix from linear to casacore::Stokes, in place.
RigidVector< T, n > & operator-=(const RigidVector< T, n > &v)
Subtraction.
CStokesVector(const CStokesVector &v)
Construct from casacore::Vector (should have length 4) CStokesVector(const casacore::Vector<casacore:...
const Double c
Fundamental physical constants (SI units):
TableExprNode square(const TableExprNode &node)
String: the storage and methods of handling collections of characters.
void defaultValue(CStokesVector &v)
static casacore::String dataTypeId()
StokesVector & operator=(const casacore::Vector< casacore::Float > &v)
Assign from a Vector.
LatticeExprNode real(const LatticeExprNode &expr)
CStokesVector(const casacore::Complex &c)
Construct from scalar, setting all values to a constant.
RigidVector< T, n > & operator-()
Negation.
StokesVector & operator*=(const casacore::SquareMatrix< casacore::Float, 4 > &m)
casacore::Matrix multiplication - v*=m is equivalent to v=m*v
CStokesVector & applyScircInv()
Apply conversion matrix from circular to casacore::Stokes, in place.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.