ARTS 2.5.10 (git: 2f1c442c)
|
Namespaces | |
namespace | LinearRovibErrorCorrectedSudden |
Generic interface for ECS calculations. | |
namespace | Makarov2020etal |
Classes | |
struct | EcsReturn |
struct | EquivalentLines |
Contains recomputed equivalent lines (sorting is unknown) More... | |
struct | ErrorCorrectedSuddenData |
Rovibrational line mixing data following the ideas of Collisional Effects On Molecular Spectra by J. More... | |
struct | MapOfErrorCorrectedSuddenData |
struct | PopulationAndDipole |
Contains the population distribution and dipole. More... | |
struct | SpeciesErrorCorrectedSuddenData |
Typedefs | |
using | EnergyFunction = std::function< Numeric(const Rational)> |
using | ArrayOfSpeciesErrorCorrectedSuddenData = Array< SpeciesErrorCorrectedSuddenData > |
Functions | |
std::ostream & | operator<< (std::ostream &os, const EquivalentLines &eqv) |
std::ostream & | operator<< (std::ostream &os, const SpeciesErrorCorrectedSuddenData &srbd) |
std::istream & | operator>> (std::istream &is, SpeciesErrorCorrectedSuddenData &srbd) |
std::pair< ArrayOfIndex, PopulationAndDipole > | sorted_population_and_dipole (const Numeric T, const AbsorptionLines &band) |
PopulationAndDipole | presorted_population_and_dipole (const Numeric T, const ArrayOfIndex &presorting, const AbsorptionLines &band) |
ComplexMatrix | single_species_ecs_relaxation_matrix (const AbsorptionLines &band, const ArrayOfIndex &sorting, const Numeric T, const Numeric P, const SpeciesErrorCorrectedSuddenData &species_ecs_data, const Index species_pos) |
ComplexMatrix | ecs_relaxation_matrix (const Numeric T, const Numeric P, const Vector &vmrs, const ErrorCorrectedSuddenData &ecs_data, const AbsorptionLines &band, const ArrayOfIndex &sorting, const Numeric frenorm) |
std::pair< ComplexVector, bool > | ecs_absorption_impl (const Numeric T, const Numeric H, const Numeric P, const Numeric this_vmr, const Vector &vmrs, const ErrorCorrectedSuddenData &ecs_data, const Vector &f_grid, const Zeeman::Polarization zeeman_polarization, const AbsorptionLines &band) |
EcsReturn | ecs_absorption (const Numeric T, const Numeric H, const Numeric P, const Numeric this_vmr, const Vector &vmrs, const ErrorCorrectedSuddenData &ecs_data, const Vector &f_grid, const Zeeman::Polarization zeeman_polarization, const AbsorptionLines &band, const ArrayOfRetrievalQuantity &jacobian_quantities) |
Index | band_eigenvalue_adaptation (AbsorptionLines &band, const Tensor4 &tempdata, const Vector &temperatures, const Numeric P0, const Index ord) |
Adapts the band to the temperature data. | |
Vector | RosenkranzY (const Vector &dip, const ConstMatrixView &W, const AbsorptionLines &band) |
Vector | RosenkranzG (const Vector &dip, const ConstMatrixView &W, const AbsorptionLines &band) |
Vector | RosenkranzDV (const Vector &dip, const ConstMatrixView &W, const AbsorptionLines &band) |
EquivalentLines | eigenvalue_adaptation_of_relmat (const ComplexMatrix &W, const Vector &pop, const Vector &dip, const AbsorptionLines &band, const Numeric frenorm, const Numeric T, const Numeric P, const Numeric QT, const Numeric QT0, const Index broadener) |
Adapts the relaxation matrix eigenvalues to a form where they represent additions towards the three Rosenkranz parameters and the 3rd order pressure broadening term. | |
Tensor4 | ecs_eigenvalue_approximation (const AbsorptionLines &band, const Vector &temperatures, const ErrorCorrectedSuddenData &ecs_data, const Numeric P) |
Tensor4 | rosenkranz_approximation (const AbsorptionLines &band, const Vector &temperatures, const ErrorCorrectedSuddenData &ecs_data, const Numeric P) |
void | ecs_eigenvalue_adaptation (AbsorptionLines &band, const Vector &temperatures, const ErrorCorrectedSuddenData &ecs_data, const Numeric P0, const Index ord, const bool robust, const bool rosenkranz_adaptation, const Verbosity &verbosity) |
Tensor5 | ecs_eigenvalue_adaptation_test (const AbsorptionLines &band, const Vector &temperatures, const ErrorCorrectedSuddenData &ecs_data, const Vector &pressures) |
std::ostream & | operator<< (std::ostream &os, const ErrorCorrectedSuddenData &rbd) |
std::istream & | operator>> (std::istream &is, ErrorCorrectedSuddenData &rbd) |
std::ostream & | operator<< (std::ostream &os, const MapOfErrorCorrectedSuddenData &m) |
using Absorption::LineMixing::ArrayOfSpeciesErrorCorrectedSuddenData = typedef Array<SpeciesErrorCorrectedSuddenData> |
Definition at line 106 of file linemixing.h.
using Absorption::LineMixing::EnergyFunction = typedef std::function<Numeric (const Rational)> |
Definition at line 70 of file linemixing.h.
Index Absorption::LineMixing::band_eigenvalue_adaptation | ( | AbsorptionLines & | band, |
const Tensor4 & | tempdata, | ||
const Vector & | temperatures, | ||
const Numeric | P0, | ||
const Index | ord | ||
) |
Adapts the band to the temperature data.
Definition at line 1110 of file linemixing.cc.
References ARTS_USER_ERROR, c, joker, Absorption::Lines::lines, LineShape::ModelParameters::N, N, Absorption::Lines::normalization, Absorption::Lines::NumBroadeners(), Absorption::Lines::NumLines(), and Absorption::Lines::population.
Referenced by ecs_eigenvalue_adaptation(), and lm_hitran_2017::hitran_lm_eigenvalue_adaptation().
EcsReturn Absorption::LineMixing::ecs_absorption | ( | const Numeric | T, |
const Numeric | H, | ||
const Numeric | P, | ||
const Numeric | this_vmr, | ||
const Vector & | vmrs, | ||
const ErrorCorrectedSuddenData & | ecs_data, | ||
const Vector & | f_grid, | ||
const Zeeman::Polarization | zeeman_polarization, | ||
const AbsorptionLines & | band, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities = {} |
||
) |
Computed the Error Corrected Sudden Complex absorption with Zeeman effect perturbations
Note that Zeeman perturbations are only applied after the ECS computations, and only if zeeman_polarization is not None
[in] | T | The temperature |
[in] | P | The pressure |
[in] | this_vmr | The VMR of this species |
[in] | vmrs | The VMRs of all broadeners of the absorption band |
[in] | mass | The mass of all broadeners of the absorption band |
[in] | f_grid | The grid of frequencies |
[in] | zeeman_polarization | The Zeeman polarization to consider |
[in] | band | The absorption band |
Definition at line 763 of file linemixing.cc.
References ARTS_USER_ERROR_IF, Absorption::Lines::bathbroadening, Absorption::Lines::broadeningspecies, Absorption::Lines::BroadeningSpeciesPosition(), d, Absorption::Lines::DoVmrDerivative(), ecs_absorption_impl(), Absorption::Lines::Isotopologue(), Absorption::Lines::lines, Array< base >::nelem(), Absorption::Lines::NumLines(), Absorption::LineMixing::ErrorCorrectedSuddenData::pos(), Absorption::Lines::quantumidentity, Absorption::Lines::selfbroadening, and Absorption::LineMixing::ErrorCorrectedSuddenData::size().
Referenced by main(), propmat_clearskyAddOnTheFlyLineMixing(), and propmat_clearskyAddOnTheFlyLineMixingWithZeeman().
std::pair< ComplexVector, bool > Absorption::LineMixing::ecs_absorption_impl | ( | const Numeric | T, |
const Numeric | H, | ||
const Numeric | P, | ||
const Numeric | this_vmr, | ||
const Vector & | vmrs, | ||
const ErrorCorrectedSuddenData & | ecs_data, | ||
const Vector & | f_grid, | ||
const Zeeman::Polarization | zeeman_polarization, | ||
const AbsorptionLines & | band | ||
) |
Definition at line 691 of file linemixing.cc.
References a, Absorption::Lines::DopplerConstant(), ecs_relaxation_matrix(), Absorption::Lines::F_mean(), Constant::h, Constant::k, Absorption::Lines::lineshapetype, ConstVectorView::nelem(), number_density(), Absorption::Lines::NumLines(), ComplexVectorView::real(), real_val(), sorted_population_and_dipole(), Constant::sqrt_ln_2, Constant::sqrt_pi, Absorption::LineMixing::EquivalentLines::str, Absorption::LineMixing::EquivalentLines::val, w, Absorption::Lines::ZeemanCount(), Absorption::Lines::ZeemanSplitting(), and Absorption::Lines::ZeemanStrength().
Referenced by ecs_absorption().
void Absorption::LineMixing::ecs_eigenvalue_adaptation | ( | AbsorptionLines & | band, |
const Vector & | temperatures, | ||
const ErrorCorrectedSuddenData & | ecs_data, | ||
const Numeric | P0, | ||
const Index | ord, | ||
const bool | robust, | ||
const bool | rosenkranz_adaptation, | ||
const Verbosity & | verbosity | ||
) |
Adapts the band to use Rosenkranz parameters from Eigenvalue decomposition
Fits will be of form:
Y ~ P * polyfit(x, y, LineShape::ModelParameters::N - 1) DV ~ P ** 2 * polyfit(x, dv, LineShape::ModelParameters::N - 1) G ~ P ** 2 * polyfit(x, g, LineShape::ModelParameters::N - 1) DG ~ P ** 3 * polyfit(x, dg, LineShape::ModelParameters::N - 1)
where all the values are computed at P0 but re-normalized by the order above
Note that these parameters will fail at high pressures
[in] | band | The absorption band |
[in] | temperatures | The temperature grid for fitting parameters upon |
[in] | mass | The mass of all broadeners of the absorption band |
[in] | P0 | The pressure at which temperature dependencies are computed at |
[in] | ord | The order of the parameters [1: Y; 2: Y, DF, G; 3: Y, DF, G, DG], the last is still not supported fully |
[in] | robust | Doesn't throw on failure if true |
[in] | rosenkranz_adaptation | Makes the explicit computation of Rosenkranz parameters |
[in] | verbosity | As WSM |
Definition at line 1452 of file linemixing.cc.
References ARTS_USER_ERROR_IF, band_eigenvalue_adaptation(), CREATE_OUT3, ecs_eigenvalue_approximation(), is_sorted(), Absorption::Lines::lines, Absorption::Lines::normalization, Absorption::Lines::population, Absorption::Lines::quantumidentity, and rosenkranz_approximation().
Referenced by abs_linesAdaptOnTheFlyLineMixing(), and main().
Tensor5 Absorption::LineMixing::ecs_eigenvalue_adaptation_test | ( | const AbsorptionLines & | band, |
const Vector & | temperatures, | ||
const ErrorCorrectedSuddenData & | ecs_data, | ||
const Vector & | pressures | ||
) |
Outputs the adaptation values used for ecs_eigenvalue_adaptation but as a function of pressure. ecs_eigenvalue_adaptation makes strong assumptions about the pressure order of the outputs used, and if this work for a given band can be found out using this data
[in] | band | The absorption band [N lines] |
[in] | temperatures | The temperature grid for fitting parameters upon [K temperatures] |
[in] | mass | The mass of all broadeners of the absorption band [M broadeners] |
[in] | pressures | The pressures for testing [L pressures] |
Definition at line 1500 of file linemixing.cc.
References ecs_eigenvalue_approximation(), joker, M, N, ConstVectorView::nelem(), Absorption::Lines::NumBroadeners(), Absorption::Lines::NumLines(), and ConstVectorView::size().
Tensor4 Absorption::LineMixing::ecs_eigenvalue_approximation | ( | const AbsorptionLines & | band, |
const Vector & | temperatures, | ||
const ErrorCorrectedSuddenData & | ecs_data, | ||
const Numeric | P | ||
) |
Computes the Eigenvalue adaptation values
The output is sorted based on frequency. If pressure shifts moves one line's frequency past another, this introduces errors. This is uncommon but happens more easily at higher pressures.
If this happens, the output of this function is not usable, but no safe-guards are in place to guard against this.
[in] | band | The absorption band [N lines] |
[in] | temperatures | The temperature grid for fitting parameters upon [K temperatures] |
[in] | mass | The mass of all broadeners of the absorption band [M broadeners] |
Definition at line 1351 of file linemixing.cc.
References Absorption::Lines::broadeningspecies, eigenvalue_adaptation_of_relmat(), Absorption::Lines::F_mean(), Absorption::Lines::Isotopologue(), joker, Absorption::Lines::lines, M, N, ConstVectorView::nelem(), Absorption::Lines::NumBroadeners(), Absorption::Lines::NumLines(), presorted_population_and_dipole(), single_partition_function(), single_species_ecs_relaxation_matrix(), sorted_population_and_dipole(), and Absorption::Lines::T0.
Referenced by ecs_eigenvalue_adaptation(), and ecs_eigenvalue_adaptation_test().
ComplexMatrix Absorption::LineMixing::ecs_relaxation_matrix | ( | const Numeric | T, |
const Numeric | P, | ||
const Vector & | vmrs, | ||
const ErrorCorrectedSuddenData & | ecs_data, | ||
const AbsorptionLines & | band, | ||
const ArrayOfIndex & | sorting, | ||
const Numeric | frenorm | ||
) |
Computes the Error Corrected Sudden relaxation matrix
[in] | T | The temperature |
[in] | P | The pressure |
[in] | vmrs | The VMRs of all broadeners of the absorption band |
[in] | mass | The mass of all broadeners of the absorption band |
[in] | band | The absorption band |
[in] | sorting | The sorting of the band |
[in] | frenorm | The renormalization of frequency |
Definition at line 660 of file linemixing.cc.
References Absorption::Lines::broadeningspecies, Absorption::Lines::lines, M, matpack::eigen::mat(), N, ConstVectorView::nelem(), Absorption::Lines::NumLines(), real_val(), and single_species_ecs_relaxation_matrix().
Referenced by ecs_absorption_impl().
EquivalentLines Absorption::LineMixing::eigenvalue_adaptation_of_relmat | ( | const ComplexMatrix & | W, |
const Vector & | pop, | ||
const Vector & | dip, | ||
const AbsorptionLines & | band, | ||
const Numeric | frenorm, | ||
const Numeric | T, | ||
const Numeric | P, | ||
const Numeric | QT, | ||
const Numeric | QT0, | ||
const Index | broadener | ||
) |
Adapts the relaxation matrix eigenvalues to a form where they represent additions towards the three Rosenkranz parameters and the 3rd order pressure broadening term.
The EquivalentLines are sorted by the real part of the val-component. At a sufficiently small pressure, this is equivalent to sorting by line frequency. At higher pressures, the sorting might be wrong
The output is adapted to fit into standard LBL calculations assuming that the pressure-sorting works. This happens via an adaptation so that
X = val - Complex(F0 + D0(T), G0(T)) Y = str / I(T) - 1
are the two return values, where val and str are the output of the standard constructor of EquivalentLines.
Definition at line 1282 of file linemixing.cc.
References Constant::h, Constant::k, Absorption::Lines::lines, Absorption::Lines::NumLines(), LineShape::LocalThermodynamicEquilibrium::S, ConstVectorView::size(), Absorption::LineMixing::EquivalentLines::sort_by_frequency(), Absorption::LineMixing::EquivalentLines::str, Absorption::Lines::T0, and Absorption::LineMixing::EquivalentLines::val.
Referenced by ecs_eigenvalue_approximation(), and lm_hitran_2017::hitran_lm_eigenvalue_approximation().
std::ostream & Absorption::LineMixing::operator<< | ( | std::ostream & | os, |
const EquivalentLines & | eqv | ||
) |
Definition at line 128 of file linemixing.cc.
std::ostream & Absorption::LineMixing::operator<< | ( | std::ostream & | os, |
const ErrorCorrectedSuddenData & | rbd | ||
) |
Definition at line 1516 of file linemixing.cc.
std::ostream & Absorption::LineMixing::operator<< | ( | std::ostream & | os, |
const MapOfErrorCorrectedSuddenData & | m | ||
) |
Definition at line 1570 of file linemixing.cc.
std::ostream & Absorption::LineMixing::operator<< | ( | std::ostream & | os, |
const SpeciesErrorCorrectedSuddenData & | srbd | ||
) |
Definition at line 137 of file linemixing.cc.
std::istream & Absorption::LineMixing::operator>> | ( | std::istream & | is, |
ErrorCorrectedSuddenData & | rbd | ||
) |
Definition at line 1525 of file linemixing.cc.
std::istream & Absorption::LineMixing::operator>> | ( | std::istream & | is, |
SpeciesErrorCorrectedSuddenData & | srbd | ||
) |
Definition at line 147 of file linemixing.cc.
PopulationAndDipole Absorption::LineMixing::presorted_population_and_dipole | ( | const Numeric | T, |
const ArrayOfIndex & | presorting, | ||
const AbsorptionLines & | band | ||
) |
Returns pre-sorted population distribtions and dipoles
[in] | T | The temperature |
[in] | presorting | Changes positions from [0 ... N-1] to presorting positions |
[in] | band | The absorption band |
Definition at line 259 of file linemixing.cc.
References Absorption::LineMixing::PopulationAndDipole::sort().
Referenced by ecs_eigenvalue_approximation(), and rosenkranz_approximation().
Tensor4 Absorption::LineMixing::rosenkranz_approximation | ( | const AbsorptionLines & | band, |
const Vector & | temperatures, | ||
const ErrorCorrectedSuddenData & | ecs_data, | ||
const Numeric | P | ||
) |
Computes the Eigenvalue adaptation values
The output is sorted based on frequency. If pressure shifts moves one line's frequency past another, this introduces errors. This is uncommon but happens more easily at higher pressures.
If this happens, the output of this function is not usable, but no safe-guards are in place to guard against this.
[in] | band | The absorption band [N lines] |
[in] | temperatures | The temperature grid for fitting parameters upon [K temperatures] |
[in] | mass | The mass of all broadeners of the absorption band [M broadeners] |
Definition at line 1411 of file linemixing.cc.
References Absorption::Lines::broadeningspecies, Absorption::Lines::F_mean(), ComplexMatrixView::imag(), joker, Absorption::Lines::lines, M, N, ConstVectorView::nelem(), Absorption::Lines::NumBroadeners(), Absorption::Lines::NumLines(), presorted_population_and_dipole(), RosenkranzDV(), RosenkranzG(), RosenkranzY(), single_species_ecs_relaxation_matrix(), sorted_population_and_dipole(), and Absorption::Lines::T0.
Referenced by ecs_eigenvalue_adaptation().
Vector Absorption::LineMixing::RosenkranzDV | ( | const Vector & | dip, |
const ConstMatrixView & | W, | ||
const AbsorptionLines & | band | ||
) |
Computes the Rosenkranz second order imaginary perturbation
[in] | dip | Reduced dipoles |
[in] | W | The relaxation matrix |
[in] | band | The absorption band |
Definition at line 1262 of file linemixing.cc.
References Absorption::Lines::lines, N, and ConstVectorView::nelem().
Referenced by rosenkranz_approximation().
Vector Absorption::LineMixing::RosenkranzG | ( | const Vector & | dip, |
const ConstMatrixView & | W, | ||
const AbsorptionLines & | band | ||
) |
Computes the Rosenkranz second order real perturbation
[in] | dip | Reduced dipoles |
[in] | W | The relaxation matrix |
[in] | band | The absorption band |
Definition at line 1228 of file linemixing.cc.
References Absorption::Lines::lines, N, ConstVectorView::nelem(), and Math::pow2().
Referenced by rosenkranz_approximation().
Vector Absorption::LineMixing::RosenkranzY | ( | const Vector & | dip, |
const ConstMatrixView & | W, | ||
const AbsorptionLines & | band | ||
) |
Computes the Rosenkranz first order perturbation
[in] | dip | Reduced dipoles |
[in] | W | The relaxation matrix |
[in] | band | The absorption band |
Definition at line 1201 of file linemixing.cc.
References Absorption::Lines::lines, N, and ConstVectorView::nelem().
Referenced by rosenkranz_approximation().
ComplexMatrix Absorption::LineMixing::single_species_ecs_relaxation_matrix | ( | const AbsorptionLines & | band, |
const ArrayOfIndex & | sorting, | ||
const Numeric | T, | ||
const Numeric | P, | ||
const SpeciesErrorCorrectedSuddenData & | species_ecs_data, | ||
const Index | species_pos | ||
) |
Computes the Error Corrected Sudden relaxation matrix for a single species
The band population type is used to select type of off-diagonal element computations
[in] | band | The absorption band |
[in] | sorting | The sorting of the band |
[in] | T | The temperature |
[in] | P | The pressure |
[in] | species_mass | The mass of the colliding species |
[in] | species_pos | The index position of the colliding species among the band broadeners |
Definition at line 613 of file linemixing.cc.
References ARTS_ASSERT, ComplexMatrixView::imag(), N, Absorption::Lines::NumLines(), Absorption::Lines::population, Absorption::LineMixing::Makarov2020etal::relaxation_matrix_offdiagonal(), Absorption::LineMixing::LinearRovibErrorCorrectedSudden::relaxation_matrix_offdiagonal(), and Absorption::Lines::ShapeParameters().
Referenced by ecs_eigenvalue_approximation(), ecs_relaxation_matrix(), and rosenkranz_approximation().
std::pair< ArrayOfIndex, PopulationAndDipole > Absorption::LineMixing::sorted_population_and_dipole | ( | const Numeric | T, |
const AbsorptionLines & | band | ||
) |
Returns sorted population distribtions and dipoles and the original sorting
[in] | T | The temperature |
[in] | band | The absorption band |
Definition at line 245 of file linemixing.cc.
References Absorption::LineMixing::PopulationAndDipole::sort().
Referenced by ecs_absorption_impl(), ecs_eigenvalue_approximation(), and rosenkranz_approximation().