ARTS 2.5.4 (git: 31ce4f0e)
LineShape Namespace Reference

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  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. More...
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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)
 
NumericSingleModelParameter (ModelParameters &mp, const String &type)
 Get a coefficient from ModelParameters by name. More...
 
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 (TemperatureModel, char, None, T0, T1, T2, T3, T4, T5, LM_AER, DPL, POLY) ENUMCLASS(Variable
 Temperature models. More...
 
constexpr ModelParameters modelparameterGetEmpty (const TemperatureModel t) noexcept
 
constexpr bool modelparameterEmpty (const ModelParameters mp) noexcept
 
constexpr Numeric modelparameterFirstExponent (const ModelParameters mp) noexcept
 
ENUMCLASS(Type, char, DP, LP, VP, SDVP, HTP) const expr std constexpr Output mirroredOutput (Output x) noexcept
 Type of line shape to compute. More...
 
constexpr Output negativeOutput (Output x) noexcept
 Output turned negative. More...
 
constexpr Output si2cgs (Output x) noexcept
 Output turned from SI to CGS units. More...
 
constexpr Output differenceOutput (Output y, Output x) noexcept
 Diff of two output. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Variables

 char
 
 G0
 
 D0
 
 G2
 
 D2
 
 FVC
 
 ETA
 
 Y
 
 G
 
constexpr Index nVars = Index(Variable::FINAL)
 Current max number of line shape variables. More...
 

Detailed Description

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

Typedef Documentation

◆ ArrayOfDerivatives

Helper to keep function signature clean.

Definition at line 2342 of file lineshape.cc.

Function Documentation

◆ abs_squared()

constexpr Numeric LineShape::abs_squared ( Complex  z)
constexprnoexcept

◆ active_nelem()

Index LineShape::active_nelem ( const ArrayOfDerivatives derivs)
noexcept

Helper function to find the last relevant derivative.

Definition at line 2345 of file lineshape.cc.

◆ compute()

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.

Parameters
[in,out]comMain computations variable. Should be initialized and may have been used before.
[in,out]sparse_comSparse computations variable. Should be initialized and may have been used before.
[in]bandThe absorption band
[in]jacobian_quantitiesAs WSV
[in]rtp_nlteAs WSV
[in]vmrsThe volume mixing ratios of the band's line shape model
[in]self_tagThe species tag from abs_species this band belongs to (only used for derivatives)
[in]self_vmrThe volume mixing of the band's species.
[in]isot_ratioThe sotopologue ratio of the band's species
[in]rtp_pressureAs WSV
[in]rtp_temperatureAs WSV
[in]HThe magnetic field strength in Teslas
[in]sparse_limThe frequency separating the sparse and dense frequency grid calculations
[in]zeeman_polarizationType of Zeeman polarization
[in]speedup_typeType of sparse grid interactions
[in]robustIf 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 3534 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(), test_ls(), test_sparse(), and zeeman_on_the_fly().

◆ cutoff_frequency_loop()

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.

Parameters
[in]jacobian_quantitiesAs WSV
[in]TThe atmospheric temperature
[in]do_nlteFlag for whether or not NLTE will be computed
[in]LMThe line mixing scaling. \( S_{lm} \)
[in]ls_strThe line strength calculator. \( S_i \)
[in,out]ls_normThe normalization calculator. \( S_n \)
[in]derivsA list of pre-computed derivative values and keys
[in,out]FThe cross-section. \( F \)
[in,out]dFThe cross-section's derivatives. \( \partial F / \partial x \)
[in,out]NThe cross-section ratio of the NLTE source. \( N \)
[in,out]dNThe cross-section ratio of the NLTE source's derivatives. \( \partial N / \partial x \)
[in]f_gridThe frequency grid. \( \left[ f_0, \cdots, f_n \right] \)
[in]dfdHThe derivative of the change of frequency w.r.t. magnetic field strength
[in]SzThe relative Zeeman strength. \( S_z \)
[in]lsThe line shape calculator. \( F_i \)
[in]ls_mirrThe mirrored line shape calculator. \( F^M_i \)

Definition at line 2765 of file lineshape.cc.

References Jacobian::ArrayOfSpeciesTagVMR, conj(), CutInternalDerivatives, d, D0, D2, ETA, FVC, G0, G2, InternalDerivativesG, InternalDerivativesY, mirroredOutput(), and Jacobian::Temperature.

Referenced by cutoff_loop(), cutoff_loop_sparse_linear(), and cutoff_loop_sparse_triple().

◆ cutoff_loop()

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.

Parameters
[in,out]FThe cross-section. \( F \)
[in,out]dFThe cross-section's derivatives. \( \partial F / \partial x \)
[in,out]NThe cross-section ratio of the NLTE source. \( N \)
[in,out]dNThe cross-section ratio of the NLTE source's derivatives. \( \partial N / \partial x \)
[in]f_gridThe frequency grid. \( \left[ f_0, \cdots, f_n \right] \)
[in]bandThe absorption band
[in]jacobian_quantitiesAs WSV
[in]TThe atmospheric temperature
[in]do_nlteFlag for whether or not NLTE will be computed
[in]HThe magnetic field magnitude
[in]do_zeemanFlag for whether this is part of some Zeeman calculations
[in]zeeman_polarizationThe type of Zeeman polarization to consider (if any)
[in]f_meanThe mean frequency of the absorption band
[in]DCThe Doppler broadening constant of the band
[in]iThe line index
[in]XThe line shape model parameters of the atmosphere
[in]LMThe line mixing scaling. \( S_{lm} \)
[in]ls_strThe line strength calculator. \( S_i \)
[in]ls_normThe normalization calculator. \( S_n \)
[in]derivsA list of pre-computed derivative values and keys

Definition at line 3356 of file lineshape.cc.

References cutoff_frequency_loop(), frequency_loop(), and limited_range().

Referenced by line_loop().

◆ cutoff_loop_sparse_linear()

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.

Parameters
[in,out]FThe cross-section. \( F \)
[in,out]dFThe cross-section's derivatives. \( \partial F / \partial x \)
[in,out]NThe cross-section ratio of the NLTE source. \( N \)
[in,out]dNThe cross-section ratio of the NLTE source's derivatives. \( \partial N / \partial x \)
[in]f_gridThe frequency grid. \( \left[ f_0, \cdots, f_n \right] \)
[in]bandThe absorption band
[in]jacobian_quantitiesAs WSV
[in]TThe atmospheric temperature
[in]do_nlteFlag for whether or not NLTE will be computed
[in]HThe magnetic field magnitude
[in]do_zeemanFlag for whether this is part of some Zeeman calculations
[in]zeeman_polarizationThe type of Zeeman polarization to consider (if any)
[in]f_meanThe mean frequency of the absorption band
[in]DCThe Doppler broadening constant of the band
[in]iThe line index
[in]XThe line shape model parameters of the atmosphere
[in]LMThe line mixing scaling. \( S_{lm} \)
[in]ls_strThe line strength calculator. \( S_i \)
[in]ls_normThe normalization calculator. \( S_n \)
[in]derivsA list of pre-computed derivative values and keys

Definition at line 3156 of file lineshape.cc.

References cutoff_frequency_loop(), frequency_loop(), and linear_sparse_limited_range().

Referenced by line_loop().

◆ cutoff_loop_sparse_triple()

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 3237 of file lineshape.cc.

References cutoff_frequency_loop(), frequency_loop(), and quad_sparse_limited_range().

Referenced by line_loop().

◆ differenceOutput()

constexpr Output LineShape::differenceOutput ( Output  y,
Output  x 
)
constexprnoexcept

Diff of two output.

Definition at line 530 of file lineshapemodel.h.

◆ ENUMCLASS()

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()

◆ frequency_loop()

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.

Parameters
[in]jacobian_quantitiesAs WSV
[in]TThe atmospheric temperature
[in]do_nlteFlag for whether or not NLTE will be computed
[in]LMThe line mixing scaling. \( S_{lm} \)
[in]ls_strThe line strength calculator. \( S_i \)
[in,out]ls_normThe normalization calculator. \( S_n \)
[in]derivsA list of pre-computed derivative values and keys
[in,out]FThe cross-section. \( F \)
[in,out]dFThe cross-section's derivatives. \( \partial F / \partial x \)
[in,out]NThe cross-section ratio of the NLTE source. \( N \)
[in,out]dNThe cross-section ratio of the NLTE source's derivatives. \( \partial N / \partial x \)
[in]f_gridThe frequency grid. \( \left[ f_0, \cdots, f_n \right] \)
[in]dfdHThe derivative of the change of frequency w.r.t. magnetic field strength
[in]SzThe relative Zeeman strength. \( S_z \)
[in]lsThe line shape calculator. \( F_i \)
[in]ls_mirrThe mirrored line shape calculator. \( F^M_i \)

Definition at line 2973 of file lineshape.cc.

References Jacobian::ArrayOfSpeciesTagVMR, conj(), d, D0, D2, ETA, FVC, G0, G2, InternalDerivatives, InternalDerivativesG, InternalDerivativesY, mirroredOutput(), and Jacobian::Temperature.

Referenced by cutoff_loop(), cutoff_loop_sparse_linear(), and cutoff_loop_sparse_triple().

◆ from_artscat4()

std::istream & LineShape::from_artscat4 ( std::istream &  is,
Type &  type,
bool &  self,
bool &  bath,
Model m,
ArrayOfSpecies species,
const QuantumIdentifier qid 
)

◆ from_linefunctiondata()

std::istream & LineShape::from_linefunctiondata ( std::istream &  data,
Type &  type,
bool &  self,
bool &  bath,
Model m,
ArrayOfSpecies species 
)

◆ from_linemixingdata()

std::istream & LineShape::from_linemixingdata ( std::istream &  data,
LineShape::Model lsc 
)

◆ from_pressurebroadeningdata()

std::istream & LineShape::from_pressurebroadeningdata ( std::istream &  data,
LineShape::Type &  type,
bool &  self,
bool &  bath,
Model m,
ArrayOfSpecies species,
const QuantumIdentifier qid 
)

◆ good_linear_sparse_f_grid()

bool LineShape::good_linear_sparse_f_grid ( const Vector f_grid_dense,
const Vector f_grid_sparse 
)
noexcept

Definition at line 3637 of file lineshape.cc.

Referenced by sparse_f_gridFromFrequencyGrid().

◆ hitran_model()

◆ lblrtm_model()

Model LineShape::lblrtm_model ( Numeric  sgam,
Numeric  nself,
Numeric  agam,
Numeric  nair,
Numeric  psf,
std::array< Numeric, 12 >  aer_interp 
)

Definition at line 1030 of file lineshapemodel.cc.

References LineShape::Model::Data().

Referenced by Absorption::ReadFromLBLRTMStream().

◆ limited_range()

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

Parameters
[in]flLower frequency limit
[in]fuUpper frequency limit
[in]f_gridAs WSV, must be sorted
Returns
out so that the Range above can be formed

Definition at line 2174 of file lineshape.cc.

References ARTS_ASSERT.

Referenced by cutoff_loop().

◆ line_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.

Parameters
[in,out]FThe cross-section. \( F \)
[in,out]dFThe cross-section's derivatives. \( \partial F / \partial x \)
[in,out]NThe cross-section ratio of the NLTE source. \( N \)
[in,out]dNThe cross-section ratio of the NLTE source's derivatives. \( \partial N / \partial x \)
[in]f_gridThe frequency grid. \( \left[ f_0, \cdots, f_n \right] \)
[in]bandThe absorption band
[in]jacobian_quantitiesAs WSV
[in]nlteA map of NLTE data
[in]vmrsThe band volume mixing ratio
[in]isot_ratioThe isotopic ratio of the isotopologue
[in]PThe atmospheric pressure
[in]TThe atmospheric temperature
[in]do_nlteFlag for whether or not NLTE will be computed
[in]HThe magnetic field magnitude
[in]do_zeemanFlag for whether this is part of some Zeeman calculations
[in]zeeman_polarizationThe type of Zeeman polarization to consider (if any)
[in]f_meanThe mean frequency of the absorption band
[in]QTThe partition function at the temperature
[in]QT0The partition function at the reference temperature
[in]dQTdTThe derivative of the partition function at the temperature wrt temperature

Definition at line 3436 of file lineshape.cc.

References Jacobian::ArrayOfSpeciesTagVMR, cutoff_loop(), cutoff_loop_sparse_linear(), cutoff_loop_sparse_triple(), D0, D2, ETA, FVC, G, G0, G2, InternalDerivativesSetup, Jacobian::Temperature, vmrs(), and Y.

Referenced by compute().

◆ linear_sparse_f_grid()

Vector LineShape::linear_sparse_f_grid ( const Vector f_grid,
const Numeric sparse_df 
)

Definition at line 3614 of file lineshape.cc.

References sparse_f_grid_red().

Referenced by sparse_f_gridFromFrequencyGrid(), and test_sparse().

◆ linear_sparse_limited_range()

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 2192 of file lineshape.cc.

References ARTS_ASSERT.

Referenced by cutoff_loop_sparse_linear().

◆ mass()

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

Parameters
[in]atmospheric_vmrsVMRS in atmosphere
[in]atmospheric_speciesSpecies in atmosphere
[in]lineshape_speciesSpecies affecting lineshape

Definition at line 498 of file lineshapemodel.cc.

References ARTS_ASSERT, Species::mean_mass(), and ConstVectorView::sum().

Referenced by Absorption::Lines::BroadeningSpeciesMass(), derive_scat_species_a_and_b(), Species::mean_mass(), particle_massesFromMetaData(), particle_massesFromMetaDataSingleCategory(), psd_SB06(), scat_data_singleTmatrix(), and ScatSpeciesSizeMassInfo().

◆ MetaData2ModelShape()

Model LineShape::MetaData2ModelShape ( const String s)

Definition at line 573 of file lineshapemodel.cc.

References ETA, my_basic_string< charT >::nelem(), and Raw::Average::var().

Referenced by main().

◆ mirroredOutput()

ENUMCLASS(Type, char, DP, LP, VP, SDVP, HTP) const expr std constexpr Output LineShape::mirroredOutput ( Output  x)
constexprnoexcept

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

Parameters
[in]typeThe Type
Returns
std::string_view of Type Main output of Model Output to be used by mirroring calls

Definition at line 506 of file lineshapemodel.h.

Referenced by LineShape::Calculator::Calculator(), cutoff_frequency_loop(), and frequency_loop().

◆ ModelMetaDataArray()

ArrayOfString LineShape::ModelMetaDataArray ( const LineShape::Model m,
const bool  self,
const ArrayOfSpecies sts,
const Numeric  T0 
)

Definition at line 658 of file lineshapemodel.cc.

◆ modelparameterEmpty()

constexpr bool LineShape::modelparameterEmpty ( const ModelParameters  mp)
constexprnoexcept

◆ modelparameterFirstExponent()

constexpr Numeric LineShape::modelparameterFirstExponent ( const ModelParameters  mp)
constexprnoexcept

Definition at line 310 of file lineshapemodel.h.

◆ modelparameterGetEmpty()

constexpr ModelParameters LineShape::modelparameterGetEmpty ( const TemperatureModel  t)
constexprnoexcept

Definition at line 254 of file lineshapemodel.h.

Referenced by Absorption::Lines::MakeLineShapeModelCommon().

◆ modelparameters2metadata()

String LineShape::modelparameters2metadata ( const ModelParameters  mp,
const Numeric  T0 
)

Definition at line 612 of file lineshapemodel.cc.

◆ ModelShape2MetaData()

String LineShape::ModelShape2MetaData ( const Model m)

◆ negativeOutput()

constexpr Output LineShape::negativeOutput ( Output  x)
constexprnoexcept

Output turned negative.

Definition at line 511 of file lineshapemodel.h.

◆ operator<<() [1/4]

std::ostream & LineShape::operator<< ( std::ostream &  os,
const Model m 
)

Definition at line 544 of file lineshapemodel.cc.

◆ operator<<() [2/4]

std::ostream & LineShape::operator<< ( std::ostream &  os,
const ModelParameters mp 
)

Definition at line 707 of file lineshapemodel.cc.

◆ operator<<() [3/4]

std::ostream & LineShape::operator<< ( std::ostream &  os,
const SingleSpeciesModel ssm 
)

Definition at line 957 of file lineshapemodel.cc.

◆ operator<<() [4/4]

std::ostream & LineShape::operator<< ( std::ostream &  os,
Output  x 
)

Definition at line 971 of file lineshapemodel.cc.

◆ operator>>() [1/3]

std::istream & LineShape::operator>> ( std::istream &  is,
Model m 
)

Definition at line 549 of file lineshapemodel.cc.

◆ operator>>() [2/3]

std::istream & LineShape::operator>> ( std::istream &  is,
ModelParameters mp 
)

Definition at line 713 of file lineshapemodel.cc.

◆ operator>>() [3/3]

std::istream & LineShape::operator>> ( std::istream &  is,
SingleSpeciesModel ssm 
)

Definition at line 964 of file lineshapemodel.cc.

◆ quad_sparse_limited_range()

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 2250 of file lineshape.cc.

References ARTS_ASSERT.

Referenced by cutoff_loop_sparse_triple().

◆ si2cgs()

constexpr Output LineShape::si2cgs ( Output  x)
constexprnoexcept

Output turned from SI to CGS units.

Definition at line 516 of file lineshapemodel.h.

References Conversion::freq2kaycm().

◆ SingleModelParameter()

Numeric & LineShape::SingleModelParameter ( ModelParameters mp,
const String type 
)

Get a coefficient from ModelParameters by name.

Will throw a runtime_error if type is bad

Parameters
[in]mpThe model parameters
[in]typeThe coefficient by name
Returns
a reference to the coefficient

Definition at line 692 of file lineshapemodel.cc.

References ARTS_USER_ERROR, LineShape::ModelParameters::X0, LineShape::ModelParameters::X1, LineShape::ModelParameters::X2, and LineShape::ModelParameters::X3.

◆ sparse_f_grid_red()

Index LineShape::sparse_f_grid_red ( const Vector f_grid,
const Numeric sparse_df 
)
noexcept

Definition at line 3605 of file lineshape.cc.

References abs.

Referenced by linear_sparse_f_grid(), and triple_sparse_f_grid().

◆ triple_sparse_f_grid()

Vector LineShape::triple_sparse_f_grid ( const Vector f_grid,
const Numeric sparse_df 
)
noexcept

Definition at line 3651 of file lineshape.cc.

References sparse_f_grid_red().

Referenced by sparse_f_gridFromFrequencyGrid(), and test_sparse().

◆ vmrs()

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

Parameters
[in]atmospheric_vmrsVMRS in atmosphere
[in]atmospheric_speciesSpecies in atmosphere
[in]lineshape_speciesSpecies affecting lineshape

Definition at line 456 of file lineshapemodel.cc.

References ARTS_ASSERT, and ConstVectorView::sum().

Referenced by atm_fields_compactAddConstant(), Absorption::Lines::BroadeningSpeciesVMR(), lm_hitran_2017::compabs(), compute(), lm_hitran_2017::compute(), lm_hitran_2017::convtp(), Absorption::LineMixing::ecs_absorption(), Absorption::LineMixing::ecs_absorption_impl(), ecs_dataAddMeanAir(), Absorption::LineMixing::ecs_relaxation_matrix(), line_irradianceCalcForSingleSpeciesNonOverlappingLinesPseudo2D(), line_loop(), propmat_clearskyAddHitranLineMixingLines(), and test_hitran2017().

Variable Documentation

◆ char

LineShape::char

Definition at line 91 of file lineshapemodel.h.

◆ D0

◆ D2

◆ ETA

◆ FVC

◆ G

◆ G0

◆ G2

◆ nVars

constexpr Index LineShape::nVars = Index(Variable::FINAL)
constexpr

Current max number of line shape variables.

Definition at line 339 of file lineshapemodel.h.

Referenced by abs_linesEmptyBroadeningParameters(), Absorption::Lines::MakeLineShapeModelCommon(), and LineShape::SingleSpeciesModel::MatchTypes().

◆ Y