ARTS 2.5.0 (git: 9ee3ac6c)
Species Namespace Reference

Classes

struct  IsotopeRecord
 Struct containing all information needed about one isotope. More...
 
struct  IsotopologueRatios
 

Functions

ArrayOfIsotopeRecord isotopologues (Species spec)
 
String isotopologues_names (Species spec)
 
String predefined_model_names () noexcept
 
String update_isot_name (const String &old_name)
 Updates the name of the isotopologue based on updates of the isotopologues. More...
 
std::pair< ArrayOfString, ArrayOfStringnames_of_have_and_havenot_ratio (const Species spec, const IsotopologueRatios &ir) noexcept
 
constexpr std::array< std::size_t, std::size_t(Species::FINAL)+1 > start_positions () noexcept
 
template<Species spec>
constexpr std::size_t count_isotopologues () noexcept
 
template<Species spec>
constexpr std::array< IsotopeRecord, count_isotopologues< spec >()> isotopologues () noexcept
 
constexpr Index find_species_index (const Species spec, const std::string_view isot) noexcept
 
constexpr Index find_species_index (const IsotopeRecord ir) noexcept
 
constexpr Index find_species_index (const std::string_view spec, const std::string_view isot) noexcept
 
constexpr const IsotopeRecordselect (Species spec, const std::string_view isotname) noexcept
 
constexpr const IsotopeRecordselect (const std::string_view spec, const std::string_view isotname) noexcept
 
constexpr const IsotopeRecordselect_joker (Species spec) noexcept
 
constexpr const IsotopeRecordselect_joker (std::string_view spec) noexcept
 
constexpr bool is_predefined_model (const IsotopeRecord &ir) noexcept
 
constexpr bool same_or_joker (const IsotopeRecord &ir1, const IsotopeRecord &ir2) noexcept
 
constexpr IsotopologueRatios isotopologue_ratiosInitFromBuiltin ()
 
constexpr Numeric mean_mass (Species spec, const IsotopologueRatios &ir) noexcept
 
constexpr bool all_have_ratio (const Species spec, const IsotopologueRatios &ir) noexcept
 
 ENUMCLASS (TagType, unsigned char, Plain, Zeeman, Predefined, Cia, FreeElectrons, Particles, HitranXsec, NoLines) struct Tag
 

Variables

constexpr std::string_view Joker = "*"
 
constexpr std::array Isotopologues
 
constexpr auto IsotopologuesStart = start_positions()
 

Function Documentation

◆ all_have_ratio()

constexpr bool Species::all_have_ratio ( const Species  spec,
const IsotopologueRatios ir 
)
constexprnoexcept

◆ count_isotopologues()

template<Species spec>
constexpr std::size_t Species::count_isotopologues ( )
constexprnoexcept

Definition at line 611 of file isotopologues.h.

References IsotopologuesStart.

◆ ENUMCLASS()

Species::ENUMCLASS ( TagType  ,
unsigned char  ,
Plain  ,
Zeeman  ,
Predefined  ,
Cia  ,
FreeElectrons  ,
Particles  ,
HitranXsec  ,
NoLines   
)

Molecular species index in Species::Isotopologues

The lower limit line center frequency in Hz.

If this is < 0 it means no lower limit.

The upper line center frequency in Hz.

If this is < 0 it means no upper limit.

Flag for the type

2nd CIA species index.

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

CIA dataset index.

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

Definition at line 12 of file species_tags.h.

References ARTS_ASSERT, ARTS_NOEXCEPT, PartitionFunctions::dQdT(), find_species_index(), is_predefined_model(), isot, Isotopologues, operator!=(), operator<<(), operator==(), PartitionFunctions::Q(), Type, and Hitran::type.

◆ find_species_index() [1/3]

constexpr Index Species::find_species_index ( const IsotopeRecord  ir)
constexprnoexcept

Definition at line 638 of file isotopologues.h.

References find_species_index().

◆ find_species_index() [2/3]

constexpr Index Species::find_species_index ( const Species  spec,
const std::string_view  isot 
)
constexprnoexcept

◆ find_species_index() [3/3]

constexpr Index Species::find_species_index ( const std::string_view  spec,
const std::string_view  isot 
)
constexprnoexcept

Definition at line 642 of file isotopologues.h.

References find_species_index(), and isot.

◆ is_predefined_model()

constexpr bool Species::is_predefined_model ( const IsotopeRecord ir)
constexprnoexcept

◆ isotopologue_ratiosInitFromBuiltin()

constexpr IsotopologueRatios Species::isotopologue_ratiosInitFromBuiltin ( )
constexpr

Definition at line 717 of file isotopologues.h.

References Hitran::isotopologue_ratios(), and set_isot_val.

Referenced by isotopologue_ratiosInitFromBuiltin(), and main().

◆ isotopologues() [1/2]

template<Species spec>
constexpr std::array< IsotopeRecord, count_isotopologues< spec >()> Species::isotopologues ( )
constexprnoexcept

Definition at line 616 of file isotopologues.h.

References Isotopologues, and IsotopologuesStart.

◆ isotopologues() [2/2]

Array< IsotopeRecord > Species::isotopologues ( Species  spec)

◆ isotopologues_names()

String Species::isotopologues_names ( Species  spec)

Definition at line 128 of file isotopologues.cc.

References isotopologues().

◆ mean_mass()

constexpr Numeric Species::mean_mass ( Species  spec,
const IsotopologueRatios ir 
)
constexprnoexcept

Computes the mean mass for all defined isotopes of the species with mass and isotopologue ratio

\[ m = \frac{ \sum_i r_i m_i }{ \sum_i r_i } \]

Parameters
[in]specA species
[in]irAll isotopologue ratios
Returns
mean mass

Definition at line 1097 of file isotopologues.h.

References nonstd::isnan(), Isotopologues, IsotopologuesStart, and LineShape::mass().

Referenced by ecs_dataSetSpeciesData(), and LineShape::mass().

◆ names_of_have_and_havenot_ratio()

std::pair< ArrayOfString, ArrayOfString > Species::names_of_have_and_havenot_ratio ( const Species  spec,
const IsotopologueRatios ir 
)
noexcept

Definition at line 164 of file isotopologues.cc.

◆ predefined_model_names()

String Species::predefined_model_names ( )
noexcept

Definition at line 135 of file isotopologues.cc.

References is_predefined_model(), and Isotopologues.

◆ same_or_joker()

constexpr bool Species::same_or_joker ( const IsotopeRecord ir1,
const IsotopeRecord ir2 
)
constexprnoexcept

Definition at line 672 of file isotopologues.h.

Referenced by abs_lines_per_speciesCreateFromLines().

◆ select() [1/2]

constexpr const IsotopeRecord & Species::select ( const std::string_view  spec,
const std::string_view  isotname 
)
constexprnoexcept

Definition at line 651 of file isotopologues.h.

References find_species_index(), and Isotopologues.

◆ select() [2/2]

constexpr const IsotopeRecord & Species::select ( Species  spec,
const std::string_view  isotname 
)
constexprnoexcept

◆ select_joker() [1/2]

constexpr const IsotopeRecord & Species::select_joker ( Species  spec)
constexprnoexcept

Definition at line 656 of file isotopologues.h.

References select().

◆ select_joker() [2/2]

constexpr const IsotopeRecord & Species::select_joker ( std::string_view  spec)
constexprnoexcept

Definition at line 660 of file isotopologues.h.

References select().

◆ start_positions()

constexpr std::array< std::size_t, std::size_t(Species::FINAL)+1 > Species::start_positions ( )
constexprnoexcept

Definition at line 591 of file isotopologues.h.

References Isotopologues.

◆ update_isot_name()

String Species::update_isot_name ( const String old_name)

Updates the name of the isotopologue based on updates of the isotopologues.

This should only be invoked by versioned code as it is not very efficient.

Parameters
[in]old_nameA valid isotopologue name in any version of ARTS
Returns
A name that is valid and equivalent in ARTS today (or a copy of old_name)

Definition at line 145 of file isotopologues.cc.

Referenced by Absorption::ReadFromArtscat3Stream(), Absorption::ReadFromArtscat4Stream(), Absorption::ReadFromArtscat5Stream(), and xml_read_from_stream().

Variable Documentation

◆ Isotopologues

◆ IsotopologuesStart

constexpr auto Species::IsotopologuesStart = start_positions()
constexpr

◆ Joker

constexpr std::string_view Species::Joker = "*"
constexpr