ARTS
2.4.0(git:4fb77825)
|
Computations of line shape derived parameters. More...
Namespaces | |
LegacyLineFunctionData | |
Legacy dealing with reading old LineFunctionData. | |
LegacyLineMixingData | |
Legacy dealing with reading old LineMixingData. | |
LegacyPressureBroadeningData | |
Legacy dealing with reading old PressureBroadeningData. | |
Classes | |
class | Model |
Main line shape model class. More... | |
struct | ModelParameters |
Coefficients and temperature model for SingleSpeciesModel. More... | |
struct | Output |
Main output of Model. More... | |
class | SingleSpeciesModel |
Compute the line shape parameters for a single broadening species. More... | |
Enumerations | |
enum | TemperatureModel : Index { TemperatureModel::None, TemperatureModel::T0, TemperatureModel::T1, TemperatureModel::T2, TemperatureModel::T3, TemperatureModel::T4, TemperatureModel::T5, TemperatureModel::LM_AER, TemperatureModel::DPL } |
Temperature models. More... | |
enum | Variable { Variable::G0 = 0, Variable::D0 = 1, Variable::G2 = 2, Variable::D2 = 3, Variable::FVC = 4, Variable::ETA = 5, Variable::Y = 6, Variable::G = 7, Variable::DV = 8 } |
List of possible shape variables. More... | |
enum | Type : Index { Type::DP, Type::LP, Type::VP, Type::SDVP, Type::HTP } |
Type of line shape to compute. More... | |
Functions | |
String | temperaturemodel2string (TemperatureModel type) noexcept |
Turns selected TemperatureModel type into a string. More... | |
TemperatureModel | string2temperaturemodel (const String &type) |
Turns predefined strings into a TemperatureModel type. More... | |
std::ostream & | operator<< (std::ostream &os, Variable v) |
Output operator for Variable to be human-readable. More... | |
String | variable2string (Variable type) noexcept |
Turns selected Variable type into a string. More... | |
Variable | string2variable (const String &type) |
Turns predefined strings into a Variable type. More... | |
String | modelparameters2metadata (const ModelParameters mp, const Numeric T0) |
Numeric & | SingleModelParameter (ModelParameters &mp, const String &type) |
Get a coefficient from ModelParameters by name. More... | |
bool | modelparameterEmpty (const ModelParameters mp) noexcept |
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... | |
String | shapetype2string (Type type) noexcept |
Turns selected Type into a string. More... | |
String | shapetype2metadatastring (Type type) noexcept |
Turns selected Type into a human readable string. More... | |
Type | string2shapetype (const String &type) |
Turns predefined strings into a Type. More... | |
std::ostream & | operator<< (std::ostream &os, Output x) |
Output operator for LineShape::Output. More... | |
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 QuantumIdentifier &self, const ArrayOfSpeciesTag &lineshape_species, bool self_in_list, bool bath_in_list, Type type) |
Returns a VMR 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 bool bath, const ArrayOfSpeciesTag &sts, const Numeric T0) |
std::istream & | from_artscat4 (std::istream &is, Type &type, bool &self, bool &bath, Model &m, ArrayOfSpeciesTag &species, const QuantumIdentifier &qid) |
std::istream & | from_linefunctiondata (std::istream &data, Type &type, bool &self, bool &bath, Model &m, ArrayOfSpeciesTag &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, ArrayOfSpeciesTag &species, const QuantumIdentifier &qid) |
Legacy reading of old deprecated PressureBroadeningData class. More... | |
Variables | |
constexpr Index | nmaxTempModelParams = 4 |
Current max number of coefficients. More... | |
constexpr Index | nVars = 9 |
Current max number of line shape variables. More... | |
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
|
strong |
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
Enumerator | |
---|---|
None | |
T0 | |
T1 | |
T2 | |
T3 | |
T4 | |
T5 | |
LM_AER | |
DPL |
Definition at line 76 of file lineshapemodel.h.
|
strong |
Type of line shape to compute.
Enumerator | |
---|---|
DP | |
LP | |
VP | |
SDVP | |
HTP |
Definition at line 788 of file lineshapemodel.h.
|
strong |
List of possible shape variables.
Should correspond to strings in AllLineShapeVars()
Enumerator | |
---|---|
G0 | |
D0 | |
G2 | |
D2 | |
FVC | |
ETA | |
Y | |
G | |
DV |
Definition at line 162 of file lineshapemodel.h.
Diff of two output.
Definition at line 919 of file lineshapemodel.h.
References ARTS::Var::x(), and ARTS::Var::y().
std::istream & LineShape::from_artscat4 | ( | std::istream & | is, |
Type & | type, | ||
bool & | self, | ||
bool & | bath, | ||
Model & | m, | ||
ArrayOfSpeciesTag & | species, | ||
const QuantumIdentifier & | qid | ||
) |
Definition at line 95 of file lineshapemodel.cc.
References LineShape::Model::mdata.
std::istream & LineShape::from_linefunctiondata | ( | std::istream & | data, |
Type & | type, | ||
bool & | self, | ||
bool & | bath, | ||
Model & | m, | ||
ArrayOfSpeciesTag & | species | ||
) |
Definition at line 158 of file lineshapemodel.cc.
References data, LineShape::LegacyLineFunctionData::linemixingtag2variablesvector(), LineShape::LegacyLineFunctionData::lineshapetag2variablesvector(), LineShape::Model::mdata, and string2shapetype().
std::istream & LineShape::from_linemixingdata | ( | std::istream & | data, |
LineShape::Model & | lsc | ||
) |
Legacy reading of old deprecated LineMixingData class.
Definition at line 306 of file lineshapemodel.cc.
References data, LineShape::LegacyLineMixingData::string2typelm(), LineShape::LegacyLineMixingData::typelm2nelem(), LineShape::LegacyLineMixingData::vector2modellm(), and ARTS::Var::x().
std::istream & LineShape::from_pressurebroadeningdata | ( | std::istream & | data, |
LineShape::Type & | type, | ||
bool & | self, | ||
bool & | bath, | ||
Model & | m, | ||
ArrayOfSpeciesTag & | species, | ||
const QuantumIdentifier & | qid | ||
) |
Legacy reading of old deprecated PressureBroadeningData class.
Definition at line 275 of file lineshapemodel.cc.
References data, LineShape::LegacyPressureBroadeningData::self_listed(), LineShape::LegacyPressureBroadeningData::string2typepb(), LineShape::LegacyPressureBroadeningData::typepb2nelem(), LineShape::LegacyPressureBroadeningData::vector2modelpb(), and ARTS::Var::x().
LineShape::Model LineShape::MetaData2ModelShape | ( | const String & | s | ) |
Definition at line 563 of file lineshapemodel.cc.
References AllLineShapeVars(), my_basic_string< charT >::nelem(), string2temperaturemodel(), string2variable(), linalg::var(), and ARTS::Var::x().
Output to be used by mirroring calls.
Definition at line 895 of file lineshapemodel.h.
References ARTS::Var::x().
Referenced by Linefunctions::set_cross_section_of_band(), and Linefunctions::set_lineshape().
ArrayOfString LineShape::ModelMetaDataArray | ( | const Model & | m, |
const bool | self, | ||
const bool | bath, | ||
const ArrayOfSpeciesTag & | sts, | ||
const Numeric | T0 | ||
) |
Definition at line 641 of file lineshapemodel.cc.
Referenced by Absorption::Lines::MetaData().
|
inlinenoexcept |
Definition at line 313 of file lineshapemodel.h.
References None, T0, T1, T2, T3, and T4.
Referenced by abs_linesSetEmptyBroadeningParametersToEmpty().
String LineShape::modelparameters2metadata | ( | const ModelParameters | mp, |
const Numeric | T0 | ||
) |
Definition at line 605 of file lineshapemodel.cc.
Definition at line 538 of file lineshapemodel.cc.
References AllLineShapeVars(), LineShape::Model::Data(), string2variable(), temperaturemodel2string(), linalg::var(), variable2string(), and ARTS::Var::x().
Referenced by Absorption::Lines::LineShapeMetaData().
std::ostream & LineShape::operator<< | ( | std::ostream & | os, |
const Model & | m | ||
) |
Definition at line 523 of file lineshapemodel.cc.
References data, and LineShape::Model::Data().
|
inline |
Output operator for ModelParameters.
Definition at line 338 of file lineshapemodel.h.
References temperaturemodel2string(), LineShape::ModelParameters::type, LineShape::ModelParameters::X0, LineShape::ModelParameters::X1, LineShape::ModelParameters::X2, and LineShape::ModelParameters::X3.
|
inline |
Output operator for SingleSpeciesModel.
Definition at line 771 of file lineshapemodel.h.
References LineShape::SingleSpeciesModel::Data().
|
inline |
Output operator for LineShape::Output.
Definition at line 888 of file lineshapemodel.h.
References ARTS::Var::x().
|
inline |
std::istream & LineShape::operator>> | ( | std::istream & | is, |
Model & | m | ||
) |
Definition at line 530 of file lineshapemodel.cc.
References data, and LineShape::Model::Data().
|
inline |
Input operator for ModelParameters.
Definition at line 345 of file lineshapemodel.h.
References string2temperaturemodel(), LineShape::ModelParameters::type, LineShape::ModelParameters::X0, LineShape::ModelParameters::X1, LineShape::ModelParameters::X2, and LineShape::ModelParameters::X3.
|
inline |
Input operator for SingleSpeciesModel.
Definition at line 780 of file lineshapemodel.h.
References LineShape::SingleSpeciesModel::Data().
Turns selected Type into a human readable string.
This function takes the input Type and returns it as a string
[in] | type | The Type |
Definition at line 830 of file lineshapemodel.h.
References DP.
Referenced by Absorption::Lines::MetaData().
Turns selected Type into a string.
This function takes the input Type and returns it as a string
[in] | type | The Type |
Definition at line 805 of file lineshapemodel.h.
References DP.
Referenced by xml_write_to_stream().
Output turned from SI to CGS units.
Definition at line 905 of file lineshapemodel.h.
References Conversion::freq2kaycm(), and ARTS::Var::x().
|
inline |
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 295 of file lineshapemodel.h.
References LineShape::ModelParameters::X0, LineShape::ModelParameters::X1, LineShape::ModelParameters::X2, and LineShape::ModelParameters::X3.
Turns predefined strings into a Type.
This function either acts as the inverse of shapetype2string or it throws a runtime error
[in] | type | The Type string |
Definition at line 855 of file lineshapemodel.h.
References DP.
Referenced by abs_linesSetLineShapeType(), abs_linesSetLineShapeTypeForMatch(), from_linefunctiondata(), and xml_read_from_stream().
|
inline |
Turns predefined strings into a TemperatureModel type.
This function either acts as the inverse of temperaturemodel2string or it throws a runtime error
[in] | type | The TemperatureModel string |
Definition at line 131 of file lineshapemodel.h.
References None, T0, T1, T2, T3, and T4.
Referenced by getLineShapeModelParametersType(), MetaData2ModelShape(), and operator>>().
Turns predefined strings into a Variable type.
This function either acts as the inverse of variable2string or it throws a runtime error
[in] | type | The Variable string |
Definition at line 246 of file lineshapemodel.h.
References G0, and STRING2VARIABLEDEF.
Referenced by abs_linesChangeLineShapeModelParameterForMatchingLines(), abs_linesSetLineShapeModelParameterForMatchingLines(), MetaData2ModelShape(), and ModelShape2MetaData().
|
inlinenoexcept |
Turns selected TemperatureModel type into a string.
This function takes the input TemperatureModel and returns it as a string
[in] | type | The temperature model type |
Definition at line 98 of file lineshapemodel.h.
References None, T0, T1, T2, T3, and T4.
Referenced by ModelShape2MetaData(), and operator<<().
Turns selected Variable type into a string.
This function takes the input Variable and returns it as a string
[in] | type | The Variable type |
Definition at line 218 of file lineshapemodel.h.
References G0, and VARIABLE2STRINGDEF.
Referenced by ModelShape2MetaData().
Vector LineShape::vmrs | ( | const ConstVectorView & | atmospheric_vmrs, |
const ArrayOfArrayOfSpeciesTag & | atmospheric_species, | ||
const QuantumIdentifier & | self, | ||
const ArrayOfSpeciesTag & | lineshape_species, | ||
bool | self_in_list, | ||
bool | bath_in_list, | ||
Type | type | ||
) |
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
[in] | atmospheric_vmrs | VMRS in atmosphere |
[in] | atmospheric_species | Species in atmosphere |
[in] | self | An ID of whichever species is self |
[in] | lineshape_species | Species affecting lineshape |
[in] | self_in_list | Affects lineshape by itself? |
[in] | bath_in_list | Affected lineshape by environment? |
[in] | type | The type of line shape |
Definition at line 474 of file lineshapemodel.cc.
References Array< base >::nelem(), ConstVectorView::nelem(), Species, and ConstVectorView::sum().
Referenced by Linefunctions::apply_lineshapemodel_jacobian_scaling(), atm_fields_compactAddConstant(), Absorption::Lines::BroadeningSpeciesVMR(), propmat_clearskyAddHitranLineMixingLines(), Linefunctions::set_cross_section_of_band(), and test_hitran2017().
|
constexpr |
Current max number of coefficients.
Definition at line 353 of file lineshapemodel.h.
|
constexpr |
Current max number of line shape variables.
Definition at line 356 of file lineshapemodel.h.
Referenced by abs_linesSetEmptyBroadeningParametersToEmpty().