ARTS 2.5.10 (git: 2f1c442c)
|
Stuff related to the propagation matrix. More...
Go to the source code of this file.
Classes | |
class | LazyScale< base > |
Class to help with hidden temporary variables for operations of type Numeric times Class. More... | |
class | PropagationMatrix |
class | StokesVector |
Stokes vector is as Propagation matrix but only has 4 possible values. More... | |
Typedefs | |
using | ArrayOfPropagationMatrix = Array< PropagationMatrix > |
using | ArrayOfArrayOfPropagationMatrix = Array< ArrayOfPropagationMatrix > |
using | ArrayOfStokesVector = Array< StokesVector > |
using | ArrayOfArrayOfStokesVector = Array< ArrayOfStokesVector > |
using | ArrayOfArrayOfArrayOfStokesVector = Array< ArrayOfArrayOfStokesVector > |
Functions | |
template<bool matrix> | |
constexpr Index | need2stokes (Index nstokes_needed) |
template<bool matrix> | |
constexpr Index | stokes2need (Index nstokes) |
void | compute_transmission_matrix (Tensor3View T, const Numeric &r, const PropagationMatrix &upper_level, const PropagationMatrix &lower_level, const Index iz=0, const Index ia=0) |
Compute the matrix exponent as the transmission matrix of this propagation matrix. | |
void | compute_transmission_matrix_from_averaged_matrix_at_frequency (MatrixView T, const Numeric &r, const PropagationMatrix &averaged_propagation_matrix, const Index iv, const Index iz=0, const Index ia=0) |
Compute the matrix exponent as the transmission matrix of this propagation matrix. | |
void | compute_transmission_matrix_and_derivative (Tensor3View T, Tensor4View dT_upper_level, Tensor4View dT_lower_level, const Numeric &r, const PropagationMatrix &upper_level, const PropagationMatrix &lower_level, const Array< PropagationMatrix > &dprop_mat_upper_level, const Array< PropagationMatrix > &dprop_mat_lower_level, const Numeric &dr_dTu=0.0, const Numeric &dr_dTl=0.0, const Index it=-1, const Index iz=0, const Index ia=0) |
LazyScale< PropagationMatrix > | operator* (const PropagationMatrix &pm, const Numeric &x) |
Returns a lazy multiplier. | |
LazyScale< PropagationMatrix > | operator* (const Numeric &x, const PropagationMatrix &pm) |
Returns a lazy multiplier. | |
template<class T > | |
bool | bad_propmat (const Array< T > &main, const Vector &f_grid, const Index sd=1) noexcept |
Checks if a Propagation Matrix or something similar has good grids. | |
Stuff related to the propagation matrix.
This implementation takes advantage of symmetries to lower memory and computational costs
Some standard functions applied on the propagation matrix have been included but far from all.
Present support is for stokes dim 1-4 however please take note that circular polarization delay variable's position in the internal mdata structure moves depending on if stokes_dim is 3 or 4. It is not present elsewhere...
Definition in file propagationmatrix.h.
Definition at line 1373 of file propagationmatrix.h.
Definition at line 975 of file propagationmatrix.h.
Definition at line 1372 of file propagationmatrix.h.
Definition at line 974 of file propagationmatrix.h.
using ArrayOfStokesVector = Array<StokesVector> |
Definition at line 1371 of file propagationmatrix.h.
|
noexcept |
Checks if a Propagation Matrix or something similar has good grids.
Definition at line 1395 of file propagationmatrix.h.
References main(), and ConstVectorView::nelem().
Referenced by propmat_clearskyAddCIA(), propmat_clearskyAddLines(), and zeeman_on_the_fly().
void compute_transmission_matrix | ( | Tensor3View | T, |
const Numeric & | r, | ||
const PropagationMatrix & | upper_level, | ||
const PropagationMatrix & | lower_level, | ||
const Index | iz = 0 , |
||
const Index | ia = 0 |
||
) |
Compute the matrix exponent as the transmission matrix of this propagation matrix.
The propagation matrix is multiplied by -r and level-averaged before exponent is applied.
upper_level and lower_level propagation matrices should thus be the level matrices and r the distance between these levels. The same is true for the derivative matrices.
Stokes dim 1 and 4 have been tested more. Stokes dim 2 and 3 have been found to work but could still have hidden errors for uncommon cases
[in,out] | T | transmission tensor with outmost dimension being frequency |
[in] | r | the distance over which the propagation matrix causes the transmission |
[in] | upper_level | The upper level propagation matrix |
[in] | lower_level | The lower level propagation matrix |
[in] | iz | Zenith index |
[in] | ia | Azimuth index |
Definition at line 34 of file propagationmatrix.cc.
References a, a2, b, b2, c, d, joker, PropagationMatrix::K12(), PropagationMatrix::K13(), PropagationMatrix::K14(), PropagationMatrix::K23(), PropagationMatrix::K24(), PropagationMatrix::K34(), PropagationMatrix::Kjj(), PropagationMatrix::NumberOfFrequencies(), sqrt(), PropagationMatrix::StokesDimensions(), u, v, and w.
Referenced by test_r_deriv_propagationmatrix().
void compute_transmission_matrix_and_derivative | ( | Tensor3View | T, |
Tensor4View | dT_upper_level, | ||
Tensor4View | dT_lower_level, | ||
const Numeric & | r, | ||
const PropagationMatrix & | upper_level, | ||
const PropagationMatrix & | lower_level, | ||
const Array< PropagationMatrix > & | dprop_mat_upper_level, | ||
const Array< PropagationMatrix > & | dprop_mat_lower_level, | ||
const Numeric & | dr_dTu = 0.0 , |
||
const Numeric & | dr_dTl = 0.0 , |
||
const Index | it = -1 , |
||
const Index | iz = 0 , |
||
const Index | ia = 0 |
||
) |
Compute the matrix exponent as the transmission matrix of this propagation matrix
The propagation matrix is multiplied by -r and level-averaged before exponent is applied.
upper_level and lower_level propagation matrices should thus be the level matrices and r the distance between these levels. The same is true for the derivative matrices.
Stokes dim 1 and 4 have been tested more. Stokes dim 2 and 3 have been found to work but could still have hidden errors for uncommon cases
[in,out] | T | transmission tensor with outmost dimension being frequency |
[in,out] | dT_upp | transmission tensors derivative with respect to derivatives of the propagation matrix for upper level |
[in,out] | dT_low | transmission tensors derivative with respect to derivatives of the propagation matrix for lower level |
[in] | r | the distance over which the propagation matrix causes the transmission |
[in] | upper_level | The upper level propagation matrix |
[in] | lower_level | The lower level propagation matrix |
[in] | dprop_mat_upp | derivatives of the upper propagation matrix with respect to some parameter (is multiplied by -0.5 r) |
[in] | dprop_mat_low | derivatives of the lower propagation matrix with respect to some parameter (is multiplied by -0.5 r) |
[in] | dr_dTu | Distance temperature derivative for upper level |
[in] | dr_dTl | Distance temperature derivative for lower level |
[in] | it | Position of temperature derivative (ignored at -1) |
[in] | iz | Zenith index |
[in] | ia | Azimuth index |
Definition at line 479 of file propagationmatrix.cc.
References a, a2, b, b2, c, d, joker, PropagationMatrix::K12(), PropagationMatrix::K13(), PropagationMatrix::K14(), PropagationMatrix::K23(), PropagationMatrix::K24(), PropagationMatrix::K34(), PropagationMatrix::Kjj(), Array< base >::nelem(), PropagationMatrix::NumberOfFrequencies(), sqrt(), PropagationMatrix::StokesDimensions(), u, v, and w.
Referenced by test_r_deriv_propagationmatrix().
void compute_transmission_matrix_from_averaged_matrix_at_frequency | ( | MatrixView | T, |
const Numeric & | r, | ||
const PropagationMatrix & | averaged_propagation_matrix, | ||
const Index | iv, | ||
const Index | iz = 0 , |
||
const Index | ia = 0 |
||
) |
Compute the matrix exponent as the transmission matrix of this propagation matrix.
The propagation matrix is multiplied by -r and level-averaged before exponent is applied.
Stokes dim 1 and 4 have been tested more. Stokes dim 2 and 3 have been found to work but could still have hidden errors for uncommon cases
[in,out] | T | transmission matrix at the position |
[in] | r | the distance over which the propagation matrix causes the transmission |
[in] | averaged_propagation_matrix | The propagation matrix |
[in] | iv | Frequency index |
[in] | iz | Zenith index |
[in] | ia | Azimuth index |
Definition at line 273 of file propagationmatrix.cc.
References a, a2, b, b2, c, d, PropagationMatrix::K12(), PropagationMatrix::K13(), PropagationMatrix::K14(), PropagationMatrix::K23(), PropagationMatrix::K24(), PropagationMatrix::K34(), PropagationMatrix::Kjj(), sqrt(), PropagationMatrix::StokesDimensions(), u, v, and w.
Referenced by rte_step_doit_replacement().
Definition at line 64 of file propagationmatrix.h.
References ARTS_ASSERT.
LazyScale< PropagationMatrix > operator* | ( | const Numeric & | x, |
const PropagationMatrix & | pm | ||
) |
Returns a lazy multiplier.
[in] | x | Scale |
[in] | pm | Propagation matrix |
Definition at line 2064 of file propagationmatrix.cc.
LazyScale< PropagationMatrix > operator* | ( | const PropagationMatrix & | pm, |
const Numeric & | x | ||
) |
Returns a lazy multiplier.
[in] | pm | Propagation matrix |
[in] | x | Scale |
Definition at line 2059 of file propagationmatrix.cc.
Definition at line 79 of file propagationmatrix.h.
References ARTS_ASSERT.