rl_PolCSPOD Struct Reference

#include <rl_Polarization.h>

List of all members.

Public Member Functions

void init (double b_over_a=1.0, double psi=0.0)
void attenuate (double factor)
double intensity () const
std::ostream & print_on (std::ostream &os) const
void cprint_on (FILE *of) const

Public Attributes

rl_Traits::complex c2_ [2]
 polarization amplitude (cosine component)
rl_Traits::complex s2_ [2]
 polarization amplitude (sine component)


Detailed Description

A Plain Ol' Data struct (POD) encapsulating the OSAC-style complex polarization amplitudes. This is a utility POD to simplify communication with BPipe.

Relation to OSAC polarization amplitudes:

$ \mathtt{c2\_.q1} \Longleftrightarrow \mathtt{c2comp(1)}, \qquad \mathtt{c2\_.q2} \Longleftrightarrow \mathtt{c2comp(2)} $ $ \mathtt{s2\_.q1} \Longleftrightarrow \mathtt{s2comp(1)}, \qquad \mathtt{s2\_.q2} \Longleftrightarrow \mathtt{s2comp(2)} $

For random polarization:

\[ \mathtt{wt} = \mathtt{c2_.q1.r}^2 + \mathtt{c2_.q2.r}^2 + \mathtt{c2_.q1.i}^2 + \mathtt{c2_.q2.i}^2 + \mathtt{s2_.q1.r}^2 + \mathtt{s2_.q2.r}^2 + \mathtt{s2_.q1.i}^2 + \mathtt{s2_.q2.i}^2 \]

or

\[ \mathtt{wt} = \left| \mathtt{c2}[0] \right|^2 + \left| \mathtt{s2}[0] \right|^2 \]

For discrete polarization:

\[ \mathtt{wt} = \mathtt{c2_.q1.r}^2 + \mathtt{c2_.q2.r}^2 + \mathtt{c2_.q1.i}^2 + \mathtt{c2_.q2.i}^2 + \mathtt{s2_.q1.r}^2 + \mathtt{s2_.q2.r}^2 + \mathtt{s2_.q1.i}^2 + \mathtt{s2_.q2.i}^2 + 2 \left(\mathtt{c2_.q1.i} \mathtt{s2_.q1.r} + \mathtt{c2_.q2.i} \mathtt{c2_.q2.r} - \mathtt{c2_.q1.r} \mathtt{s2_.q1.i} - \mathtt{c2_.q2.r} \mathtt{c2_.q2.i} \right) \]

or

\[ \mathtt{wt} = \left| \mathtt{c2}[0] \right|^2 + \left| \mathtt{s2}[0] \right|^2 + 2 \left( \mathtt{c2}[0] \mathtt{s2}^\ast[0] + \mathtt{c2}[1] \mathtt{s2}^\ast[1] \right) \]

where the ${}^\ast$ superscript denotes a complex conjugate.

Definition at line 106 of file rl_Polarization.h.


Member Function Documentation

void rl_PolCSPOD::init ( double  b_over_a = 1.0,
double  psi = 0.0 
)

Initialization method.

Parameters:
b_over_a ratio of semiminor axis to semi-major axis.
psi angle of the major axis from the +X axis, with psi increasing towards +Y

Definition at line 76 of file rl_Polarization.cc.

References c2_, and s2_.

void rl_PolCSPOD::attenuate ( double  factor  ) 

Attenuate intensity by a factor.

Parameters:
factor the attenuation factor; the ray intensity is multiplied by factor.

Definition at line 121 of file rl_Polarization.cc.

References c2_, and s2_.

double rl_PolCSPOD::intensity (  )  const

Evaluate the intensity.

Returns:
the intensity (i.e., Stoke's $s_0$.

Definition at line 99 of file rl_Polarization.cc.

References c2_, and s2_.

Referenced by cprint_on().

std::ostream & rl_PolCSPOD::print_on ( std::ostream &  os  )  const

Write the polarization amplitude to stream os. The state is written out as "[(r,i)(r,i)][(r,i)(r,i)]".

Parameters:
os output stream.

Definition at line 135 of file rl_Polarization.cc.

References c2_, and s2_.

void rl_PolCSPOD::cprint_on ( FILE *  of  )  const

Write the polarization amplitude to FILE* of. The state is written out as "[(r,i)(r,i)]\n[(r,i)(r,i)]".

Parameters:
of output FILE*.

Definition at line 149 of file rl_Polarization.cc.

References c2_, intensity(), and s2_.


Member Data Documentation

polarization amplitude (cosine component)

Definition at line 109 of file rl_Polarization.h.

Referenced by attenuate(), cprint_on(), rl_Polarization::get_PolCSPOD(), rl_Polarization::init(), init(), intensity(), and print_on().

polarization amplitude (sine component)

Definition at line 111 of file rl_Polarization.h.

Referenced by attenuate(), cprint_on(), rl_Polarization::get_PolCSPOD(), rl_Polarization::init(), init(), intensity(), and print_on().


The documentation for this struct was generated from the following files:

Generated on Mon Nov 3 18:15:05 2008 for rl_raylib by  doxygen 1.5.6