ARTS  2.4.0(git:4fb77825)
SpeciesAuxData Class Reference

Auxiliary data for isotopologues. More...

#include <absorption.h>

Public Types

enum  AuxType {
  AT_NONE, AT_ISOTOPOLOGUE_RATIO, AT_ISOTOPOLOGUE_QUANTUM, AT_PARTITIONFUNCTION_TFIELD,
  AT_PARTITIONFUNCTION_COEFF, AT_PARTITIONFUNCTION_COEFF_VIBROT, AT_FINAL_ENTRY
}
 
typedef Array< Array< AuxType > > ArrayOfArrayOfAuxType
 
typedef Array< GriddedField1AuxData
 
typedef Array< Array< AuxData > > ArrayOfArrayOfAuxData
 

Public Member Functions

 SpeciesAuxData ()
 Default constructor. More...
 
void InitFromSpeciesData ()
 
Index nspecies () const
 Returns number of species. More...
 
Index nisotopologues (const Index species) const
 Returns number of isotopologues for a certain species. More...
 
const ArrayOfGriddedField1getParam (const Index species, const Index isotopologue) const
 Return a constant reference to the parameters. More...
 
Numeric getIsotopologueRatio (const SpeciesTag &st) const
 Returns mparams[st.Species()][st.Isotopologue()][0].data[0] if st.Isotopologue() > 0, else 1. More...
 
Numeric getIsotopologueRatio (const QuantumIdentifier &qid) const
 Returns mparams[qid.Species()][qid.Isotopologue()][0].data[0]. More...
 
const ArrayOfGriddedField1getParam (const QuantumIdentifier &qid) const
 Return a constant reference to the parameters. More...
 
String getTypeString (const Index species, const Index isotopologue) const
 Return a parameter type as string. More...
 
void setParam (const Index species, const Index isotopologue, const AuxType auxtype, const ArrayOfGriddedField1 &auxdata)
 Set parameter. More...
 
void setParam (const String &artstag, const String &auxtype, const ArrayOfGriddedField1 &auxdata)
 Set parameter by ARTS tag. More...
 
const AuxTypegetParamType (const Index species, const Index isotopologue) const
 Return a constant reference to the parameter types. More...
 
const AuxTypegetParamType (const QuantumIdentifier &qid) const
 Return a constant reference to the parameter types. More...
 
bool ReadFromStream (String &artsid, istream &is, Index nparams, const Verbosity &verbosity)
 Read parameters from input stream (only for version 1 format). More...
 
ArrayOfGriddedField1Data (const Index species, const Index isotopologue)
 Returns value for one isotopologue. More...
 
Index setParamType (const Index species, const Index isotopologue, Index type)
 Sets type for one isotopologue if type is valid (returns 0 if valid) More...
 
bool validIndex (Index species, Index isotopologue) const
 Returns true if species and isotopologue are valid. More...
 

Private Attributes

ArrayOfArrayOfAuxData mparams
 
ArrayOfArrayOfAuxType mparam_type
 

Detailed Description

Auxiliary data for isotopologues.

Definition at line 217 of file absorption.h.

Member Typedef Documentation

◆ ArrayOfArrayOfAuxData

Definition at line 231 of file absorption.h.

◆ ArrayOfArrayOfAuxType

Definition at line 229 of file absorption.h.

◆ AuxData

Definition at line 230 of file absorption.h.

Member Enumeration Documentation

◆ AuxType

Enumerator
AT_NONE 
AT_ISOTOPOLOGUE_RATIO 
AT_ISOTOPOLOGUE_QUANTUM 
AT_PARTITIONFUNCTION_TFIELD 
AT_PARTITIONFUNCTION_COEFF 
AT_PARTITIONFUNCTION_COEFF_VIBROT 
AT_FINAL_ENTRY 

Definition at line 219 of file absorption.h.

Constructor & Destructor Documentation

◆ SpeciesAuxData()

SpeciesAuxData::SpeciesAuxData ( )
inline

Default constructor.

Definition at line 234 of file absorption.h.

Member Function Documentation

◆ Data()

ArrayOfGriddedField1& SpeciesAuxData::Data ( const Index  species,
const Index  isotopologue 
)
inline

Returns value for one isotopologue.

Definition at line 293 of file absorption.h.

References mparams.

◆ getIsotopologueRatio() [1/2]

Numeric SpeciesAuxData::getIsotopologueRatio ( const QuantumIdentifier qid) const

Returns mparams[qid.Species()][qid.Isotopologue()][0].data[0].

Definition at line 157 of file absorption.cc.

References getParam(), QuantumIdentifier::Isotopologue(), and QuantumIdentifier::Species().

◆ getIsotopologueRatio() [2/2]

Numeric SpeciesAuxData::getIsotopologueRatio ( const SpeciesTag st) const

Returns mparams[st.Species()][st.Isotopologue()][0].data[0] if st.Isotopologue() > 0, else 1.

Definition at line 150 of file absorption.cc.

References getParam(), SpeciesTag::Isotopologue(), and SpeciesTag::Species().

◆ getParam() [1/2]

const ArrayOfGriddedField1 & SpeciesAuxData::getParam ( const Index  species,
const Index  isotopologue 
) const

Return a constant reference to the parameters.

Definition at line 145 of file absorption.cc.

References mparams.

Referenced by checkIsotopologueRatios(), getIsotopologueRatio(), getParam(), operator<<(), and xml_write_to_stream().

◆ getParam() [2/2]

const ArrayOfGriddedField1& SpeciesAuxData::getParam ( const QuantumIdentifier qid) const
inline

Return a constant reference to the parameters.

Definition at line 257 of file absorption.h.

References getParam(), QuantumIdentifier::Isotopologue(), and QuantumIdentifier::Species().

◆ getParamType() [1/2]

const AuxType& SpeciesAuxData::getParamType ( const Index  species,
const Index  isotopologue 
) const
inline

Return a constant reference to the parameter types.

Definition at line 276 of file absorption.h.

References mparam_type.

Referenced by getParamType().

◆ getParamType() [2/2]

const AuxType& SpeciesAuxData::getParamType ( const QuantumIdentifier qid) const
inline

Return a constant reference to the parameter types.

Definition at line 282 of file absorption.h.

References getParamType(), QuantumIdentifier::Isotopologue(), and QuantumIdentifier::Species().

◆ getTypeString()

String SpeciesAuxData::getTypeString ( const Index  species,
const Index  isotopologue 
) const

Return a parameter type as string.

Definition at line 161 of file absorption.cc.

References AT_FINAL_ENTRY, and mparam_type.

Referenced by operator<<(), and xml_write_to_stream().

◆ InitFromSpeciesData()

◆ nisotopologues()

Index SpeciesAuxData::nisotopologues ( const Index  species) const
inline

Returns number of isotopologues for a certain species.

Definition at line 242 of file absorption.h.

References mparams, and Array< base >::nelem().

Referenced by checkIsotopologueRatios(), checkPartitionFunctions(), operator<<(), and xml_write_to_stream().

◆ nspecies()

Index SpeciesAuxData::nspecies ( ) const
inline

Returns number of species.

Definition at line 239 of file absorption.h.

References mparams, and Array< base >::nelem().

Referenced by checkIsotopologueRatios(), checkPartitionFunctions(), operator<<(), and xml_write_to_stream().

◆ ReadFromStream()

bool SpeciesAuxData::ReadFromStream ( String artsid,
istream &  is,
Index  nparams,
const Verbosity verbosity 
)

Read parameters from input stream (only for version 1 format).

Definition at line 167 of file absorption.cc.

References CREATE_OUT3, SpeciesRecord::Isotopologue(), SpeciesRecord::Name(), my_basic_string< charT >::nelem(), Absorption::nelem(), global_data::species_data, and SpecIsoMap::Speciesindex().

Referenced by xml_read_from_stream().

◆ setParam() [1/2]

void SpeciesAuxData::setParam ( const Index  species,
const Index  isotopologue,
const AuxType  auxtype,
const ArrayOfGriddedField1 auxdata 
)

◆ setParam() [2/2]

void SpeciesAuxData::setParam ( const String artstag,
const String auxtype,
const ArrayOfGriddedField1 auxdata 
)

◆ setParamType()

Index SpeciesAuxData::setParamType ( const Index  species,
const Index  isotopologue,
Index  type 
)
inline

Sets type for one isotopologue if type is valid (returns 0 if valid)

Definition at line 296 of file absorption.h.

References AT_FINAL_ENTRY, AT_ISOTOPOLOGUE_QUANTUM, AT_ISOTOPOLOGUE_RATIO, AT_NONE, AT_PARTITIONFUNCTION_COEFF, AT_PARTITIONFUNCTION_COEFF_VIBROT, AT_PARTITIONFUNCTION_TFIELD, mparam_type, and ARTS::Var::y().

◆ validIndex()

bool SpeciesAuxData::validIndex ( Index  species,
Index  isotopologue 
) const
inline

Returns true if species and isotopologue are valid.

Definition at line 307 of file absorption.h.

References mparam_type, mparams, and Array< base >::nelem().

Member Data Documentation

◆ mparam_type

ArrayOfArrayOfAuxType SpeciesAuxData::mparam_type
private

◆ mparams

ArrayOfArrayOfAuxData SpeciesAuxData::mparams
private

The documentation for this class was generated from the following files: