ARTS  2.3.1285(git:92a29ea9-dirty)
transmissionmatrix.h File Reference

Stuff related to the transmission matrix. More...

#include <Eigen/Dense>
#include <Eigen/StdVector>
#include "jacobian.h"
#include "propagationmatrix.h"

Go to the source code of this file.

Classes

class  TransmissionMatrix
 Class to keep track of Transmission Matrices for Stokes Dim 1-4. More...
 
struct  TransmissionMatrix::Weights< N >
 Struct of far and close weights. More...
 
class  RadiationVector
 Radiation Vector for Stokes dimension 1-4. More...
 

Typedefs

typedef Array< TransmissionMatrixArrayOfTransmissionMatrix
 
typedef Array< ArrayOfTransmissionMatrixArrayOfArrayOfTransmissionMatrix
 
typedef Array< ArrayOfArrayOfTransmissionMatrixArrayOfArrayOfArrayOfTransmissionMatrix
 
typedef Array< RadiationVectorArrayOfRadiationVector
 
typedef Array< ArrayOfRadiationVectorArrayOfArrayOfRadiationVector
 
typedef Array< ArrayOfArrayOfRadiationVectorArrayOfArrayOfArrayOfRadiationVector
 

Enumerations

enum  BackscatterSolver { BackscatterSolver::CommutativeTransmission, BackscatterSolver::FullTransmission }
 Intended to hold various backscatter solvers. More...
 
enum  CumulativeTransmission { CumulativeTransmission::Forward, CumulativeTransmission::Reverse }
 Intended to hold various ways to accumulate the transmission matrix. More...
 
enum  RadiativeTransferSolver { RadiativeTransferSolver::Emission, RadiativeTransferSolver::Transmission, RadiativeTransferSolver::LinearWeightedEmission }
 Intended to hold various forward solvers. More...
 

Functions

LazyScale< TransmissionMatrixoperator* (const TransmissionMatrix &tm, const Numeric &x)
 Lazy scale of Transmission Matrix. More...
 
LazyScale< TransmissionMatrixoperator* (const Numeric &x, const TransmissionMatrix &tm)
 Lazy scale of Transmission Matrix. More...
 
std::ostream & operator<< (std::ostream &os, const TransmissionMatrix &tm)
 Output operator. More...
 
std::ostream & operator<< (std::ostream &os, const ArrayOfTransmissionMatrix &atm)
 Output operator. More...
 
std::ostream & operator<< (std::ostream &os, const ArrayOfArrayOfTransmissionMatrix &aatm)
 Output operator. More...
 
std::ostream & operator<< (std::ostream &os, const RadiationVector &rv)
 Output operator. More...
 
std::ostream & operator<< (std::ostream &os, const ArrayOfRadiationVector &arv)
 Output operator. More...
 
std::ostream & operator<< (std::ostream &os, const ArrayOfArrayOfRadiationVector &aarv)
 Output operator. More...
 
std::istream & operator>> (std::istream &is, TransmissionMatrix &tm)
 Input operator. More...
 
std::istream & operator>> (std::istream &is, RadiationVector &rv)
 Input operator. More...
 
void update_radiation_vector (RadiationVector &I, ArrayOfRadiationVector &dI1, ArrayOfRadiationVector &dI2, const RadiationVector &J1, const RadiationVector &J2, const ArrayOfRadiationVector &dJ1, const ArrayOfRadiationVector &dJ2, const TransmissionMatrix &T, const TransmissionMatrix &PiT, const ArrayOfTransmissionMatrix &dT1, const ArrayOfTransmissionMatrix &dT2, const RadiativeTransferSolver solver)
 Update the Radiation Vector. More...
 
void stepwise_source (RadiationVector &J, ArrayOfRadiationVector &dJ, const PropagationMatrix &K, const StokesVector &a, const StokesVector &S, const ArrayOfPropagationMatrix &dK, const ArrayOfStokesVector &da, const ArrayOfStokesVector &dS, const ConstVectorView B, const ConstVectorView dB_dT, const ArrayOfRetrievalQuantity &jacobian_quantities, const bool &jacobian_do)
 Set the stepwise source. More...
 
void stepwise_transmission (TransmissionMatrix &T, ArrayOfTransmissionMatrix &dT1, ArrayOfTransmissionMatrix &dT2, const PropagationMatrix &K1, const PropagationMatrix &K2, const ArrayOfPropagationMatrix &dK1, const ArrayOfPropagationMatrix &dK2, const Numeric &r, const Numeric &dr_dtemp1, const Numeric &dr_dtemp2, const Index temp_deriv_pos)
 Set the stepwise transmission matrix. More...
 
ArrayOfTransmissionMatrix cumulative_transmission (const ArrayOfTransmissionMatrix &T, const CumulativeTransmission type)
 Accumulate the transmission matrix over all layers. More...
 
void set_backscatter_radiation_vector (ArrayOfRadiationVector &I, ArrayOfArrayOfArrayOfRadiationVector &dI, const RadiationVector &I_incoming, const ArrayOfTransmissionMatrix &T, const ArrayOfTransmissionMatrix &PiTf, const ArrayOfTransmissionMatrix &PiTr, const ArrayOfTransmissionMatrix &Z, const ArrayOfArrayOfTransmissionMatrix &dT1, const ArrayOfArrayOfTransmissionMatrix &dT2, const ArrayOfArrayOfTransmissionMatrix &dZ, const BackscatterSolver solver)
 Set the backscatter radiation vector. More...
 
ArrayOfTransmissionMatrix cumulative_backscatter (ConstTensor5View t, ConstMatrixView m)
 Accumulated backscatter (???) More...
 
ArrayOfArrayOfTransmissionMatrix cumulative_backscatter_derivative (ConstTensor5View t, const ArrayOfMatrix &aom)
 Accumulated backscatter derivative (???) More...
 

Detailed Description

Stuff related to the transmission matrix.

Author
Richard Larsson
Date
2018-01-30

Using Eigen library to speed up computations.

Definition in file transmissionmatrix.h.

Typedef Documentation

◆ ArrayOfArrayOfArrayOfRadiationVector

◆ ArrayOfArrayOfArrayOfTransmissionMatrix

◆ ArrayOfArrayOfRadiationVector

◆ ArrayOfArrayOfTransmissionMatrix

◆ ArrayOfRadiationVector

◆ ArrayOfTransmissionMatrix

Enumeration Type Documentation

◆ BackscatterSolver

enum BackscatterSolver
strong

Intended to hold various backscatter solvers.

Enumerator
CommutativeTransmission 
FullTransmission 

Definition at line 931 of file transmissionmatrix.h.

◆ CumulativeTransmission

Intended to hold various ways to accumulate the transmission matrix.

Enumerator
Forward 
Reverse 

Definition at line 937 of file transmissionmatrix.h.

◆ RadiativeTransferSolver

Intended to hold various forward solvers.

Enumerator
Emission 
Transmission 
LinearWeightedEmission 

Definition at line 943 of file transmissionmatrix.h.

Function Documentation

◆ cumulative_backscatter()

ArrayOfTransmissionMatrix cumulative_backscatter ( ConstTensor5View  t,
ConstMatrixView  m 
)

Accumulated backscatter (???)

FIXMEDOC Patrick, these are translated from other functions that accumulate the back-scattering. I do not remember how this worked.

Parameters
tTensor5 of backscattering
m(???)
Returns
ArrayOfTransmissionMatrix cumulative backscattering

Definition at line 1714 of file transmissionmatrix.cc.

References joker, matrix1(), matrix2(), matrix3(), matrix4(), ConstTensor5View::nbooks(), ConstTensor5View::ncols(), ConstTensor5View::npages(), ns, and ConstTensor5View::nshelves().

◆ cumulative_backscatter_derivative()

ArrayOfArrayOfTransmissionMatrix cumulative_backscatter_derivative ( ConstTensor5View  t,
const ArrayOfMatrix aom 
)

Accumulated backscatter derivative (???)

FIXMEDOC Patrick, these are translated from other functions that accumulate the back-scattering. I do not remember how this worked.

Parameters
tTensor5 of backscattering
m(???)
Returns
ArrayOfTArrayOfTransmissionMatrix cumulative backscattering

Definition at line 1755 of file transmissionmatrix.cc.

References joker, matrix1(), matrix2(), matrix3(), matrix4(), ConstTensor5View::nbooks(), ConstTensor5View::ncols(), Array< base >::nelem(), ConstTensor5View::npages(), ns, and ConstTensor5View::nshelves().

◆ cumulative_transmission()

ArrayOfTransmissionMatrix cumulative_transmission ( const ArrayOfTransmissionMatrix T,
const CumulativeTransmission  type 
)

Accumulate the transmission matrix over all layers.

Parameters
[in]TTransmission matrix through all layers
[in]typeType of accumulation to target
Returns
ArrayOfTransmissionMatrix Transmission to target

Definition at line 1527 of file transmissionmatrix.cc.

References Forward, i, n, Array< base >::nelem(), ns, and Reverse.

Referenced by emission_from_propmat_field(), get_stepwise_transmission_matrix(), iyEmissionStandardSequential(), iyHybrid2(), and iyTransmissionStandard().

◆ operator*() [1/2]

LazyScale<TransmissionMatrix> operator* ( const TransmissionMatrix tm,
const Numeric x 
)
inline

Lazy scale of Transmission Matrix.

Parameters
[in]tmTransmission Matrix
[in]xScale
Returns
Lazy Transmission Matrix

Definition at line 378 of file transmissionmatrix.h.

◆ operator*() [2/2]

LazyScale<TransmissionMatrix> operator* ( const Numeric x,
const TransmissionMatrix tm 
)
inline

Lazy scale of Transmission Matrix.

Parameters
[in]xScale
[in]tmTransmission Matrix
Returns
Lazy Transmission Matrix

Definition at line 389 of file transmissionmatrix.h.

◆ operator<<() [1/6]

std::ostream& operator<< ( std::ostream &  os,
const TransmissionMatrix tm 
)

◆ operator<<() [2/6]

std::ostream& operator<< ( std::ostream &  os,
const ArrayOfTransmissionMatrix atm 
)

Output operator.

Definition at line 1812 of file transmissionmatrix.cc.

◆ operator<<() [3/6]

std::ostream& operator<< ( std::ostream &  os,
const ArrayOfArrayOfTransmissionMatrix aatm 
)

Output operator.

Definition at line 1818 of file transmissionmatrix.cc.

◆ operator<<() [4/6]

std::ostream& operator<< ( std::ostream &  os,
const RadiationVector rv 
)

Output operator.

Definition at line 1824 of file transmissionmatrix.cc.

◆ operator<<() [5/6]

std::ostream& operator<< ( std::ostream &  os,
const ArrayOfRadiationVector arv 
)

Output operator.

Definition at line 1833 of file transmissionmatrix.cc.

◆ operator<<() [6/6]

std::ostream& operator<< ( std::ostream &  os,
const ArrayOfArrayOfRadiationVector aarv 
)

Output operator.

Definition at line 1838 of file transmissionmatrix.cc.

◆ operator>>() [1/2]

std::istream& operator>> ( std::istream &  is,
TransmissionMatrix tm 
)

◆ operator>>() [2/2]

std::istream& operator>> ( std::istream &  is,
RadiationVector rv 
)

Input operator.

Definition at line 1860 of file transmissionmatrix.cc.

◆ set_backscatter_radiation_vector()

void set_backscatter_radiation_vector ( ArrayOfRadiationVector I,
ArrayOfArrayOfArrayOfRadiationVector dI,
const RadiationVector I_incoming,
const ArrayOfTransmissionMatrix T,
const ArrayOfTransmissionMatrix PiTf,
const ArrayOfTransmissionMatrix PiTr,
const ArrayOfTransmissionMatrix Z,
const ArrayOfArrayOfTransmissionMatrix dT1,
const ArrayOfArrayOfTransmissionMatrix dT2,
const ArrayOfArrayOfTransmissionMatrix dZ,
const BackscatterSolver  solver 
)

Set the backscatter radiation vector.

Parameters
[in,out]IRadiation vector of all layers
[in,out]dIRadiation vector derivative of all layers
[in]I_incomingIncoming radiation vector
[in]TTransmission matrix of all layers
[in]PiTfForwards accumulated transmission of all layers
[in]PiTrBackwards accumulated transmission of all layers
[in]ZReflection matrix of all layers
[in]dT1Transmission matrix derivative for level 1 of all layers
[in]dT2Transmission matrix derivative for level 2 of all layers
[in]dZerivative of reflection matrix of all layers
[in]solverType of backscattering of all layers

Definition at line 1548 of file transmissionmatrix.cc.

References CommutativeTransmission, FullTransmission, Array< base >::nelem(), and ns.

◆ stepwise_source()

void stepwise_source ( RadiationVector J,
ArrayOfRadiationVector dJ,
const PropagationMatrix K,
const StokesVector a,
const StokesVector S,
const ArrayOfPropagationMatrix dK,
const ArrayOfStokesVector da,
const ArrayOfStokesVector dS,
const ConstVectorView  B,
const ConstVectorView  dB_dT,
const ArrayOfRetrievalQuantity jacobian_quantities,
const bool &  jacobian_do 
)

Set the stepwise source.

Parameters
[in,out]JSource vector
[in,out]dJSource vector derivatives
[in]KPropagation matrix
[in]aAbsorption vector
[in]SScattering source vector
[in]dKPropagation matrix derivatives
[in]daAbsorption vector derivatives
[in]dSScattering source vector derivatives
[in]BPlanck vector
[in]dB_dTPlanck vector derivative wrt temperature
[in]jacobian_quantitiesAs WSV
[in]jacobian_doDo Jacobian?

Definition at line 1371 of file transmissionmatrix.cc.

References i, inv2(), inv3(), inv4(), PropagationMatrix::IsRotational(), PropagationMatrix::K12(), PropagationMatrix::K13(), PropagationMatrix::K14(), PropagationMatrix::K23(), PropagationMatrix::K24(), PropagationMatrix::K34(), PropagationMatrix::Kjj(), matrix2(), matrix3(), matrix4(), Array< base >::nelem(), PropagationMatrix::NumberOfFrequencies(), RadiationVector::setSource(), RadiationVector::SetZero(), RadiationVector::StokesDim(), Temperature, RadiationVector::Vec1(), RadiationVector::Vec2(), RadiationVector::Vec3(), RadiationVector::Vec4(), vector1(), vector2(), vector3(), and vector4().

Referenced by emission_from_propmat_field(), iyEmissionStandard(), iyEmissionStandardSequential(), and iyHybrid2().

◆ stepwise_transmission()

void stepwise_transmission ( TransmissionMatrix T,
ArrayOfTransmissionMatrix dT1,
ArrayOfTransmissionMatrix dT2,
const PropagationMatrix K1,
const PropagationMatrix K2,
const ArrayOfPropagationMatrix dK1,
const ArrayOfPropagationMatrix dK2,
const Numeric r,
const Numeric dr_dtemp1,
const Numeric dr_dtemp2,
const Index  temp_deriv_pos 
)

Set the stepwise transmission matrix.

Parameters
[in,out]TTransmission matrix
[in,out]dT1Transmission matrix derivative wrt level 1
[in,out]dT2Transmission matrix derivative wrt level 2
[in]K1Propagation matrix wrt level 1
[in]K2Propagation matrix wrt level 2
[in]dK1Propagation matrix derivative wrt level 1
[in]dK2Propagation matrix derivative wrt level 2
[in]rDistance through layer
[in]dr_dtemp1Distance through layer derivative wrt temperature of level 1
[in]dr_dtemp2Distance through layer derivative wrt temperature of level 2
[in]temp_deriv_posPosition of derivative of temperature (-1 if not present)

Definition at line 1353 of file transmissionmatrix.cc.

References dtransmat(), Array< base >::nelem(), and transmat().

Referenced by emission_from_propmat_field(), iyEmissionStandardSequential(), iyHybrid2(), and iyTransmissionStandard().

◆ update_radiation_vector()

void update_radiation_vector ( RadiationVector I,
ArrayOfRadiationVector dI1,
ArrayOfRadiationVector dI2,
const RadiationVector J1,
const RadiationVector J2,
const ArrayOfRadiationVector dJ1,
const ArrayOfRadiationVector dJ2,
const TransmissionMatrix T,
const TransmissionMatrix PiT,
const ArrayOfTransmissionMatrix dT1,
const ArrayOfTransmissionMatrix dT2,
const RadiativeTransferSolver  solver 
)

Update the Radiation Vector.

Parameters
[in,out]IRadiation vector
[in,out]dI1Radiation vector derivatives to level 1
[in,out]dI2Radiation vector derivatives to level 2
[in]J1Source vector from level 1
[in]J2Source vector from level 2
[in]dJ1Source vector derivative from level 1
[in]dJ2Source vector derivative from level 2
[in]TTransmission matrix through layer
[in]PiTAccumulated transmission matrix to space
[in]dT1Transmission matrix derivatives through layer from level 1
[in]dT2Transmission matrix derivatives through layer from level 2
[in]solverType of solver to use

Definition at line 1484 of file transmissionmatrix.cc.

References RadiationVector::add_avg(), RadiationVector::add_weighted(), Emission, i, RadiationVector::leftMul(), LinearWeightedEmission, RadiationVector::rem_avg(), and Transmission.

Referenced by emission_from_propmat_field(), iyEmissionStandardSequential(), iyHybrid2(), and iyTransmissionStandard().