ARTS 2.5.9 (git: 825fa5f2)
transmissionmatrix.cc File Reference
#include "transmissionmatrix.h"
#include "arts_conversions.h"
#include "double_imanip.h"

Go to the source code of this file.

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...
 
template<int N>
constexpr Eigen::Matrix< Numeric, N, 1 > source_vector (const StokesVector &a, const ConstVectorView &B, const StokesVector &da, const ConstVectorView &dB_dT, const StokesVector &dS, bool dT, Index i)
 
template<int N>
constexpr Eigen::Matrix< Numeric, N, 1 > source_vector (const StokesVector &a, const ConstVectorView &B, const StokesVector &da, const ConstVectorView &dB_dT, bool dT, Index i)
 
void transmat1 (TransmissionMatrix &T, const PropagationMatrix &K1, const PropagationMatrix &K2, const Numeric &r, const Index iz=0, const Index ia=0) noexcept
 
void transmat2 (TransmissionMatrix &T, const PropagationMatrix &K1, const PropagationMatrix &K2, const Numeric &r, const Index iz=0, const Index ia=0) noexcept
 
void transmat3 (TransmissionMatrix &T, const PropagationMatrix &K1, const PropagationMatrix &K2, const Numeric &r, const Index iz=0, const Index ia=0) noexcept
 
void transmat4 (TransmissionMatrix &T, const PropagationMatrix &K1, const PropagationMatrix &K2, const Numeric &r, const Index iz=0, const Index ia=0) noexcept
 
void dtransmat1 (TransmissionMatrix &T, ArrayOfTransmissionMatrix &dT1, ArrayOfTransmissionMatrix &dT2, const PropagationMatrix &K1, const PropagationMatrix &K2, const ArrayOfPropagationMatrix &dK1, const ArrayOfPropagationMatrix &dK2, const Numeric &r, const Numeric &dr_dT1, const Numeric &dr_dT2, const Index it, const Index iz, const Index ia) noexcept
 
void dtransmat2 (TransmissionMatrix &T, ArrayOfTransmissionMatrix &dT1, ArrayOfTransmissionMatrix &dT2, const PropagationMatrix &K1, const PropagationMatrix &K2, const ArrayOfPropagationMatrix &dK1, const ArrayOfPropagationMatrix &dK2, const Numeric &r, const Numeric &dr_dT1, const Numeric &dr_dT2, const Index it, const Index iz, const Index ia) noexcept
 
void dtransmat3 (TransmissionMatrix &T, ArrayOfTransmissionMatrix &dT1, ArrayOfTransmissionMatrix &dT2, const PropagationMatrix &K1, const PropagationMatrix &K2, const ArrayOfPropagationMatrix &dK1, const ArrayOfPropagationMatrix &dK2, const Numeric &r, const Numeric &dr_dT1, const Numeric &dr_dT2, const Index it, const Index iz, const Index ia) noexcept
 
void dtransmat4 (TransmissionMatrix &T, ArrayOfTransmissionMatrix &dT1, ArrayOfTransmissionMatrix &dT2, const PropagationMatrix &K1, const PropagationMatrix &K2, const ArrayOfPropagationMatrix &dK1, const ArrayOfPropagationMatrix &dK2, const Numeric &r, const Numeric &dr_dT1, const Numeric &dr_dT2, const Index it, const Index iz, const Index ia) noexcept
 
void transmat (TransmissionMatrix &T, const PropagationMatrix &K1, const PropagationMatrix &K2, const Numeric &r) noexcept
 
void dtransmat (TransmissionMatrix &T, ArrayOfTransmissionMatrix &dT1, ArrayOfTransmissionMatrix &dT2, const PropagationMatrix &K1, const PropagationMatrix &K2, const ArrayOfPropagationMatrix &dK1, const ArrayOfPropagationMatrix &dK2, const Numeric &r, const Numeric &dr_dT1=0, const Numeric &dr_dT2=0, const Index it=-1, const Index iz=0, const Index ia=0) noexcept
 
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...
 
void stepwise_source (RadiationVector &J, ArrayOfRadiationVector &dJ, RadiationVector &J_add, 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 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 PropagationMatrix &K1, const PropagationMatrix &K2, const ArrayOfPropagationMatrix &dK1, const ArrayOfPropagationMatrix &dK2, const Numeric r, const Vector &dr1, const Vector &dr2, const Index ia, const Index iz, const RadiativeTransferSolver solver)
 Update the Radiation Vector. 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 bulk_backscatter (const ConstTensor5View &Pe, const ConstMatrixView &pnd)
 Bulk back-scattering. More...
 
ArrayOfArrayOfTransmissionMatrix bulk_backscatter_derivative (const ConstTensor5View &Pe, const ArrayOfMatrix &dpnd_dx)
 Derivatives of bulk back-scattering
More...
 
std::ostream & operator<< (std::ostream &os, const TransmissionMatrix &tm)
 
std::ostream & operator<< (std::ostream &os, const RadiationVector &rv)
 
std::istream & operator>> (std::istream &is, TransmissionMatrix &tm)
 
std::istream & operator>> (std::istream &is, RadiationVector &rv)
 

Variables

constexpr Numeric lower_is_considered_zero_for_sinc_likes = 1e-4
 

Function Documentation

◆ bulk_backscatter()

ArrayOfTransmissionMatrix bulk_backscatter ( const ConstTensor5View Pe,
const ConstMatrixView pnd 
)

Bulk back-scattering.

Sums up the back-scattering per element with particle number densities.

Below ns is Stokes dim, nf the number of frequencies, np number of atmospheric positions, and ne the number of scattering elements.

Parameters
PeBack-scattering on scattering element basis (ne,np,nf,ns,ns)
pndParticle number densities (ne,np)
Returns
ArrayOfTransmissionMatrix Bulk back-scattering matrices

Definition at line 2188 of file transmissionmatrix.cc.

References joker, ConstTensor5View::nbooks(), ConstTensor5View::ncols(), ConstTensor5View::npages(), and ConstTensor5View::nshelves().

Referenced by iyRadarSingleScat().

◆ bulk_backscatter_derivative()

ArrayOfArrayOfTransmissionMatrix bulk_backscatter_derivative ( const ConstTensor5View Pe,
const ArrayOfMatrix dpnd_dx 
)

Derivatives of bulk back-scattering

Below ns is Stokes dim, nf the number of frequencies, np number of atmospheric positions, and ne the number of scattering elements.

Parameters
PeBack-scattering on scattering element basis (ne,np,nf,ns,ns)
dpnd_dxDerivatives of pnd with respect to Jacobian quantities
Returns
ArrayOfTArrayOfTransmissionMatrix Derivatives of bulk back-scattering

Definition at line 2230 of file transmissionmatrix.cc.

References joker, ConstTensor5View::nbooks(), ConstTensor5View::ncols(), Array< base >::nelem(), ConstTensor5View::npages(), and ConstTensor5View::nshelves().

Referenced by iyRadarSingleScat().

◆ 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 2001 of file transmissionmatrix.cc.

References Forward, mul(), Array< base >::nelem(), and Reverse.

Referenced by emission_from_propmat_field(), iyClearsky(), iyEmissionHybrid(), iyEmissionStandard(), iyRadarSingleScat(), iyTransmissionStandard(), and test_transmat_to_cumulativetransmat().

◆ dtransmat()

void dtransmat ( TransmissionMatrix T,
ArrayOfTransmissionMatrix dT1,
ArrayOfTransmissionMatrix dT2,
const PropagationMatrix K1,
const PropagationMatrix K2,
const ArrayOfPropagationMatrix dK1,
const ArrayOfPropagationMatrix dK2,
const Numeric r,
const Numeric dr_dT1 = 0,
const Numeric dr_dT2 = 0,
const Index  it = -1,
const Index  iz = 0,
const Index  ia = 0 
)
inlinenoexcept

◆ dtransmat1()

void dtransmat1 ( TransmissionMatrix T,
ArrayOfTransmissionMatrix dT1,
ArrayOfTransmissionMatrix dT2,
const PropagationMatrix K1,
const PropagationMatrix K2,
const ArrayOfPropagationMatrix dK1,
const ArrayOfPropagationMatrix dK2,
const Numeric r,
const Numeric dr_dT1,
const Numeric dr_dT2,
const Index  it,
const Index  iz,
const Index  ia 
)
inlinenoexcept

Definition at line 892 of file transmissionmatrix.cc.

Referenced by dtransmat().

◆ dtransmat2()

void dtransmat2 ( TransmissionMatrix T,
ArrayOfTransmissionMatrix dT1,
ArrayOfTransmissionMatrix dT2,
const PropagationMatrix K1,
const PropagationMatrix K2,
const ArrayOfPropagationMatrix dK1,
const ArrayOfPropagationMatrix dK2,
const Numeric r,
const Numeric dr_dT1,
const Numeric dr_dT2,
const Index  it,
const Index  iz,
const Index  ia 
)
inlinenoexcept

Definition at line 927 of file transmissionmatrix.cc.

References a, and b.

Referenced by dtransmat().

◆ dtransmat3()

void dtransmat3 ( TransmissionMatrix T,
ArrayOfTransmissionMatrix dT1,
ArrayOfTransmissionMatrix dT2,
const PropagationMatrix K1,
const PropagationMatrix K2,
const ArrayOfPropagationMatrix dK1,
const ArrayOfPropagationMatrix dK2,
const Numeric r,
const Numeric dr_dT1,
const Numeric dr_dT2,
const Index  it,
const Index  iz,
const Index  ia 
)
inlinenoexcept

Definition at line 978 of file transmissionmatrix.cc.

References a, a2, b, b2, c, imag(), real(), and u.

Referenced by dtransmat().

◆ dtransmat4()

void dtransmat4 ( TransmissionMatrix T,
ArrayOfTransmissionMatrix dT1,
ArrayOfTransmissionMatrix dT2,
const PropagationMatrix K1,
const PropagationMatrix K2,
const ArrayOfPropagationMatrix dK1,
const ArrayOfPropagationMatrix dK2,
const Numeric r,
const Numeric dr_dT1,
const Numeric dr_dT2,
const Index  it,
const Index  iz,
const Index  ia 
)
inlinenoexcept

Definition at line 1182 of file transmissionmatrix.cc.

References a, b, b2, c, d, Constant::inv_sqrt_2, lower_is_considered_zero_for_sinc_likes, real_val(), u, v, and w.

Referenced by dtransmat().

◆ operator*() [1/2]

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

Lazy scale of Transmission Matrix.

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

Definition at line 199 of file transmissionmatrix.cc.

◆ operator*() [2/2]

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

Lazy scale of Transmission Matrix.

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

Definition at line 194 of file transmissionmatrix.cc.

◆ operator<<() [1/2]

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

Definition at line 2292 of file transmissionmatrix.cc.

◆ operator<<() [2/2]

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

Definition at line 2284 of file transmissionmatrix.cc.

◆ operator>>() [1/2]

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

Definition at line 2315 of file transmissionmatrix.cc.

◆ operator>>() [2/2]

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

Definition at line 2301 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 2022 of file transmissionmatrix.cc.

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

Referenced by iyRadarSingleScat().

◆ source_vector() [1/2]

template<int N>
constexpr Eigen::Matrix< Numeric, N, 1 > source_vector ( const StokesVector a,
const ConstVectorView B,
const StokesVector da,
const ConstVectorView dB_dT,
bool  dT,
Index  i 
)
constexpr

◆ source_vector() [2/2]

template<int N>
constexpr Eigen::Matrix< Numeric, N, 1 > source_vector ( const StokesVector a,
const ConstVectorView B,
const StokesVector da,
const ConstVectorView dB_dT,
const StokesVector dS,
bool  dT,
Index  i 
)
constexpr

◆ stepwise_source()

void stepwise_source ( RadiationVector J,
ArrayOfRadiationVector dJ,
RadiationVector J_add,
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]J_addAdditional source vector
[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 1803 of file transmissionmatrix.cc.

References a, PropagationMatrix::Data(), RadiationVector::Frequencies(), PropagationMatrix::IsRotational(), joker, Array< base >::nelem(), PropagationMatrix::NumberOfFrequencies(), RadiationVector::setSource(), RadiationVector::SetZero(), RadiationVector::stokes_dim, RadiationVector::Vec1(), RadiationVector::Vec2(), RadiationVector::Vec3(), and RadiationVector::Vec4().

Referenced by emission_from_propmat_field(), iyClearsky(), iyEmissionHybrid(), and iyEmissionStandard().

◆ 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 1785 of file transmissionmatrix.cc.

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

Referenced by emission_from_propmat_field(), iyClearsky(), iyEmissionHybrid(), iyEmissionStandard(), iyRadarSingleScat(), iyTransmissionStandard(), test_transmat_from_propmat(), and test_transmat_to_cumulativetransmat().

◆ transmat()

void transmat ( TransmissionMatrix T,
const PropagationMatrix K1,
const PropagationMatrix K2,
const Numeric r 
)
inlinenoexcept

◆ transmat1()

void transmat1 ( TransmissionMatrix T,
const PropagationMatrix K1,
const PropagationMatrix K2,
const Numeric r,
const Index  iz = 0,
const Index  ia = 0 
)
inlinenoexcept

◆ transmat2()

void transmat2 ( TransmissionMatrix T,
const PropagationMatrix K1,
const PropagationMatrix K2,
const Numeric r,
const Index  iz = 0,
const Index  ia = 0 
)
inlinenoexcept

◆ transmat3()

void transmat3 ( TransmissionMatrix T,
const PropagationMatrix K1,
const PropagationMatrix K2,
const Numeric r,
const Index  iz = 0,
const Index  ia = 0 
)
inlinenoexcept

◆ transmat4()

◆ 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 PropagationMatrix K1,
const PropagationMatrix K2,
const ArrayOfPropagationMatrix dK1,
const ArrayOfPropagationMatrix dK2,
const Numeric  r,
const Vector dr1,
const Vector dr2,
const Index  ia,
const Index  iz,
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 1943 of file transmissionmatrix.cc.

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

Referenced by emission_from_propmat_field(), iyClearsky(), iyEmissionHybrid(), iyEmissionStandard(), and iyTransmissionStandard().

Variable Documentation

◆ lower_is_considered_zero_for_sinc_likes

constexpr Numeric lower_is_considered_zero_for_sinc_likes = 1e-4
constexpr

Definition at line 580 of file transmissionmatrix.cc.

Referenced by dtransmat4(), and transmat4().