ARTS 2.5.0 (git: 9ee3ac6c)
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
 
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
 
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 bool do_zeeman, 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 bool do_zeeman, 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 bool do_zeeman, 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 bool do_zeeman, 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 &nlte, const Vector &vmrs, const ArrayOfSpeciesTag &self_tag, const Numeric &self_vmr, const Numeric &isot_ratio, const Numeric &P, const Numeric &T, const Numeric &H, const Numeric &sparse_lim, const bool do_zeeman, const Zeeman::Polarization zeeman_polarization, const Options::LblSpeedup speedup_type) ARTS_NOEXCEPT
 Compute the line shape in its entirety. 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
 
NumericSingleModelParameter (ModelParameters &mp, const String &type)
 Get a coefficient from ModelParameters by name. More...
 
std::ostream & operator<< (std::ostream &os, const ModelParameters &mp)
 Output operator for ModelParameters. More...
 
std::istream & operator>> (std::istream &is, ModelParameters &mp)
 Input operator for ModelParameters. More...
 
std::ostream & operator<< (std::ostream &os, const SingleSpeciesModel &ssm)
 Output operator for SingleSpeciesModel. More...
 
std::istream & operator>> (std::istream &is, SingleSpeciesModel &ssm)
 Input operator for SingleSpeciesModel. More...
 
std::ostream & operator<< (std::ostream &os, Output x)
 Type of line shape to compute. More...
 
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...
 
String modelparameters2metadata (const ModelParameters mp, const Numeric T0)
 
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. 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::ostream & operator<< (std::ostream &, const Model &)
 
std::istream & operator>> (std::istream &, Model &)
 
String ModelShape2MetaData (const Model &m)
 
Model MetaData2ModelShape (const String &s)
 
ArrayOfString ModelMetaDataArray (const Model &m, const bool self, const ArrayOfSpecies &sts, const Numeric T0)
 
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 2187 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 2190 of file lineshape.cc.

◆ compute()

void LineShape::compute ( ComputeData com,
ComputeData sparse_com,
const AbsorptionLines band,
const ArrayOfRetrievalQuantity jacobian_quantities,
const EnergyLevelMap nlte,
const Vector vmrs,
const ArrayOfSpeciesTag self_tag,
const Numeric self_vmr,
const Numeric isot_ratio,
const Numeric P,
const Numeric T,
const Numeric H,
const Numeric sparse_lim,
const bool  do_zeeman,
const Zeeman::Polarization  zeeman_polarization,
const Options::LblSpeedup  speedup_type 
)

Compute the line shape in its entirety.

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.

Definition at line 3116 of file lineshape.cc.

References ARTS_ASSERT, dnumber_density_dt(), dsingle_partition_function_dT(), line_loop(), number_density(), Absorption::relaxationtype_relmat(), single_partition_function(), and vmrs().

Referenced by abs_xsec_per_speciesAddLines(), 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 2321 of file lineshape.cc.

References 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 bool  do_zeeman,
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 2914 of file lineshape.cc.

References cutoff_frequency_loop(), frequency_loop(), limited_range(), and Options::None.

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 bool  do_zeeman,
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 2712 of file lineshape.cc.

References cutoff_frequency_loop(), frequency_loop(), linear_sparse_limited_range(), and Options::None.

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 bool  do_zeeman,
const Zeeman::Polarization  zeeman_polarization 
)

◆ differenceOutput()

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

Diff of two output.

Definition at line 506 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 2529 of file lineshape.cc.

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

Definition at line 82 of file lineshapemodel.cc.

References LineShape::Model::mdata, and v.

Referenced by Absorption::ReadFromArtscat4Stream().

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

Referenced by sparse_f_gridFromFrequencyGrid().

◆ hitran_model()

Model LineShape::hitran_model ( Numeric  sgam,
Numeric  nself,
Numeric  agam,
Numeric  nair,
Numeric  psf 
)

Definition at line 1014 of file lineshapemodel.cc.

References LineShape::Model::Data().

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

◆ 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 2039 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 bool  do_zeeman,
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 2995 of file lineshape.cc.

References cutoff_loop(), cutoff_loop_sparse_linear(), cutoff_loop_sparse_triple(), D0, D2, ETA, FVC, G, G0, G2, InternalDerivativesSetup, Options::None, Options::QuadraticIndependent, 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 3174 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 2054 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 499 of file lineshapemodel.cc.

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

Referenced by Absorption::Lines::BroadeningSpeciesMass(), derive_scat_species_a_and_b(), getMassSpeciesIsotopeRecord(), Absorption::PredefinedModel::makarov2020_o2_lines_mpm(), Species::mean_mass(), particle_massesFromMetaData(), particle_massesFromMetaDataSingleCategory(), and ScatSpeciesSizeMassInfo().

◆ MetaData2ModelShape()

LineShape::Model LineShape::MetaData2ModelShape ( const String s)

Definition at line 581 of file lineshapemodel.cc.

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

Referenced by main().

◆ mirroredOutput()

constexpr Output LineShape::mirroredOutput ( Output  x)
constexprnoexcept

Output to be used by mirroring calls.

Definition at line 482 of file lineshapemodel.h.

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

◆ ModelMetaDataArray()

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

Definition at line 662 of file lineshapemodel.cc.

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

◆ modelparameterEmpty()

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

Definition at line 249 of file lineshapemodel.h.

References Options::None.

Referenced by abs_linesSetEmptyBroadeningParametersToEmpty().

◆ modelparameterFirstExponent()

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

Definition at line 277 of file lineshapemodel.h.

References Options::None.

◆ modelparameters2metadata()

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

Definition at line 623 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 487 of file lineshapemodel.h.

◆ operator<<() [1/4]

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

Definition at line 545 of file lineshapemodel.cc.

References data, and LineShape::Model::Data().

◆ operator<<() [2/4]

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

◆ operator<<() [3/4]

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

Output operator for SingleSpeciesModel.

Definition at line 957 of file lineshapemodel.cc.

References LineShape::SingleSpeciesModel::Data(), and Options::None.

◆ operator<<() [4/4]

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

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 operator for LineShape::Output

Definition at line 971 of file lineshapemodel.cc.

◆ operator>>() [1/3]

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

Definition at line 552 of file lineshapemodel.cc.

References data, and LineShape::Model::Data().

◆ operator>>() [2/3]

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

◆ operator>>() [3/3]

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

Input operator for SingleSpeciesModel.

Definition at line 964 of file lineshapemodel.cc.

References LineShape::SingleSpeciesModel::Data(), and Options::None.

◆ 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 2103 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 492 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 697 of file lineshapemodel.cc.

References ARTS_USER_ERROR, Hitran::type, 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 3168 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 3209 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

Returns 0s if type is Doppler line shape

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(), Absorption::LineMixing::ecs_absorption_zeeman(), Absorption::LineMixing::ecs_absorption_zeeman_impl(), ecs_dataSetMeanAir(), Absorption::LineMixing::ecs_relaxation_matrix(), 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 312 of file lineshapemodel.h.

Referenced by abs_linesSetEmptyBroadeningParametersToEmpty().

◆ Y