ARTS 2.5.11 (git: 725533f0)
lineshapemodel.h File Reference

Contains the line shape namespace. More...

#include "arts_conversions.h"
#include "enums.h"
#include "file.h"
#include "jacobian.h"
#include "species_tags.h"
#include <algorithm>
#include <numeric>
#include <utility>

Go to the source code of this file.


struct  LineShape::ModelParameters
 Coefficients and temperature model for SingleSpeciesModel. More...
struct  LineShape::Output
 Main output of Model. More...
class  LineShape::SingleSpeciesModel
 Compute the line shape parameters for a single broadening species. More...
class  LineShape::Model
 Main line shape model class. More...


namespace  LineShape
 Computations of line shape derived parameters.
namespace  LineShape::LegacyLineFunctionData
 Legacy dealing with reading old LineFunctionData.
namespace  LineShape::LegacyLineMixingData
 Legacy dealing with reading old LineMixingData.
namespace  LineShape::LegacyPressureBroadeningData
 Legacy dealing with reading old PressureBroadeningData.


#define MODELPARAMCASEGETTER(X)   case Variable::X: out = X(); break;


using LineShapeModelParameters = LineShape::ModelParameters
using LineShapeModel = LineShape::Model
using LineShapeSingleSpeciesModel = LineShape::SingleSpeciesModel
using LineShapeType = LineShape::Type
using LineShapeVariable = LineShape::Variable
using LineShapeTemperatureModel = LineShape::TemperatureModel


enum class  LineShape::LegacyLineMixingData::TypeLM {
  LineShape::LegacyLineMixingData::LM_NONE , LineShape::LegacyLineMixingData::LM_LBLRTM , LineShape::LegacyLineMixingData::LM_LBLRTM_O2NonResonant , LineShape::LegacyLineMixingData::LM_1STORDER ,
  LineShape::LegacyLineMixingData::LM_2NDORDER , LineShape::LegacyLineMixingData::LM_BYBAND
 Line mixing types that used to exist. More...
enum class  LineShape::LegacyPressureBroadeningData::TypePB { LineShape::LegacyPressureBroadeningData::PB_NONE , LineShape::LegacyPressureBroadeningData::PB_AIR_BROADENING , LineShape::LegacyPressureBroadeningData::PB_AIR_AND_WATER_BROADENING , LineShape::LegacyPressureBroadeningData::PB_PLANETARY_BROADENING }
 Pressure broadening types that used to exist. More...


Jacobian::Line select_derivativeLineShape (const String &var, const String &coeff)
 Return the derivative type based on string input.
 LineShape::ENUMCLASS (Type, char, DP, LP, VP, SDVP, HTP, SplitLP, SplitVP, SplitSDVP, SplitHTP) const expr std
 Type of line shape to compute.
 LineShape::ENUMCLASS (TemperatureModel, char, None, T0, T1, T2, T3, T4, T5, LM_AER, DPL, POLY) ENUMCLASS(Variable
 Temperature models.
String LineShape::modelparameters2metadata (const ModelParameters mp, const Numeric T0)
Numeric & LineShape::SingleModelParameter (ModelParameters &mp, const String &type)
 Get a coefficient from ModelParameters by name.
constexpr ModelParameters LineShape::modelparameterGetEmpty (const TemperatureModel t) noexcept
constexpr bool LineShape::modelparameterEmpty (const ModelParameters mp) noexcept
constexpr Numeric LineShape::modelparameterFirstExponent (const ModelParameters mp) noexcept
constexpr Output LineShape::mirroredOutput (Output x) noexcept
 Output to be used by mirroring calls.
constexpr Output LineShape::negativeOutput (Output x) noexcept
 Output turned negative.
constexpr Output LineShape::si2cgs (Output x) noexcept
 Output turned from SI to CGS units.
constexpr Output LineShape::differenceOutput (Output y, Output x) noexcept
 Diff of two output.
Vector LineShape::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 LineShape::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.
Model LineShape::hitran_model (Numeric sgam, Numeric nself, Numeric agam, Numeric nair, Numeric psf)
Model LineShape::lblrtm_model (Numeric sgam, Numeric nself, Numeric agam, Numeric nair, Numeric psf, std::array< Numeric, 12 > aer_interp)
String LineShape::ModelShape2MetaData (const Model &m)
Model LineShape::MetaData2ModelShape (const String &s)
ArrayOfString LineShape::ModelMetaDataArray (const LineShape::Model &m, const bool self, const ArrayOfSpecies &sts, const Numeric T0)
std::istream & LineShape::from_artscat4 (std::istream &is, Type &type, bool &self, bool &bath, Model &m, ArrayOfSpecies &species, const QuantumIdentifier &qid)
std::istream & LineShape::from_linefunctiondata (std::istream &data, Type &type, bool &self, bool &bath, Model &m, ArrayOfSpecies &species)
std::istream & LineShape::from_linemixingdata (std::istream &data, Model &lsc)
 Legacy reading of old deprecated LineMixingData class.
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.
constexpr Index LineShape::LegacyLineFunctionData::temperaturemodel2legacynelem (TemperatureModel type) noexcept
 Length per variable for temperature model.
std::vector< Variable > LineShape::LegacyLineFunctionData::lineshapetag2variablesvector (String type)
 Line shape models from string.
std::vector< Variable > LineShape::LegacyLineFunctionData::linemixingtag2variablesvector (String type)
 Line mixing models from string.
LegacyLineMixingData::TypeLM LineShape::LegacyLineMixingData::string2typelm (String type)
 Line mixing types from string.
constexpr Index LineShape::LegacyLineMixingData::typelm2nelem (LegacyLineMixingData::TypeLM type)
 Line mixing types to number.
Model LineShape::LegacyLineMixingData::vector2modellm (Vector x, LegacyLineMixingData::TypeLM type)
 LineShape::Model from legacy input vector.
LegacyPressureBroadeningData::TypePB LineShape::LegacyPressureBroadeningData::string2typepb (String type)
 Pressure broadening types from string.
Index LineShape::LegacyPressureBroadeningData::self_listed (const QuantumIdentifier &qid, LegacyPressureBroadeningData::TypePB t)
 Pressure broadening if self exist.
constexpr Index LineShape::LegacyPressureBroadeningData::typepb2nelem (LegacyPressureBroadeningData::TypePB type)
 Pressure broadening types to number of elements.
void LineShape::LegacyPressureBroadeningData::vector2modelpb (LineShape::Type &mtype, bool &self, bool &bath, Model &m, ArrayOfSpecies &species, Vector x, LegacyPressureBroadeningData::TypePB type, bool self_in_list, Species::Species self_spec)
 LineShape::Model from legacy input vector.


constexpr Index LineShape::nVars = Index(Variable::FINAL)
 Current max number of line shape variables.
constexpr std::string_view LineShape::bath_broadening = "AIR"
 Name for bath broadening in printing and reading user input.
constexpr std::string_view LineShape::self_broadening = "SELF"
 Name for self broadening in printing and reading user input.

Detailed Description

Contains the line shape namespace.

Richard Larsson

Contains the line shape namespace

This namespace computes all line shape parameters for any set of line shape we can use in ARTS. Should be extended for more use as seen fit.

Definition in file lineshapemodel.h.

Macro Definition Documentation


constexpr ModelParameters& VARPOS() noexcept { return std::get<Index(Variable::VARPOS)>(X); } \
constexpr ModelParameters VARPOS() const noexcept { return std::get<Index(Variable::VARPOS)>(X); }

Definition at line 451 of file lineshapemodel.h.


#define MODELPARAMCASEGETTER (   X)    case Variable::X: out = X(); break;


case Variable::X: \
X() = x; \

Typedef Documentation

◆ LineShapeModel

Definition at line 979 of file lineshapemodel.h.

◆ LineShapeModelParameters

◆ LineShapeSingleSpeciesModel

◆ LineShapeTemperatureModel

using LineShapeTemperatureModel = LineShape::TemperatureModel

Definition at line 984 of file lineshapemodel.h.

◆ LineShapeType

using LineShapeType = LineShape::Type

Definition at line 982 of file lineshapemodel.h.

◆ LineShapeVariable

using LineShapeVariable = LineShape::Variable

Definition at line 983 of file lineshapemodel.h.

Function Documentation

◆ select_derivativeLineShape()

Jacobian::Line select_derivativeLineShape ( const String var,
const String coeff 

Return the derivative type based on string input.

[in]varVariable good with LineShape::toVariable()
[in]coeffCoefficient good with Options::toLineShapeCoeff()
Derivative type

Definition at line 21 of file

References ReturnJacPropMatType.

Referenced by jacobianAddShapeCatalogParameter().