ARTS 2.5.11 (git: 6827797f)
|
Computations of line shape derived parameters. More...
Namespaces | |
namespace | LegacyLineFunctionData |
Legacy dealing with reading old LineFunctionData. | |
namespace | LegacyLineMixingData |
Legacy dealing with reading old LineMixingData. | |
namespace | LegacyPressureBroadeningData |
Legacy dealing with reading old PressureBroadeningData. | |
Classes | |
class | Calculator |
Line shape calculator. More... | |
struct | ComputeData |
Main computational data for the line shape and strength calculations. More... | |
struct | ComputeValues |
struct | CutoffRange |
Struct to keep the cutoff limited range values. More... | |
struct | Derivatives |
Data struct for keeping derivative keys and values. More... | |
struct | Doppler |
struct | FullNonLocalThermodynamicEquilibrium |
struct | FullNonLocalThermodynamicEquilibriumInitialization |
struct | HartmannTran |
class | IntensityCalculator |
Class encapsulating all supported types of intensity calculations of individual absorption lines. More... | |
struct | LocalThermodynamicEquilibrium |
struct | Lorentz |
class | Model |
Main line shape model class. More... | |
struct | ModelParameters |
Coefficients and temperature model for SingleSpeciesModel. More... | |
struct | Nonorm |
class | Normalizer |
struct | Noshape |
struct | Nostrength |
struct | Output |
Main output of Model. More... | |
struct | RosenkranzQuadratic |
struct | SimpleFrequencyScaling |
class | SingleSpeciesModel |
Compute the line shape parameters for a single broadening species. More... | |
struct | SparseLimitRange |
Struct to keep the cutoff limited range values and the sparse limits. More... | |
struct | SpeedDependentVoigt |
struct | VanVleckHuber |
struct | VanVleckWeisskopf |
struct | VibrationalTemperaturesNonLocalThermodynamicEquilibrium |
struct | VibrationalTemperaturesNonLocalThermodynamicEquilibriumInitializer |
struct | Voigt |
Typedefs | |
using | ArrayOfDerivatives = Array< Derivatives > |
Helper to keep function signature clean. | |
Functions | |
constexpr Numeric | abs_squared (Complex z) noexcept |
CutoffRange | limited_range (const Numeric fl, const Numeric fu, const Vector &f_grid) ARTS_NOEXCEPT |
Gets the start and size of a range such that. | |
SparseLimitRange | linear_sparse_limited_range (const Numeric flc, const Numeric fuc, const Numeric fls, const Numeric fus, const Vector &f_grid, const Vector &sparse_f_grid) ARTS_NOEXCEPT |
SparseLimitRange | quad_sparse_limited_range (const Numeric flc, const Numeric fuc, const Numeric fls, const Numeric fus, const Vector &f_grid, const Vector &sparse_f_grid) ARTS_NOEXCEPT |
Index | active_nelem (const ArrayOfDerivatives &derivs) noexcept |
Helper function to find the last relevant derivative. | |
void | cutoff_frequency_loop (ComputeValues &com, Calculator &ls, Calculator &ls_mirr, Normalizer &ls_norm, const Calculator &ls_cut, const Calculator &ls_mirr_cut, const IntensityCalculator &ls_str, const ArrayOfDerivatives &derivs, const Complex LM, const Numeric &T, const Numeric &dfdH, const Numeric &Sz, const Species::Species self_species) ARTS_NOEXCEPT |
Cutoff frequency loop of the line shape call. | |
void | frequency_loop (ComputeValues &com, Calculator &ls, Calculator &ls_mirr, Normalizer &ls_norm, const IntensityCalculator &ls_str, const ArrayOfDerivatives &derivs, const Complex LM, const Numeric &T, const Numeric &dfdH, const Numeric &Sz, const Species::Species self_species) ARTS_NOEXCEPT |
Frequency loop of the line shape call. | |
void | cutoff_loop_sparse_linear (ComputeData &com, ComputeData &sparse_com, Normalizer ls_norm, const IntensityCalculator ls_str, const AbsorptionLines &band, const ArrayOfDerivatives &derivs, const Output X, const Numeric &T, const Numeric &H, const Numeric &sparse_lim, const Numeric &DC, const Index i, const Zeeman::Polarization zeeman_polarization) ARTS_NOEXCEPT |
Cutoff considerations of the line shape. | |
void | cutoff_loop_sparse_triple (ComputeData &com, ComputeData &sparse_com, Normalizer ls_norm, const IntensityCalculator ls_str, const AbsorptionLines &band, const ArrayOfDerivatives &derivs, const Output X, const Numeric &T, const Numeric &H, const Numeric &sparse_lim, const Numeric &DC, const Index i, const Zeeman::Polarization zeeman_polarization) ARTS_NOEXCEPT |
void | cutoff_loop (ComputeData &com, Normalizer ls_norm, const IntensityCalculator ls_str, const AbsorptionLines &band, const ArrayOfDerivatives &derivs, const Output X, const Numeric &T, const Numeric &H, const Numeric &DC, const Index i, const Zeeman::Polarization zeeman_polarization) ARTS_NOEXCEPT |
Cutoff considerations of the line shape. | |
void | line_loop (ComputeData &com, ComputeData &sparse_com, const AbsorptionLines &band, const ArrayOfRetrievalQuantity &jacobian_quantities, const EnergyLevelMap &nlte, const Vector &vmrs, const ArrayOfSpeciesTag &self_tag, const Numeric &P, const Numeric &T, const Numeric &H, const Numeric &sparse_lim, const Numeric QT, const Numeric QT0, const Numeric dQTdT, const Numeric r, const Numeric drdSELFVMR, const Numeric drdT, const Zeeman::Polarization zeeman_polarization, const Options::LblSpeedup speedup_type) ARTS_NOEXCEPT |
Loop all the lines of the band. | |
void | compute (ComputeData &com, ComputeData &sparse_com, const AbsorptionLines &band, const ArrayOfRetrievalQuantity &jacobian_quantities, const EnergyLevelMap &rtp_nlte, const Vector &vmrs, const ArrayOfSpeciesTag &self_tag, const Numeric &self_vmr, const Numeric &isot_ratio, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Numeric &H, const Numeric &sparse_lim, const Zeeman::Polarization zeeman_polarization, const Options::LblSpeedup speedup_type, const bool robust) ARTS_NOEXCEPT |
Compute the absorption of an absorption band. | |
Index | sparse_f_grid_red (const Vector &f_grid, const Numeric &sparse_df) noexcept |
Vector | linear_sparse_f_grid (const Vector &f_grid, const Numeric &sparse_df) ARTS_NOEXCEPT |
bool | good_linear_sparse_f_grid (const Vector &f_grid_dense, const Vector &f_grid_sparse) noexcept |
Vector | triple_sparse_f_grid (const Vector &f_grid, const Numeric &sparse_df) noexcept |
std::ostream & | operator<< (std::ostream &os, const Model &m) |
std::istream & | operator>> (std::istream &is, Model &m) |
String | ModelShape2MetaData (const Model &m) |
Model | MetaData2ModelShape (const String &s) |
String | modelparameters2metadata (const ModelParameters mp, const Numeric T0) |
ArrayOfString | ModelMetaDataArray (const LineShape::Model &m, const bool self, const ArrayOfSpecies &sts, const Numeric T0) |
Numeric & | SingleModelParameter (ModelParameters &mp, const String &type) |
Get a coefficient from ModelParameters by name. | |
std::ostream & | operator<< (std::ostream &os, const ModelParameters &mp) |
std::istream & | operator>> (std::istream &is, ModelParameters &mp) |
std::ostream & | operator<< (std::ostream &os, const SingleSpeciesModel &ssm) |
std::istream & | operator>> (std::istream &is, SingleSpeciesModel &ssm) |
std::ostream & | operator<< (std::ostream &os, Output x) |
Model | hitran_model (Numeric sgam, Numeric nself, Numeric agam, Numeric nair, Numeric psf) |
Model | lblrtm_model (Numeric sgam, Numeric nself, Numeric agam, Numeric nair, Numeric psf, std::array< Numeric, 12 > aer_interp) |
ENUMCLASS (Type, char, DP, LP, VP, SDVP, HTP, SplitLP, SplitVP, SplitSDVP, SplitHTP) const expr std | |
Type of line shape to compute. | |
ENUMCLASS (TemperatureModel, char, None, T0, T1, T2, T3, T4, T5, LM_AER, DPL, POLY) ENUMCLASS(Variable | |
Temperature models. | |
constexpr ModelParameters | modelparameterGetEmpty (const TemperatureModel t) noexcept |
constexpr bool | modelparameterEmpty (const ModelParameters mp) noexcept |
constexpr Numeric | modelparameterFirstExponent (const ModelParameters mp) noexcept |
constexpr Output | mirroredOutput (Output x) noexcept |
Output to be used by mirroring calls. | |
constexpr Output | negativeOutput (Output x) noexcept |
Output turned negative. | |
constexpr Output | si2cgs (Output x) noexcept |
Output turned from SI to CGS units. | |
constexpr Output | differenceOutput (Output y, Output x) noexcept |
Diff of two output. | |
Vector | vmrs (const ConstVectorView &atmospheric_vmrs, const ArrayOfArrayOfSpeciesTag &atmospheric_species, const ArrayOfSpecies &lineshape_species) ARTS_NOEXCEPT |
Returns a VMR vector for this model's main calculations. | |
Vector | mass (const ConstVectorView &atmospheric_vmrs, const ArrayOfArrayOfSpeciesTag &atmospheric_species, const ArrayOfSpecies &lineshape_species, const SpeciesIsotopologueRatios &ir) ARTS_NOEXCEPT |
Returns a mass vector for this model's main calculations. | |
std::istream & | from_artscat4 (std::istream &is, Type &type, bool &self, bool &bath, Model &m, ArrayOfSpecies &species, const QuantumIdentifier &qid) |
std::istream & | from_linefunctiondata (std::istream &data, Type &type, bool &self, bool &bath, Model &m, ArrayOfSpecies &species) |
std::istream & | from_linemixingdata (std::istream &data, Model &lsc) |
Legacy reading of old deprecated LineMixingData class. | |
std::istream & | from_pressurebroadeningdata (std::istream &data, LineShape::Type &type, bool &self, bool &bath, Model &m, ArrayOfSpecies &species, const QuantumIdentifier &qid) |
Legacy reading of old deprecated PressureBroadeningData class. | |
Variables | |
char | |
G0 | |
D0 | |
G2 | |
D2 | |
FVC | |
ETA | |
Y | |
G | |
constexpr Index | nVars = Index(Variable::FINAL) |
Current max number of line shape variables. | |
constexpr std::string_view | bath_broadening = "AIR" |
Name for bath broadening in printing and reading user input. | |
constexpr std::string_view | self_broadening = "SELF" |
Name for self broadening in printing and reading user input. | |
Computations of line shape derived parameters.
Defines many classes and IO routines for line shape parameters to comply with everything from no line mixing Doppler to coefficient-based line mixing Hartman-Tran profiles
using LineShape::ArrayOfDerivatives = typedef Array<Derivatives> |
Helper to keep function signature clean.
Definition at line 2195 of file lineshape.cc.
|
constexprnoexcept |
Definition at line 415 of file lineshape.cc.
Referenced by LineShape::HartmannTran::calc(), LineShape::SpeedDependentVoigt::init(), and LineShape::HartmannTran::init().
|
noexcept |
Helper function to find the last relevant derivative.
Definition at line 2198 of file lineshape.cc.
void LineShape::compute | ( | ComputeData & | com, |
ComputeData & | sparse_com, | ||
const AbsorptionLines & | band, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const EnergyLevelMap & | rtp_nlte, | ||
const Vector & | vmrs, | ||
const ArrayOfSpeciesTag & | self_tag, | ||
const Numeric & | self_vmr, | ||
const Numeric & | isot_ratio, | ||
const Numeric & | rtp_pressure, | ||
const Numeric & | rtp_temperature, | ||
const Numeric & | H, | ||
const Numeric & | sparse_lim, | ||
const Zeeman::Polarization | zeeman_polarization, | ||
const Options::LblSpeedup | speedup_type, | ||
const bool | robust | ||
) |
Compute the absorption of an absorption band.
For a single line the line shape is
\[ F_i = S_{z_i} S_{n_i} S_i LM_i F_i( \cdots ), \]
where \( S_{z_i} \) is the Zeeman scaling, \( S_{n_i} \) is the normalization scaling, \( S_i \) is the line strength scaling, \( LM_i \) is the line mixing scaling, and \( F_i( \cdots )\) is the shape.
and the derivatives are
\[ \frac{\partial F_l}{\partial t} = S_{z_i} \left( \frac{\partial S_{n_i}}{\partial t} S_i LM_i F_i( \cdots ) + S_{n_i} \frac{\partial S_i}{\partial t} LM_i F_i( \cdots ) + S_{n_i} S_i \frac{\partial LM_i}{\partial t} F_i( \cdots ) + S_{n_i} S_i LM_i \frac{\partial F_i( \cdots )}{\partial t} \right), \]
where \( t \) is some arbitrary variable.
[in,out] | com | Main computations variable. Should be initialized and may have been used before. |
[in,out] | sparse_com | Sparse computations variable. Should be initialized and may have been used before. |
[in] | band | The absorption band |
[in] | jacobian_quantities | As WSV |
[in] | rtp_nlte | As WSV |
[in] | vmrs | The volume mixing ratios of the band's line shape model |
[in] | self_tag | The species tag from abs_species this band belongs to (only used for derivatives) |
[in] | self_vmr | The volume mixing of the band's species. |
[in] | isot_ratio | The sotopologue ratio of the band's species |
[in] | rtp_pressure | As WSV |
[in] | rtp_temperature | As WSV |
[in] | H | The magnetic field strength in Teslas |
[in] | sparse_lim | The frequency separating the sparse and dense frequency grid calculations |
[in] | zeeman_polarization | Type of Zeeman polarization |
[in] | speedup_type | Type of sparse grid interactions |
[in] | robust | If true, a band with line mixing parameters guarantees non-negative output by allocating its own com and sparse_com for local calculations |
Definition at line 3549 of file lineshape.cc.
References ARTS_ASSERT, dnumber_density_dt(), dsingle_partition_function_dT(), LineShape::ComputeData::enforce_positive_absorption(), line_loop(), number_density(), Absorption::relaxationtype_relmat(), single_partition_function(), and vmrs().
Referenced by propmat_clearskyAddLines(), and zeeman_on_the_fly().
void LineShape::cutoff_frequency_loop | ( | ComputeValues & | com, |
Calculator & | ls, | ||
Calculator & | ls_mirr, | ||
Normalizer & | ls_norm, | ||
const Calculator & | ls_cut, | ||
const Calculator & | ls_mirr_cut, | ||
const IntensityCalculator & | ls_str, | ||
const ArrayOfDerivatives & | derivs, | ||
const Complex | LM, | ||
const Numeric & | T, | ||
const Numeric & | dfdH, | ||
const Numeric & | Sz, | ||
const Species::Species | self_species | ||
) |
Cutoff frequency loop of the line shape call.
This simply adds to the four output vectors/matrices for each frequency grid.
The equation solved is the inner part of
\[ F(f) = \sum_i S_{lm} S_n(f) S_z S_i \left[F_i\left(f\right) + F^M_i\left(f\right) - F_i\left(f_c\right) - F^M_i\left(f_c\right)\right], \]
where \( f \) is the frequency, \( i \) is the line index, \( S_{lm} \) is the line mixing scaling, \( S_n(f) \) is the line normalization at \( f \), \( S_z \) is the Zeeman line strength scaling, \( S_i \) is the line strength, \( F_i\left(f\right) \) is the line shape at \( f \), \( F^M_i\left(f\right) \) is the mirrored line shape at \( f \), and \( f_c \) is the cutoff frequency.
Each of \( S_n \), \( S_i \), \( F_i\left(f\right) \), and \( F^M_i\left(f\right) \) are setup to work as functional classes. They each define a set of possible derivatives and these possible derivatives are used to setup the chain rules required to computed \( \partial F(f) / \partial x \). Also, \( S_i \) is setup so to return the NLTE ratios required for computing
\[ N(f) = \sum_i S_{lm} S_n(f) S_z N_i \left[F_i\left(f\right) + F^M_i\left(f\right) - F_i\left(f_c\right) - F^M_i\left(f_c\right)\right], \]
with the same rules applied to \( \partial N(f) / \partial x \) as on \( \partial F(f) / \partial x \).
Note that even though not directly implied by this notation, most of the variables used in these two equations depends on some line parameters. Also note that the idea is to add full cross-section at once so as to limit the number of allocations in nested runs, so the calculations must happen in the inner most loop.
This function is not possible to run on multiple cores. Such parallelisms must happen at a much higher level.
[in] | jacobian_quantities | As WSV |
[in] | T | The atmospheric temperature |
[in] | do_nlte | Flag for whether or not NLTE will be computed |
[in] | LM | The line mixing scaling. \( S_{lm} \) |
[in] | ls_str | The line strength calculator. \( S_i \) |
[in,out] | ls_norm | The normalization calculator. \( S_n \) |
[in] | derivs | A list of pre-computed derivative values and keys |
[in,out] | F | The cross-section. \( F \) |
[in,out] | dF | The cross-section's derivatives. \( \partial F / \partial x \) |
[in,out] | N | The cross-section ratio of the NLTE source. \( N \) |
[in,out] | dN | The cross-section ratio of the NLTE source's derivatives. \( \partial N / \partial x \) |
[in] | f_grid | The frequency grid. \( \left[ f_0, \cdots, f_n \right] \) |
[in] | dfdH | The derivative of the change of frequency w.r.t. magnetic field strength |
[in] | Sz | The relative Zeeman strength. \( S_z \) |
[in] | ls | The line shape calculator. \( F_i \) |
[in] | ls_mirr | The mirrored line shape calculator. \( F^M_i \) |
Definition at line 2663 of file lineshape.cc.
References CutInternalDerivatives, d, D0, D2, ETA, FVC, G0, G2, InternalDerivativesG, InternalDerivativesY, and mirroredOutput().
Referenced by cutoff_loop(), cutoff_loop_sparse_linear(), and cutoff_loop_sparse_triple().
void LineShape::cutoff_loop | ( | ComputeData & | com, |
Normalizer | ls_norm, | ||
const IntensityCalculator | ls_str, | ||
const AbsorptionLines & | band, | ||
const ArrayOfDerivatives & | derivs, | ||
const Output | X, | ||
const Numeric & | T, | ||
const Numeric & | H, | ||
const Numeric & | DC, | ||
const Index | i, | ||
const Zeeman::Polarization | zeeman_polarization | ||
) |
Cutoff considerations of the line shape.
This function takes care of setting up cutoff and line shape considerations for the frequency loop function it wraps. Internally, the cutoff is calculated from the band information and a view of the correct data is sent on.
The Zeeman effect is also considered internally if applicable (or ignored otherwise)
This function is not possible to run on multiple cores. Such parallelisms must happen at a much higher level.
[in,out] | F | The cross-section. \( F \) |
[in,out] | dF | The cross-section's derivatives. \( \partial F / \partial x \) |
[in,out] | N | The cross-section ratio of the NLTE source. \( N \) |
[in,out] | dN | The cross-section ratio of the NLTE source's derivatives. \( \partial N / \partial x \) |
[in] | f_grid | The frequency grid. \( \left[ f_0, \cdots, f_n \right] \) |
[in] | band | The absorption band |
[in] | jacobian_quantities | As WSV |
[in] | T | The atmospheric temperature |
[in] | do_nlte | Flag for whether or not NLTE will be computed |
[in] | H | The magnetic field magnitude |
[in] | do_zeeman | Flag for whether this is part of some Zeeman calculations |
[in] | zeeman_polarization | The type of Zeeman polarization to consider (if any) |
[in] | f_mean | The mean frequency of the absorption band |
[in] | DC | The Doppler broadening constant of the band |
[in] | i | The line index |
[in] | X | The line shape model parameters of the atmosphere |
[in] | LM | The line mixing scaling. \( S_{lm} \) |
[in] | ls_str | The line strength calculator. \( S_i \) |
[in] | ls_norm | The normalization calculator. \( S_n \) |
[in] | derivs | A list of pre-computed derivative values and keys |
Definition at line 3290 of file lineshape.cc.
References cutoff_frequency_loop(), frequency_loop(), and limited_range().
Referenced by line_loop().
void LineShape::cutoff_loop_sparse_linear | ( | ComputeData & | com, |
ComputeData & | sparse_com, | ||
Normalizer | ls_norm, | ||
const IntensityCalculator | ls_str, | ||
const AbsorptionLines & | band, | ||
const ArrayOfDerivatives & | derivs, | ||
const Output | X, | ||
const Numeric & | T, | ||
const Numeric & | H, | ||
const Numeric & | sparse_lim, | ||
const Numeric & | DC, | ||
const Index | i, | ||
const Zeeman::Polarization | zeeman_polarization | ||
) |
Cutoff considerations of the line shape.
This function takes care of setting up cutoff and line shape considerations for the frequency loop function it wraps. Internally, the cutoff is calculated from the band information and a view of the correct data is sent on.
The Zeeman effect is also considered internally if applicable (or ignored otherwise)
This function is not possible to run on multiple cores. Such parallelisms must happen at a much higher level.
[in,out] | F | The cross-section. \( F \) |
[in,out] | dF | The cross-section's derivatives. \( \partial F / \partial x \) |
[in,out] | N | The cross-section ratio of the NLTE source. \( N \) |
[in,out] | dN | The cross-section ratio of the NLTE source's derivatives. \( \partial N / \partial x \) |
[in] | f_grid | The frequency grid. \( \left[ f_0, \cdots, f_n \right] \) |
[in] | band | The absorption band |
[in] | jacobian_quantities | As WSV |
[in] | T | The atmospheric temperature |
[in] | do_nlte | Flag for whether or not NLTE will be computed |
[in] | H | The magnetic field magnitude |
[in] | do_zeeman | Flag for whether this is part of some Zeeman calculations |
[in] | zeeman_polarization | The type of Zeeman polarization to consider (if any) |
[in] | f_mean | The mean frequency of the absorption band |
[in] | DC | The Doppler broadening constant of the band |
[in] | i | The line index |
[in] | X | The line shape model parameters of the atmosphere |
[in] | LM | The line mixing scaling. \( S_{lm} \) |
[in] | ls_str | The line strength calculator. \( S_i \) |
[in] | ls_norm | The normalization calculator. \( S_n \) |
[in] | derivs | A list of pre-computed derivative values and keys |
Definition at line 3084 of file lineshape.cc.
References cutoff_frequency_loop(), frequency_loop(), and linear_sparse_limited_range().
Referenced by line_loop().
void LineShape::cutoff_loop_sparse_triple | ( | ComputeData & | com, |
ComputeData & | sparse_com, | ||
Normalizer | ls_norm, | ||
const IntensityCalculator | ls_str, | ||
const AbsorptionLines & | band, | ||
const ArrayOfDerivatives & | derivs, | ||
const Output | X, | ||
const Numeric & | T, | ||
const Numeric & | H, | ||
const Numeric & | sparse_lim, | ||
const Numeric & | DC, | ||
const Index | i, | ||
const Zeeman::Polarization | zeeman_polarization | ||
) |
Definition at line 3168 of file lineshape.cc.
References cutoff_frequency_loop(), frequency_loop(), and quad_sparse_limited_range().
Referenced by line_loop().
Diff of two output.
Definition at line 567 of file lineshapemodel.h.
References LineShape::Output::G0.
LineShape::ENUMCLASS | ( | TemperatureModel | , |
char | , | ||
None | , | ||
T0 | , | ||
T1 | , | ||
T2 | , | ||
T3 | , | ||
T4 | , | ||
T5 | , | ||
LM_AER | , | ||
DPL | , | ||
POLY | |||
) |
Temperature models.
Each input here should correspond to a method of how to compute the variable given the coefficients and Interpolation data available to SingleSpeciesModel
FIXME: The python API breaks if this is a char type even though it can be???? List of possible shape variables
Should correspond to strings in AllLineShapeVars()
LineShape::ENUMCLASS | ( | Type | , |
char | , | ||
DP | , | ||
LP | , | ||
VP | , | ||
SDVP | , | ||
HTP | , | ||
SplitLP | , | ||
SplitVP | , | ||
SplitSDVP | , | ||
SplitHTP | |||
) | const |
Type of line shape to compute.
Turns selected Type into a human readable string
This function takes the input Type and returns it as a string
[in] | type | The Type |
If it is, the line shape is computed as F_1(...) + F_2(...) + /// + F_N(...) If it is not, then it is computed as F(avg(..._1 + ..._2 + /// + ..._N))
Where F is the lineshape, the subindex is the line parameter (such as pressure broadening) and avg(///) is an averaging function
[in] | type | The LineShape::Type |
Definition at line 44 of file lineshapemodel.h.
void LineShape::frequency_loop | ( | ComputeValues & | com, |
Calculator & | ls, | ||
Calculator & | ls_mirr, | ||
Normalizer & | ls_norm, | ||
const IntensityCalculator & | ls_str, | ||
const ArrayOfDerivatives & | derivs, | ||
const Complex | LM, | ||
const Numeric & | T, | ||
const Numeric & | dfdH, | ||
const Numeric & | Sz, | ||
const Species::Species | self_species | ||
) |
Frequency loop of the line shape call.
This simply adds to the four output vectors/matrices for each frequency grid.
The equation solved is the inner part of
\[ F(f) = \sum_i S_{lm} S_n(f) S_z S_i \left[F_i\left(f\right) + F^M_i\left(f\right)\right], \]
where \( f \) is the frequency, \( i \) is the line index, \( S_{lm} \) is the line mixing scaling, \( S_n(f) \) is the line normalization at \( f \), \( S_z \) is the Zeeman line strength scaling, \( S_i \) is the line strength, \( F_i\left(f\right) \) is the line shape at \( f \), and \( F^M_i\left(f\right) \) is the mirrored line shape at \( f \).
Each of \( S_n \), \( S_i \), \( F_i\left(f\right) \), and \( F^M_i\left(f\right) \) are setup to work as functional classes. They each define a set of possible derivatives and these possible derivatives are used to setup the chain rules required to computed \( \partial F(f) / \partial x \). Also, \( S_i \) is setup so to return the NLTE ratios required for computing
\[ N(f) = \sum_i S_{lm} S_n(f) S_z N_i \left[F_i\left(f\right) + F^M_i\left(f\right)\right], \]
with the same rules applied to \( \partial N(f) / \partial x \) as on \( \partial F(f) / \partial x \).
Note that even though not directly implied by this notation, most of the variables used in these two equations depends on some line parameters. Also note that the idea is to add full cross-section at once so as to limit the number of allocations in nested runs, so the calculations must happen in the inner most loop.
This function is not possible to run on multiple cores. Such parallelisms must happen at a much higher level.
[in] | jacobian_quantities | As WSV |
[in] | T | The atmospheric temperature |
[in] | do_nlte | Flag for whether or not NLTE will be computed |
[in] | LM | The line mixing scaling. \( S_{lm} \) |
[in] | ls_str | The line strength calculator. \( S_i \) |
[in,out] | ls_norm | The normalization calculator. \( S_n \) |
[in] | derivs | A list of pre-computed derivative values and keys |
[in,out] | F | The cross-section. \( F \) |
[in,out] | dF | The cross-section's derivatives. \( \partial F / \partial x \) |
[in,out] | N | The cross-section ratio of the NLTE source. \( N \) |
[in,out] | dN | The cross-section ratio of the NLTE source's derivatives. \( \partial N / \partial x \) |
[in] | f_grid | The frequency grid. \( \left[ f_0, \cdots, f_n \right] \) |
[in] | dfdH | The derivative of the change of frequency w.r.t. magnetic field strength |
[in] | Sz | The relative Zeeman strength. \( S_z \) |
[in] | ls | The line shape calculator. \( F_i \) |
[in] | ls_mirr | The mirrored line shape calculator. \( F^M_i \) |
Definition at line 2890 of file lineshape.cc.
References d, D0, D2, ETA, FVC, G0, G2, InternalDerivatives, InternalDerivativesG, InternalDerivativesY, and mirroredOutput().
Referenced by cutoff_loop(), cutoff_loop_sparse_linear(), and cutoff_loop_sparse_triple().
std::istream & LineShape::from_artscat4 | ( | std::istream & | is, |
Type & | type, | ||
bool & | self, | ||
bool & | bath, | ||
Model & | m, | ||
ArrayOfSpecies & | species, | ||
const QuantumIdentifier & | qid | ||
) |
Definition at line 64 of file lineshapemodel.cc.
References ARTS_USER_ERROR_IF, Quantum::Number::GlobalState::Isotopologue(), LineShape::Model::mdata, LineShape::Model::Remove(), Quantum::Number::GlobalState::Species(), and v.
Referenced by Absorption::ReadFromArtscat4Stream().
std::istream & LineShape::from_linefunctiondata | ( | std::istream & | data, |
Type & | type, | ||
bool & | self, | ||
bool & | bath, | ||
Model & | m, | ||
ArrayOfSpecies & | species | ||
) |
Definition at line 124 of file lineshapemodel.cc.
References ARTS_USER_ERROR, ARTS_USER_ERROR_IF, bath_broadening, check_enum_error(), good_enum(), LineShape::Model::mdata, self_broadening, and toString().
Referenced by Absorption::ReadFromArtscat5Stream().
std::istream & LineShape::from_linemixingdata | ( | std::istream & | data, |
LineShape::Model & | lsc | ||
) |
Legacy reading of old deprecated LineMixingData class.
Definition at line 260 of file lineshapemodel.cc.
Referenced by Absorption::ReadFromArtscat5Stream().
std::istream & LineShape::from_pressurebroadeningdata | ( | std::istream & | data, |
LineShape::Type & | type, | ||
bool & | self, | ||
bool & | bath, | ||
Model & | m, | ||
ArrayOfSpecies & | species, | ||
const QuantumIdentifier & | qid | ||
) |
Legacy reading of old deprecated PressureBroadeningData class.
Definition at line 229 of file lineshapemodel.cc.
References Quantum::Number::GlobalState::Species().
Referenced by Absorption::ReadFromArtscat5Stream().
|
noexcept |
Definition at line 3662 of file lineshape.cc.
Referenced by sparse_f_gridFromFrequencyGrid().
Model LineShape::hitran_model | ( | Numeric | sgam, |
Numeric | nself, | ||
Numeric | agam, | ||
Numeric | nair, | ||
Numeric | psf | ||
) |
Definition at line 1096 of file lineshapemodel.cc.
References LineShape::Model::Data().
Referenced by Absorption::ReadFromHitran2001Stream(), Absorption::ReadFromHitran2004Stream(), Absorption::ReadFromHitranOnlineStream(), and Absorption::ReadFromLBLRTMStream().
Model LineShape::lblrtm_model | ( | Numeric | sgam, |
Numeric | nself, | ||
Numeric | agam, | ||
Numeric | nair, | ||
Numeric | psf, | ||
std::array< Numeric, 12 > | aer_interp | ||
) |
Definition at line 1112 of file lineshapemodel.cc.
References LineShape::Model::Data().
Referenced by Absorption::ReadFromLBLRTMStream().
CutoffRange LineShape::limited_range | ( | const Numeric | fl, |
const Numeric | fu, | ||
const Vector & | f_grid | ||
) |
Gets the start and size of a range such that.
\[ fl \leq f_grid[i] \leq fu \]
for i such that all fl <= f_grid[Range(out.first, out.second, 1)] <= fu
[in] | fl | Lower frequency limit |
[in] | fu | Upper frequency limit |
[in] | f_grid | As WSV, must be sorted |
Definition at line 2031 of file lineshape.cc.
References ARTS_ASSERT.
Referenced by cutoff_loop().
void LineShape::line_loop | ( | ComputeData & | com, |
ComputeData & | sparse_com, | ||
const AbsorptionLines & | band, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const EnergyLevelMap & | nlte, | ||
const Vector & | vmrs, | ||
const ArrayOfSpeciesTag & | self_tag, | ||
const Numeric & | P, | ||
const Numeric & | T, | ||
const Numeric & | H, | ||
const Numeric & | sparse_lim, | ||
const Numeric | QT, | ||
const Numeric | QT0, | ||
const Numeric | dQTdT, | ||
const Numeric | r, | ||
const Numeric | drdSELFVMR, | ||
const Numeric | drdT, | ||
const Zeeman::Polarization | zeeman_polarization, | ||
const Options::LblSpeedup | speedup_type | ||
) |
Loop all the lines of the band.
This function is not possible to run on multiple cores. Such parallelisms must happen at a much higher level.
[in,out] | F | The cross-section. \( F \) |
[in,out] | dF | The cross-section's derivatives. \( \partial F / \partial x \) |
[in,out] | N | The cross-section ratio of the NLTE source. \( N \) |
[in,out] | dN | The cross-section ratio of the NLTE source's derivatives. \( \partial N / \partial x \) |
[in] | f_grid | The frequency grid. \( \left[ f_0, \cdots, f_n \right] \) |
[in] | band | The absorption band |
[in] | jacobian_quantities | As WSV |
[in] | nlte | A map of NLTE data |
[in] | vmrs | The band volume mixing ratio |
[in] | isot_ratio | The isotopic ratio of the isotopologue |
[in] | P | The atmospheric pressure |
[in] | T | The atmospheric temperature |
[in] | do_nlte | Flag for whether or not NLTE will be computed |
[in] | H | The magnetic field magnitude |
[in] | do_zeeman | Flag for whether this is part of some Zeeman calculations |
[in] | zeeman_polarization | The type of Zeeman polarization to consider (if any) |
[in] | f_mean | The mean frequency of the absorption band |
[in] | QT | The partition function at the temperature |
[in] | QT0 | The partition function at the reference temperature |
[in] | dQTdT | The derivative of the partition function at the temperature wrt temperature |
Definition at line 3369 of file lineshape.cc.
References LineShape::IntensityCalculator::adaptive_scaling(), cutoff_loop(), cutoff_loop_sparse_linear(), cutoff_loop_sparse_triple(), D0, D2, ETA, FVC, G, G0, G2, InternalDerivativesSetup, vmrs(), and Y.
Referenced by compute().
Vector LineShape::linear_sparse_f_grid | ( | const Vector & | f_grid, |
const Numeric & | sparse_df | ||
) |
Definition at line 3639 of file lineshape.cc.
References sparse_f_grid_red().
Referenced by sparse_f_gridFromFrequencyGrid().
SparseLimitRange LineShape::linear_sparse_limited_range | ( | const Numeric | flc, |
const Numeric | fuc, | ||
const Numeric | fls, | ||
const Numeric | fus, | ||
const Vector & | f_grid, | ||
const Vector & | sparse_f_grid | ||
) |
Definition at line 2048 of file lineshape.cc.
References ARTS_ASSERT.
Referenced by cutoff_loop_sparse_linear().
Vector LineShape::mass | ( | const ConstVectorView & | atmospheric_vmrs, |
const ArrayOfArrayOfSpeciesTag & | atmospheric_species, | ||
const ArrayOfSpecies & | lineshape_species, | ||
const SpeciesIsotopologueRatios & | ir | ||
) |
Returns a mass vector for this model's main calculations.
Sets a vector that matches the mdata size of VMRs based on atmospheric species and VMRs
Only checks the first species in inner atmosphere
Renormalizes the values to unity. If this renormalization is impossible then it throws an error
[in] | atmospheric_vmrs | VMRS in atmosphere |
[in] | atmospheric_species | Species in atmosphere |
[in] | lineshape_species | Species affecting lineshape |
Definition at line 480 of file lineshapemodel.cc.
References ARTS_ASSERT, and Species::mean_mass().
Referenced by Absorption::Lines::BroadeningSpeciesMass().
Definition at line 555 of file lineshapemodel.cc.
References my_basic_string< charT >::nelem().
Referenced by xml_read_from_stream().
Output to be used by mirroring calls.
Definition at line 543 of file lineshapemodel.h.
References LineShape::Output::G0.
Referenced by LineShape::Calculator::Calculator(), cutoff_frequency_loop(), and frequency_loop().
ArrayOfString LineShape::ModelMetaDataArray | ( | const LineShape::Model & | m, |
const bool | self, | ||
const ArrayOfSpecies & | sts, | ||
const Numeric | T0 | ||
) |
Definition at line 640 of file lineshapemodel.cc.
References LineShape::Model::Data(), modelparameters2metadata(), Array< base >::nelem(), and self_broadening.
Referenced by Absorption::Lines::MetaData().
|
constexprnoexcept |
Definition at line 328 of file lineshapemodel.h.
Referenced by abs_linesEmptyBroadeningParameters(), Absorption::Lines::MakeLineShapeModelCommon(), and LineShape::SingleSpeciesModel::MatchTypes().
|
constexprnoexcept |
Definition at line 356 of file lineshapemodel.h.
|
constexprnoexcept |
Definition at line 300 of file lineshapemodel.h.
Referenced by Absorption::Lines::MakeLineShapeModelCommon().
String LineShape::modelparameters2metadata | ( | const ModelParameters | mp, |
const Numeric | T0 | ||
) |
Definition at line 594 of file lineshapemodel.cc.
References LineShape::ModelParameters::type, LineShape::ModelParameters::X0, LineShape::ModelParameters::X1, LineShape::ModelParameters::X2, and LineShape::ModelParameters::X3.
Referenced by ModelMetaDataArray().
Definition at line 536 of file lineshapemodel.cc.
References LineShape::Model::Data(), and toString().
Referenced by Absorption::Lines::LineShapeMetaData().
Output turned negative.
Definition at line 548 of file lineshapemodel.h.
References LineShape::Output::G0.
std::ostream & LineShape::operator<< | ( | std::ostream & | os, |
const Model & | m | ||
) |
Definition at line 526 of file lineshapemodel.cc.
std::ostream & LineShape::operator<< | ( | std::ostream & | os, |
const ModelParameters & | mp | ||
) |
Definition at line 689 of file lineshapemodel.cc.
std::ostream & LineShape::operator<< | ( | std::ostream & | os, |
const SingleSpeciesModel & | ssm | ||
) |
Definition at line 1039 of file lineshapemodel.cc.
std::ostream & LineShape::operator<< | ( | std::ostream & | os, |
Output | x | ||
) |
Definition at line 1053 of file lineshapemodel.cc.
std::istream & LineShape::operator>> | ( | std::istream & | is, |
Model & | m | ||
) |
Definition at line 531 of file lineshapemodel.cc.
std::istream & LineShape::operator>> | ( | std::istream & | is, |
ModelParameters & | mp | ||
) |
Definition at line 695 of file lineshapemodel.cc.
std::istream & LineShape::operator>> | ( | std::istream & | is, |
SingleSpeciesModel & | ssm | ||
) |
Definition at line 1046 of file lineshapemodel.cc.
SparseLimitRange LineShape::quad_sparse_limited_range | ( | const Numeric | flc, |
const Numeric | fuc, | ||
const Numeric | fls, | ||
const Numeric | fus, | ||
const Vector & | f_grid, | ||
const Vector & | sparse_f_grid | ||
) |
Definition at line 2106 of file lineshape.cc.
References ARTS_ASSERT.
Referenced by cutoff_loop_sparse_triple().
Output turned from SI to CGS units.
Definition at line 553 of file lineshapemodel.h.
References Conversion::freq2kaycm().
Numeric & LineShape::SingleModelParameter | ( | ModelParameters & | mp, |
const String & | type | ||
) |
Get a coefficient from ModelParameters by name.
Will throw a runtime_error if type is bad
[in] | mp | The model parameters |
[in] | type | The coefficient by name |
Definition at line 674 of file lineshapemodel.cc.
References ARTS_USER_ERROR, LineShape::ModelParameters::X0, LineShape::ModelParameters::X1, LineShape::ModelParameters::X2, and LineShape::ModelParameters::X3.
|
noexcept |
Definition at line 3630 of file lineshape.cc.
Referenced by linear_sparse_f_grid(), and triple_sparse_f_grid().
|
noexcept |
Definition at line 3677 of file lineshape.cc.
References sparse_f_grid_red().
Referenced by sparse_f_gridFromFrequencyGrid().
Vector LineShape::vmrs | ( | const ConstVectorView & | atmospheric_vmrs, |
const ArrayOfArrayOfSpeciesTag & | atmospheric_species, | ||
const ArrayOfSpecies & | lineshape_species | ||
) |
Returns a VMR vector for this model's main calculations.
Sets a vector that matches the mdata size of VMRs based on atmospheric species and VMRs
Only checks the first species in inner atmosphere
Renormalizes the values to unity. If this renormalization is impossible then it throws an error
[in] | atmospheric_vmrs | VMRS in atmosphere |
[in] | atmospheric_species | Species in atmosphere |
[in] | lineshape_species | Species affecting lineshape |
Definition at line 438 of file lineshapemodel.cc.
References ARTS_ASSERT.
Referenced by Absorption::Lines::BroadeningSpeciesVMR(), compute(), and line_loop().
|
inlineconstexpr |
Name for bath broadening in printing and reading user input.
Definition at line 617 of file lineshapemodel.h.
Referenced by abs_linesLineShapeModelParametersMatchingLines(), ArtsXMLTag::add_attribute(), from_linefunctiondata(), ArtsXMLTag::get_attribute_value(), and jacobianAddShapeCatalogParameter().
LineShape::char |
Definition at line 137 of file lineshapemodel.h.
LineShape::D0 |
Definition at line 139 of file lineshapemodel.h.
Referenced by LineShape::SingleSpeciesModel::at(), cutoff_frequency_loop(), LineShape::HartmannTran::dFdD0(), LineShape::HartmannTran::dFdD2(), LineShape::HartmannTran::dFdETA(), LineShape::HartmannTran::dFdFVC(), LineShape::HartmannTran::dFdG0(), LineShape::HartmannTran::dFdG2(), LineShape::HartmannTran::dFdH(), LineShape::HartmannTran::dFdT(), LineShape::HartmannTran::dFdVMR(), LineShape::SingleSpeciesModel::dT(), LineShape::SingleSpeciesModel::dT0(), LineShape::SingleSpeciesModel::dX(), frequency_loop(), LineShape::SingleSpeciesModel::Get(), line_loop(), and LineShape::SingleSpeciesModel::Set().
LineShape::D2 |
Definition at line 141 of file lineshapemodel.h.
Referenced by LineShape::SingleSpeciesModel::at(), cutoff_frequency_loop(), LineShape::HartmannTran::dFdD0(), LineShape::HartmannTran::dFdD2(), LineShape::HartmannTran::dFdETA(), LineShape::HartmannTran::dFdFVC(), LineShape::HartmannTran::dFdG0(), LineShape::HartmannTran::dFdG2(), LineShape::HartmannTran::dFdH(), LineShape::HartmannTran::dFdT(), LineShape::HartmannTran::dFdVMR(), LineShape::SingleSpeciesModel::dT(), LineShape::SingleSpeciesModel::dT0(), LineShape::SingleSpeciesModel::dX(), frequency_loop(), LineShape::SingleSpeciesModel::Get(), line_loop(), LineShape::HartmannTran::operator()(), and LineShape::SingleSpeciesModel::Set().
LineShape::ETA |
Definition at line 143 of file lineshapemodel.h.
Referenced by LineShape::SingleSpeciesModel::at(), cutoff_frequency_loop(), LineShape::HartmannTran::dFdD0(), LineShape::HartmannTran::dFdD2(), LineShape::HartmannTran::dFdETA(), LineShape::HartmannTran::dFdFVC(), LineShape::HartmannTran::dFdG0(), LineShape::HartmannTran::dFdG2(), LineShape::HartmannTran::dFdH(), LineShape::HartmannTran::dFdT(), LineShape::HartmannTran::dFdVMR(), LineShape::SingleSpeciesModel::dT(), LineShape::SingleSpeciesModel::dT0(), LineShape::SingleSpeciesModel::dX(), frequency_loop(), LineShape::SingleSpeciesModel::Get(), line_loop(), LineShape::HartmannTran::operator()(), and LineShape::SingleSpeciesModel::Set().
LineShape::FVC |
Definition at line 142 of file lineshapemodel.h.
Referenced by LineShape::SingleSpeciesModel::at(), cutoff_frequency_loop(), LineShape::HartmannTran::dFdD0(), LineShape::HartmannTran::dFdD2(), LineShape::HartmannTran::dFdETA(), LineShape::HartmannTran::dFdFVC(), LineShape::HartmannTran::dFdG0(), LineShape::HartmannTran::dFdG2(), LineShape::HartmannTran::dFdH(), LineShape::HartmannTran::dFdT(), LineShape::HartmannTran::dFdVMR(), LineShape::SingleSpeciesModel::dT(), LineShape::SingleSpeciesModel::dT0(), LineShape::SingleSpeciesModel::dX(), frequency_loop(), LineShape::SingleSpeciesModel::Get(), line_loop(), and LineShape::SingleSpeciesModel::Set().
LineShape::G |
Definition at line 145 of file lineshapemodel.h.
Referenced by LineShape::SingleSpeciesModel::at(), LineShape::SingleSpeciesModel::dT(), LineShape::SingleSpeciesModel::dT0(), LineShape::SingleSpeciesModel::dX(), LineShape::SingleSpeciesModel::Get(), line_loop(), and LineShape::SingleSpeciesModel::Set().
LineShape::G0 |
Definition at line 138 of file lineshapemodel.h.
Referenced by LineShape::SingleSpeciesModel::at(), cutoff_frequency_loop(), LineShape::HartmannTran::dFdD0(), LineShape::HartmannTran::dFdD2(), LineShape::HartmannTran::dFdETA(), LineShape::HartmannTran::dFdFVC(), LineShape::HartmannTran::dFdG0(), LineShape::HartmannTran::dFdG2(), LineShape::HartmannTran::dFdH(), LineShape::HartmannTran::dFdT(), LineShape::HartmannTran::dFdVMR(), LineShape::SingleSpeciesModel::dT(), LineShape::SingleSpeciesModel::dT0(), LineShape::SingleSpeciesModel::dX(), frequency_loop(), LineShape::SingleSpeciesModel::Get(), line_loop(), and LineShape::SingleSpeciesModel::Set().
LineShape::G2 |
Definition at line 140 of file lineshapemodel.h.
Referenced by LineShape::SingleSpeciesModel::at(), cutoff_frequency_loop(), LineShape::HartmannTran::dFdD0(), LineShape::HartmannTran::dFdD2(), LineShape::HartmannTran::dFdETA(), LineShape::HartmannTran::dFdFVC(), LineShape::HartmannTran::dFdG0(), LineShape::HartmannTran::dFdG2(), LineShape::HartmannTran::dFdH(), LineShape::HartmannTran::dFdT(), LineShape::HartmannTran::dFdVMR(), LineShape::SingleSpeciesModel::dT(), LineShape::SingleSpeciesModel::dT0(), LineShape::SingleSpeciesModel::dX(), frequency_loop(), LineShape::SingleSpeciesModel::Get(), line_loop(), LineShape::HartmannTran::operator()(), and LineShape::SingleSpeciesModel::Set().
|
constexpr |
Current max number of line shape variables.
Definition at line 385 of file lineshapemodel.h.
Referenced by abs_linesEmptyBroadeningParameters(), LineShape::SingleSpeciesModel::at(), LineShape::SingleSpeciesModel::dT(), LineShape::SingleSpeciesModel::dT0(), LineShape::SingleSpeciesModel::dX(), Absorption::Lines::MakeLineShapeModelCommon(), LineShape::SingleSpeciesModel::MatchTypes(), and LineShape::Output::operator-=().
|
inlineconstexpr |
Name for self broadening in printing and reading user input.
Definition at line 620 of file lineshapemodel.h.
Referenced by abs_linesLineShapeModelParametersMatchingLines(), ArtsXMLTag::add_attribute(), from_linefunctiondata(), ArtsXMLTag::get_attribute_value(), jacobianAddShapeCatalogParameter(), and ModelMetaDataArray().
LineShape::Y |
Definition at line 144 of file lineshapemodel.h.
Referenced by LineShape::SingleSpeciesModel::at(), LineShape::SingleSpeciesModel::dT(), LineShape::SingleSpeciesModel::dT0(), LineShape::SingleSpeciesModel::dX(), LineShape::SingleSpeciesModel::Get(), line_loop(), and LineShape::SingleSpeciesModel::Set().