ARTS 2.5.10 (git: 2f1c442c)
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.
 
std::pair< ArrayOfString, ArrayOfStringnames_of_have_and_havenot_ratio (const Species spec, const IsotopologueRatios &ir) noexcept
 
consteval std::array< std::size_t, std::size_t(Species::FINAL)+1 > start_positions () noexcept
 
template<Species spec>
consteval std::size_t count_isotopologues () noexcept
 
template<Species spec>
consteval 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 Index find_species_index (std::string_view s)
 
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 is_normal_isotopologue (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, XsecFit, NoLines) struct Tag
 
Numeric first_vmr (const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &rtp_vmr, const Species spec) ARTS_NOEXCEPT
 

Variables

constexpr std::string_view Joker = "*"
 
constexpr std::array Isotopologues
 A list of all ARTS isotopologues, note how the species enum class input HAS to be sorted.
 
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>
consteval std::size_t Species::count_isotopologues ( )
noexcept

Definition at line 602 of file isotopologues.h.

References IsotopologuesStart.

◆ ENUMCLASS()

Species::ENUMCLASS ( TagType  ,
unsigned char  ,
Plain  ,
Zeeman  ,
Predefined  ,
Cia  ,
FreeElectrons  ,
Particles  ,
XsecFit  ,
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 14 of file species_tags.h.

References ARTS_ASSERT, ARTS_NOEXCEPT, find_species_index(), is_predefined_model(), Isotopologues, operator!=(), operator<<(), and operator==().

◆ find_species_index() [1/4]

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

Definition at line 631 of file isotopologues.h.

References find_species_index().

◆ find_species_index() [2/4]

◆ find_species_index() [3/4]

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

Definition at line 635 of file isotopologues.h.

References find_species_index().

◆ find_species_index() [4/4]

constexpr Index Species::find_species_index ( std::string_view  s)
constexpr

Definition at line 640 of file isotopologues.h.

References find_species_index().

◆ first_vmr()

Numeric Species::first_vmr ( const ArrayOfArrayOfSpeciesTag abs_species,
const Vector rtp_vmr,
const Species  spec 
)

First VMR or 0

Parameters
abs_speciesAs WSV
rtp_vmrAs WSV
specA species

Definition at line 488 of file species_tags.cc.

References ARTS_ASSERT.

◆ is_normal_isotopologue()

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

Definition at line 668 of file isotopologues.h.

References nonstd::isdigit(), and Joker.

Referenced by Quantum::Number::GlobalState::good().

◆ is_predefined_model()

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

◆ isotopologue_ratiosInitFromBuiltin()

constexpr IsotopologueRatios Species::isotopologue_ratiosInitFromBuiltin ( )
constexpr

Definition at line 719 of file isotopologues.h.

References set_isot_val.

Referenced by define_wsv_data(), isotopologue_ratiosInitFromBuiltin(), and main().

◆ isotopologues() [1/2]

template<Species spec>
consteval std::array< IsotopeRecord, count_isotopologues< spec >()> Species::isotopologues ( )
noexcept

◆ isotopologues() [2/2]

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

Definition at line 6 of file isotopologues.cc.

References ARTS_USER_ERROR, and deal_with_spec.

◆ isotopologues_names()

String Species::isotopologues_names ( Species  spec)

Definition at line 130 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 1119 of file isotopologues.h.

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

Referenced by ecs_dataAddMakarov2020(), ecs_dataAddRodrigues1997(), ecs_dataAddSpeciesData(), ecs_dataAddTran2006(), ecs_dataAddTran2011(), 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

◆ predefined_model_names()

String Species::predefined_model_names ( )
noexcept

Definition at line 137 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 674 of file isotopologues.h.

◆ select() [1/2]

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

Definition at line 649 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

Definition at line 645 of file isotopologues.h.

References find_species_index(), and Isotopologues.

Referenced by select_joker().

◆ select_joker() [1/2]

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

Definition at line 654 of file isotopologues.h.

References select().

Referenced by abs_hitran_relmat_dataReadHitranRelmatDataAndLines().

◆ select_joker() [2/2]

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

Definition at line 658 of file isotopologues.h.

References select().

◆ start_positions()

consteval std::array< std::size_t, std::size_t(Species::FINAL)+1 > Species::start_positions ( )
noexcept

Definition at line 582 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 147 of file isotopologues.cc.

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

Variable Documentation

◆ Isotopologues

◆ IsotopologuesStart

constexpr auto Species::IsotopologuesStart = start_positions()
inlineconstexpr

◆ Joker

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