ARTS 2.5.4 (git: 31ce4f0e)
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.

Classes

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

Namespaces

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.
 

Macros

#define ACCESS_INTERNAL(VARPOS)
 
#define MODELPARAMCASESETTER(X)
 
#define MODELPARAMCASEGETTER(X)   case Variable::X: out = X(); break;
 
#define LSPC(XVAR, PVAR)
 
#define LSPCV(XVAR, PVAR)
 
#define LSPCT(XVAR, PVAR)
 
#define LSPDC(XVAR, DERIV, PVAR)
 

Typedefs

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

Enumerations

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

Functions

Jacobian::Line select_derivativeLineShape (const String &var, const String &coeff)
 Return the derivative type based on string input. More...
 
 LineShape::ENUMCLASS (TemperatureModel, char, None, T0, T1, T2, T3, T4, T5, LM_AER, DPL, POLY) ENUMCLASS(Variable
 Temperature models. More...
 
String LineShape::modelparameters2metadata (const ModelParameters mp, const Numeric T0)
 
NumericLineShape::SingleModelParameter (ModelParameters &mp, const String &type)
 Get a coefficient from ModelParameters by name. More...
 
constexpr ModelParameters LineShape::modelparameterGetEmpty (const TemperatureModel t) noexcept
 
constexpr bool LineShape::modelparameterEmpty (const ModelParameters mp) noexcept
 
constexpr Numeric LineShape::modelparameterFirstExponent (const ModelParameters mp) noexcept
 
ENUMCLASS(Type, char, DP, LP, VP, SDVP, HTP) const expr std constexpr Output LineShape::mirroredOutput (Output x) noexcept
 Type of line shape to compute. More...
 
constexpr Output LineShape::negativeOutput (Output x) noexcept
 Output turned negative. More...
 
constexpr Output LineShape::si2cgs (Output x) noexcept
 Output turned from SI to CGS units. More...
 
constexpr Output LineShape::differenceOutput (Output y, Output x) noexcept
 Diff of two output. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
constexpr Index LineShape::LegacyLineFunctionData::temperaturemodel2legacynelem (TemperatureModel type) noexcept
 Length per variable for temperature model. More...
 
std::vector< Variable > LineShape::LegacyLineFunctionData::lineshapetag2variablesvector (String type)
 Line shape models from string. More...
 
std::vector< Variable > LineShape::LegacyLineFunctionData::linemixingtag2variablesvector (String type)
 Line mixing models from string. More...
 
LegacyLineMixingData::TypeLM LineShape::LegacyLineMixingData::string2typelm (String type)
 Line mixing types from string. More...
 
constexpr Index LineShape::LegacyLineMixingData::typelm2nelem (LegacyLineMixingData::TypeLM type)
 Line mixing types to number. More...
 
Model LineShape::LegacyLineMixingData::vector2modellm (Vector x, LegacyLineMixingData::TypeLM type)
 LineShape::Model from legacy input vector. More...
 
LegacyPressureBroadeningData::TypePB LineShape::LegacyPressureBroadeningData::string2typepb (String type)
 Pressure broadening types from string. More...
 
Index LineShape::LegacyPressureBroadeningData::self_listed (const QuantumIdentifier &qid, LegacyPressureBroadeningData::TypePB t)
 Pressure broadening if self exist. More...
 
constexpr Index LineShape::LegacyPressureBroadeningData::typepb2nelem (LegacyPressureBroadeningData::TypePB type)
 Pressure broadening types to number of elements. More...
 
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. More...
 

Variables

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

Detailed Description

Contains the line shape namespace.

Author
Richard Larsson
Date
2018-09-19

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

◆ ACCESS_INTERNAL

#define ACCESS_INTERNAL (   VARPOS)
Value:
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 360 of file lineshapemodel.h.

◆ LSPC

#define LSPC (   XVAR,
  PVAR 
)
Value:
Numeric XVAR( \
Numeric T, Numeric T0, Numeric P [[maybe_unused]], const ConstVectorView& vmrs) \
const noexcept;
A constant view of a Vector.
Definition: matpackI.h:512
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
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.

Definition at line 638 of file lineshapemodel.h.

◆ LSPCT

#define LSPCT (   XVAR,
  PVAR 
)
Value:
Numeric d##XVAR##_dT( \
Numeric T, Numeric T0, Numeric P [[maybe_unused]], const ConstVectorView& vmrs) \
const noexcept;
#define d

Definition at line 669 of file lineshapemodel.h.

◆ LSPCV

#define LSPCV (   XVAR,
  PVAR 
)
Value:
Numeric d##XVAR##_dVMR(Numeric T, \
Numeric T0, \
Numeric P [[maybe_unused]], \
const Index deriv_pos) const noexcept;
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39

Definition at line 653 of file lineshapemodel.h.

◆ LSPDC

#define LSPDC (   XVAR,
  DERIV,
  PVAR 
)
Value:
Numeric d##XVAR##DERIV(Numeric T, \
Numeric T0, \
Numeric P [[maybe_unused]], \
Index deriv_pos, \
const ConstVectorView& vmrs) const noexcept;

Definition at line 685 of file lineshapemodel.h.

◆ MODELPARAMCASEGETTER

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

◆ MODELPARAMCASESETTER

#define MODELPARAMCASESETTER (   X)
Value:
case Variable::X: \
X() = x; \
break

Typedef Documentation

◆ LineShapeModel

Definition at line 1085 of file lineshapemodel.h.

◆ LineShapeModelParameters

◆ LineShapeSingleSpeciesModel

◆ LineShapeTemperatureModel

using LineShapeTemperatureModel = LineShape::TemperatureModel

Definition at line 1090 of file lineshapemodel.h.

◆ LineShapeType

using LineShapeType = LineShape::Type

Definition at line 1088 of file lineshapemodel.h.

◆ LineShapeVariable

using LineShapeVariable = LineShape::Variable

Definition at line 1089 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.

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

Definition at line 39 of file lineshapemodel.cc.

References LineShape::D0, LineShape::D2, LineShape::ETA, LineShape::FVC, LineShape::G, LineShape::G0, LineShape::G2, ReturnJacPropMatType, Raw::Average::var(), and LineShape::Y.

Referenced by jacobianAddShapeCatalogParameter().