class StokesVector


The class StokesVector represents a Stokes vector in the Stokes-Mueller representation of polarization states. Arithmetic operations between Mueller matrices and Stokes vectors, various properties of a Stokes vector, and transformation operations are defined.

The elements of the Stokes vector are (Is+Ip, Is-Ip, Is+p-Is-p, Ilcp-Ircp), where Is is the intensity of the light polarized in the s-direction, Ip is the intensity of the light polarized in the p-direction, Is+p is the intensity of the light polarized in the s+p-direction, Is-p is the intensity of the light polarized in the s-p-direction, Ilcp is the left circularly polarized intensity, Ircp is the right circularly polarized intensity,

Include file:

#include "mueller.h"

Source code:

stokes.cpp

See also:

SCATMECH Home,   Conventions,   MuellerMatrix,   JonesMatrix,   JonesVector

C.F. Bohren and D.R. Huffman, Absorption and Scattering of Light by Small Particles, (Wiley, New York, 1983).
H.C. van de Hulst, Light Scattering by Small Particles, (Dover, New York, 1981).
R.A. Chipman, "Polarimetry." in Handbook of Optics, (McGraw-Hill, New York, 1995).

Definition of public elements:

class StokesVector {
    public:
        StokesVector();
        StokesVector(double I,double Q,double U,double V);
        StokesVector(const StokesVector& x);
        StokesVector(const JonesVector& j);
        StokesVector& operator=(const StokesVector& x);
        double& I();
        double I() const;
        double& Q();
        double Q() const;
        double& U();
        double U() const;
        double& V();        
        double V() const;
        double& operator[](int i);
        double operator[](int i) const;
        StokesVector operator*(const MuellerMatrix& matrix) const;
        double operator*(const StokesVector& a) const;
        StokesVector operator+(const StokesVector& a) const;
        StokesVector operator-(const StokesVector& a) const;
        StokesVector operator-() const;
        StokesVector operator*(double d) const;
        friend StokesVector operator*(double d,const StokesVector& s);
        StokesVector& operator*=(double d);
        StokesVector operator/(double d) const;
        StokesVector& operator/=(double d);
        StokesVector rotate(double angle) const;
        double eta() const;
        double intensity() const;
        double DOLP() const;
        double DOP() const;
        double DOCP() const;
        double e() const;
        double delta() const;
        double psi() const;
        double eccentricity() const;
	bool valid() const;
        StokesVector pol_part() const;
        StokesVector unpol_part() const;
};

ostream& operator<<(ostream& os,const StokesVector& j);
istream& operator>>(istream& is, StokesVector& j);


StokesVector()

The default constructor leaves the elements unassigned.

Top of Page

StokesVector(double I,double Q,double U,double V)

Constructor for a StokesVector that initializes the vector with four real numbers.

Example:

StokesVector s(1,0,0,0); // Unpolarized light of unity intensity

Top of Page

StokesVector(const StokesVector& x)

Copy constructor.

Example:

StokesVector a;
StokesVector b(a);

Top of Page

StokesVector(const JonesVector& j)

Constructor that converts a JonesVector to a StokesVector.

Example:

JonesVector j;
StokesVector s(j);

Top of Page

StokesVector& operator=(const StokesVector& x)

Assignment operator.

Example:

StokesVector a,b
a=b;

Top of Page

double& I()
double I() const
double& Q()
double Q() const
double& U()
double U() const
double& V()
double V() const

Operators that return references to each of the elements of the StokesVector, using the notation (I,Q,U,V).

Example:

StokesVector s;
// Circularly polarized light:
s.I()=1.;
s.Q()=0.;
s.U()=0.;
s.V()=1.;
cout << s.I() << '/t' << s.Q() << '/t' << s.U() << '/t' << s.V() << '/t' << endl;

Top of Page

double& operator[](int i)
double operator[](int i) const

Operators that returns a reference to a specific element by number.

Example:

StokesVector s;
// Circularly polarized light...
s[0]=1.;
s[1]=0.;
s[2]=0.;
s[3]=1.;
cout << s[0] << '/t' << s[1] << '/t' << s[2] << '/t' << s[3] << '/t' << endl;

Top of Page

StokesVector operator*(const MuellerMatrix& matrix) const

Right multiplication of a StokesVector by a MuellerMatrix.

Example:

StokesVector vector;
MuellerMatrix matrix;
vector = vector*matrix;

Top of Page

double operator*(const StokesVector& a) const

Scalar product between two StokesVector objects.

Example:

StokesVector vector1,vector2;
double scalar = vector1*vector2;

Top of Page

StokesVector operator+(const StokesVector& a) const
StokesVector operator-(const StokesVector& a) const

Addition or subtraction of two StokesVector objects.

Example:

StokesVector vector1,vector2,vector3;
vector3 = vector1+vector2;
vector3 = vector1-vector2;

Top of Page

StokesVector operator-() const

Negation of a StokesVector.

Example:

StokesVector vector;
vector = -vector;

Top of Page

StokesVector operator*(double d) const
friend StokesVector operator*(double d,const StokesVector& s)
StokesVector& operator*=(double d)
StokesVector operator/(double d) const
StokesVector& operator/=(double d)

Multiplication and division of a StokesVector by a scalar.

Example:

StokesVector vector;
double scalar;
vector = vector*scalar;
vector = scalar*vector; // Same thing.
vector *= scalar;       // Also same thing.
vector = vector/scalar;
vector /= scalar;       // Same thing.
vector = scalar/vector; // Not allowed.

Top of Page

StokesVector rotate(double angle) const

Function that returns a StokesVector rotated by some angle. The vector is rotated in a clockwise direction for positive angle.

Example:

StokesVector a,b;
a = b.rotate(45.*PI/180.);  // rotate b by 45 degrees.

Top of Page

double eta() const

Function that returns the principal angle of the polarization. The angle is measured counterclockwise from s-polarization.

Example:

StokesVector a;
cout << "Principal angle = " << a.eta()/PI*180. << " degrees" << endl;

Top of Page

double intensity() const

Function that returns the intensity associated with a StokesVector. This function is equivalent to I().

Example:

StokesVector a;
cout << "Intensity = " << a.intensity() << endl;

Top of Page

double DOLP() const
double DOP() const
double DOCP() const

Functions that return the degrees of linear polarization (DOLP), full polarization (DOP), and circular polarization (DOCP). The degree of circular polarization is positive for left-circularly polarized light.

Example:

StokesVector a;
cout << "Degrees of polarization: " << endl
     << "DOLP: " << a.DOLP() << endl
     << "DOP:  " << a.DOP() << endl
     << "DOCP: " << a.DOCP() << endl;

Top of Page

double e() const

Function that returns the ellipticity of the field (ratio of minor axis to major axis).

Example:

StokesVector a;
cout << "Ellipticity = " << a.e() << endl;

Top of Page

double delta() const

Function that returns the phase difference between the two components of the light.

Example:

StokesVector a;
cout << "delta = " << a.delta() << endl;

Top of Page

double psi() const

Function that returns the arc tangent of the ratio between the two components of the polarized part of the light. The returned value is zero for p-polarized light.

Example:

StokesVector a;
cout << "delta = " << a.delta() << endl;

Top of Page

double eccentricity() const

Function that returns the eccentricity of the light.

Example:

StokesVector a;
cout << "eccentricity = " << a.eccentricity() << endl;

Top of Page

bool valid() const

Function that returns true if the Stokes vector is physically valid and false otherwise. It checks that the first element is greater than or equal to the square rooot of the sum of squares of the other elements.

Top of Page

StokesVector pol_part() const
StokesVector unpol_part() const

Functions that return the polarized and unpolarized parts of a StokesVector.

Example:

StokesVector a,pol,unpol;
pol = a.pol();
unpol = a.unpol();

Top of Page

ostream& operator<<(ostream& os,const StokesVector& j)

Operator that prints a StokesVector to an output stream. The output contains four floating point numbers, separated by commas, and surrounded by parentheses, e.g., (5.321,3.432,-2.332,1.034)

Example:

StokesVector a;
cout << "a = " << a << endl;

Top of Page

istream& operator>>(istream& is, StokesVector& j)

Operator that reads a StokesVector from an input stream. The input must contain four floating point numbers, separated by commas, and be surrounded by parentheses, e.g., (5.321,3.432,-2.332,1.034).

Example:

StokesVector a;
cin >> a;

Top of Page


For More Information

SCATMECH Technical Information and Questions
Sensor Science Division Home Page
Sensor Science Division Inquiries
Website Comments

Current SCATMECH version: 7.22 (April 2021)