ARTS  2.4.0(git:4fb77825)
SpeciesTag Class Reference

A tag group can consist of the sum of several of these. More...

#include <abs_species_tags.h>

Public Types

enum  : Index {
  TYPE_PLAIN, TYPE_ZEEMAN, TYPE_PREDEF, TYPE_CIA,
  TYPE_FREE_ELECTRONS, TYPE_PARTICLES, TYPE_HITRAN_XSEC
}
 Enum for type of this tag. More...
 

Public Member Functions

 SpeciesTag ()
 Default constructor. More...
 
 SpeciesTag (String def)
 Constructor from a tag definition String. More...
 
String Name () const
 Return the full name of the tag. More...
 
Index Species () const
 Molecular species index. More...
 
void Species (Index x)
 Set molecular species index. More...
 
Index BathSpecies () const
 Molecular species index. More...
 
String SpeciesNameMain () const
 Name of main species. More...
 
Numeric SpeciesMass () const
 Mass of main species. More...
 
bool IsSpecies (const String &s) const
 Check if the species is same as SpeciesTag(s).Species() More...
 
bool IsIsotopologue (const String &i) const
 Check if the isotopologue is same as SpeciesTag(s).Isotopologue() More...
 
Index Isotopologue () const
 Isotopologue species index. More...
 
void Isotopologue (Index x)
 Isotopologue species index. More...
 
Numeric Lf () const
 The lower line center frequency in Hz. More...
 
void Lf (Numeric x)
 The lower line center frequency in Hz. More...
 
Numeric Uf () const
 The upper line center frequency in Hz: If this is <0 it means no upper limit. More...
 
void Uf (Numeric x)
 The upper line center frequency in Hz: If this is <0 it means no upper limit. More...
 
Index CIASecond () const
 Species index of the 2nd CIA species. More...
 
void CIASecond (Index x)
 Species index of the 2nd CIA species. More...
 
Index CIADataset () const
 CIA dataset index inside this CIA file. More...
 
void CIADataset (Index x)
 CIA dataset index inside this CIA file. More...
 
bool operator== (const SpeciesTag &other) const
 Comparison operator for species tags. More...
 
Index Type () const
 Return the type of this tag. More...
 
void Type (Index x)
 Return the type of this tag. More...
 
Index string2Type (const String &str) const
 

Static Public Member Functions

static bool validIndexForType (Index x) noexcept
 Checks if input is a valid Type. More...
 

Private Attributes

Index mspecies
 Molecular species index. More...
 
Index misotopologue
 Isotopologue species index. More...
 
Numeric mlf
 The lower limit line center frequency in Hz. More...
 
Numeric muf
 The upper line center frequency in Hz. More...
 
Index mtype
 Type of this tag. More...
 
Index mcia_second
 2nd CIA species index. More...
 
Index mcia_dataset
 CIA dataset index. More...
 

Detailed Description

A tag group can consist of the sum of several of these.

Author
Stefan Buehler

Definition at line 44 of file abs_species_tags.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : Index

Enum for type of this tag.

See private member mtype for more explanations.

Enumerator
TYPE_PLAIN 
TYPE_ZEEMAN 
TYPE_PREDEF 
TYPE_CIA 
TYPE_FREE_ELECTRONS 
TYPE_PARTICLES 
TYPE_HITRAN_XSEC 

Definition at line 147 of file abs_species_tags.h.

Constructor & Destructor Documentation

◆ SpeciesTag() [1/2]

SpeciesTag::SpeciesTag ( )
inline

Default constructor.

Definition at line 47 of file abs_species_tags.h.

◆ SpeciesTag() [2/2]

SpeciesTag::SpeciesTag ( String  def)
explicit

Constructor from a tag definition String.

For examples see documentation of member function Name().

Parameters
defString containing tag definition.
Exceptions
runtime_errorThe given String could not be mapped to a sensible tag description.

Definition at line 48 of file abs_species_tags.cc.

References find_first(), SpeciesRecord::Isotopologue(), mcia_dataset, mcia_second, misotopologue, mlf, mspecies, mtype, muf, Array< base >::nelem(), my_basic_string< charT >::nelem(), Absorption::nelem(), my_basic_string< charT >::npos, global_data::species_data, species_index_from_species_name(), my_basic_string< charT >::trim(), TYPE_CIA, TYPE_FREE_ELECTRONS, TYPE_HITRAN_XSEC, TYPE_PARTICLES, TYPE_PREDEF, and TYPE_ZEEMAN.

Member Function Documentation

◆ BathSpecies()

Index SpeciesTag::BathSpecies ( ) const
inline

Molecular species index.

Definition at line 70 of file abs_species_tags.h.

References mcia_second.

◆ CIADataset() [1/2]

Index SpeciesTag::CIADataset ( ) const
inline

CIA dataset index inside this CIA file.

Definition at line 115 of file abs_species_tags.h.

References mcia_dataset.

Referenced by abs_xsec_per_speciesAddCIA().

◆ CIADataset() [2/2]

void SpeciesTag::CIADataset ( Index  x)
inline

CIA dataset index inside this CIA file.

Definition at line 118 of file abs_species_tags.h.

References mcia_dataset, and ARTS::Var::x().

◆ CIASecond() [1/2]

Index SpeciesTag::CIASecond ( ) const
inline

Species index of the 2nd CIA species.

Definition at line 109 of file abs_species_tags.h.

References mcia_second.

Referenced by abs_xsec_per_speciesAddCIA(), and CIARecordReadFromFile().

◆ CIASecond() [2/2]

void SpeciesTag::CIASecond ( Index  x)
inline

Species index of the 2nd CIA species.

Definition at line 112 of file abs_species_tags.h.

References mcia_second, and ARTS::Var::x().

◆ IsIsotopologue()

bool SpeciesTag::IsIsotopologue ( const String i) const

◆ Isotopologue() [1/2]

Index SpeciesTag::Isotopologue ( ) const
inline

Isotopologue species index.

If this is equal to the number of isotopologues (one more than allowed) it means all isotopologues of this species.

Definition at line 87 of file abs_species_tags.h.

References misotopologue.

Referenced by SpeciesAuxData::getIsotopologueRatio().

◆ Isotopologue() [2/2]

void SpeciesTag::Isotopologue ( Index  x)
inline

Isotopologue species index.

Definition at line 90 of file abs_species_tags.h.

References misotopologue, and ARTS::Var::x().

◆ IsSpecies()

bool SpeciesTag::IsSpecies ( const String s) const

Check if the species is same as SpeciesTag(s).Species()

Definition at line 426 of file abs_species_tags.cc.

References mspecies, and species_index_from_species_name().

◆ Lf() [1/2]

Numeric SpeciesTag::Lf ( ) const
inline

The lower line center frequency in Hz.

If this is <0 it means no lower limit.

Definition at line 94 of file abs_species_tags.h.

References mlf.

◆ Lf() [2/2]

void SpeciesTag::Lf ( Numeric  x)
inline

The lower line center frequency in Hz.

If this is <0 it means no lower limit.

Definition at line 98 of file abs_species_tags.h.

References mlf, and ARTS::Var::x().

◆ Name()

String SpeciesTag::Name ( ) const

Return the full name of the tag.

Examples:

O3-*-*-*         : All O3 lines
O3-nl            : O3, but without any lines
O3-666-*-*       : All O3-666 lines
O3-*-500e9-501e9 : All O3 lines between 500 and 501 GHz.
Returns
The tag name as a string.

Definition at line 336 of file abs_species_tags.cc.

References SpeciesRecord::Isotopologue(), mcia_dataset, mcia_second, misotopologue, mlf, mspecies, mtype, muf, SpeciesRecord::Name(), Array< base >::nelem(), precision, global_data::species_data, species_name_from_species_index(), TYPE_CIA, TYPE_FREE_ELECTRONS, TYPE_HITRAN_XSEC, TYPE_PARTICLES, and TYPE_ZEEMAN.

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

◆ operator==()

bool SpeciesTag::operator== ( const SpeciesTag other) const
inline

Comparison operator for species tags.

This returns false as soon as a singe discrepancy is detected. Otherwise it returns true at the end.

Parameters
otherThe other tag to compare to.
Returns
true if the two tags are equal.
Author
Stefan Buehler
Date
2002-11-29

Definition at line 132 of file abs_species_tags.h.

References mcia_dataset, mcia_second, misotopologue, mlf, mspecies, mtype, muf, and TYPE_CIA.

◆ Species() [1/2]

◆ Species() [2/2]

void SpeciesTag::Species ( Index  x)
inline

Set molecular species index.

Definition at line 67 of file abs_species_tags.h.

References mspecies, and ARTS::Var::x().

◆ SpeciesMass()

Numeric SpeciesTag::SpeciesMass ( ) const

Mass of main species.

Definition at line 412 of file abs_species_tags.cc.

References iso(), misotopologue, mspecies, and global_data::species_data.

◆ SpeciesNameMain()

String SpeciesTag::SpeciesNameMain ( ) const

Name of main species.

Definition at line 408 of file abs_species_tags.cc.

References mspecies, and species_name_from_species_index().

Referenced by jacobianAddShapeCatalogParameter().

◆ string2Type()

Index SpeciesTag::string2Type ( const String str) const
inline
Returns
Value if string is a Type or -1 if not

Definition at line 174 of file abs_species_tags.h.

References TYPE_CIA, TYPE_FREE_ELECTRONS, TYPE_HITRAN_XSEC, TYPE_PARTICLES, TYPE_PLAIN, TYPE_PREDEF, and TYPE_ZEEMAN.

◆ Type() [1/2]

Index SpeciesTag::Type ( ) const
inline

Return the type of this tag.

See private member mtype for more explanations.

Definition at line 160 of file abs_species_tags.h.

References mtype.

Referenced by abs_xsec_per_speciesAddCIA(), abs_xsec_per_speciesAddHitranXsec(), array_species_tag_from_string(), and CIARecordReadFromFile().

◆ Type() [2/2]

void SpeciesTag::Type ( Index  x)
inline

Return the type of this tag.

See private member mtype for more explanations.

Definition at line 165 of file abs_species_tags.h.

References mtype, and ARTS::Var::x().

◆ Uf() [1/2]

Numeric SpeciesTag::Uf ( ) const
inline

The upper line center frequency in Hz: If this is <0 it means no upper limit.

Definition at line 102 of file abs_species_tags.h.

References muf.

◆ Uf() [2/2]

void SpeciesTag::Uf ( Numeric  x)
inline

The upper line center frequency in Hz: If this is <0 it means no upper limit.

Definition at line 106 of file abs_species_tags.h.

References muf, and ARTS::Var::x().

◆ validIndexForType()

static bool SpeciesTag::validIndexForType ( Index  x)
inlinestaticnoexcept

Member Data Documentation

◆ mcia_dataset

Index SpeciesTag::mcia_dataset
private

CIA dataset index.

A CIA file contains several datasets. This index specifies which one we want.

Definition at line 235 of file abs_species_tags.h.

Referenced by CIADataset(), Name(), operator==(), and SpeciesTag().

◆ mcia_second

Index SpeciesTag::mcia_second
private

2nd CIA species index.

Contains the species index of the second CIA species that should be used for this tag.

Definition at line 231 of file abs_species_tags.h.

Referenced by BathSpecies(), CIASecond(), Name(), operator==(), and SpeciesTag().

◆ misotopologue

Index SpeciesTag::misotopologue
private

Isotopologue species index.

If this is equal to the number of isotopologues (one more than allowed) it means all isotopologues of this species. If it is <0 it means no isotopologue (no lines), corresponding to "H2O-nl"

Definition at line 203 of file abs_species_tags.h.

Referenced by IsIsotopologue(), Isotopologue(), Name(), operator==(), SpeciesMass(), and SpeciesTag().

◆ mlf

Numeric SpeciesTag::mlf
private

The lower limit line center frequency in Hz.

If this is <0 it means no lower limit.

Definition at line 207 of file abs_species_tags.h.

Referenced by Lf(), Name(), operator==(), and SpeciesTag().

◆ mspecies

Index SpeciesTag::mspecies
private

Molecular species index.

Definition at line 196 of file abs_species_tags.h.

Referenced by IsIsotopologue(), IsSpecies(), Name(), operator==(), Species(), SpeciesMass(), SpeciesNameMain(), and SpeciesTag().

◆ mtype

Index SpeciesTag::mtype
private

Type of this tag.

The type can be:

TYPE_PLAIN:          A normal line-by-line tag
TYPE_ZEEMAN:         A line-by-line tag with Zeeman calculation
TYPE_PREDEF:         A tag for a predefined absorption model (continuum or
                      full absorption model)
TYPE_CIA:            A HITRAN collision induces absorption (CIA) tag
TYPE_FREE_ELECTRONS: A free electrons tag
TYPE_PARTICLES:      A particle tag
TYPE_HITRAN_XSEC:    A HITRAN absorption cross section tag

Definition at line 227 of file abs_species_tags.h.

Referenced by Name(), operator==(), SpeciesTag(), and Type().

◆ muf

Numeric SpeciesTag::muf
private

The upper line center frequency in Hz.

If this is <0 it means no upper limit.

Definition at line 211 of file abs_species_tags.h.

Referenced by Name(), operator==(), SpeciesTag(), and Uf().


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