ARTS 2.5.11 (git: 725533f0)
Species Namespace Reference

Namespaces

namespace  detail
 

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
 
SpeciesTag parse_tag (std::string_view text)
 
Array< Tag > parse_tags (std::string_view text)
 Parse a list of species tags into an Array<Tag>
 
 ENUMCLASS (TagType, unsigned char, Plain, Zeeman, Predefined, Cia, FreeElectrons, Particles, XsecFit) 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 610 of file isotopologues.h.

References IsotopologuesStart.

◆ ENUMCLASS()

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

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.

Definition at line 14 of file species_tags.h.

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

◆ find_species_index() [1/4]

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

Definition at line 639 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 643 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 648 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 369 of file species_tags.cc.

References ARTS_ASSERT.

◆ is_normal_isotopologue()

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

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

References set_isot_val.

Referenced by define_wsv_data(), and isotopologue_ratiosInitFromBuiltin().

◆ 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().

Referenced by Species::detail::isot().

◆ 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 1127 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

◆ parse_tag()

SpeciesTag Species::parse_tag ( std::string_view  text)

Definition at line 90 of file species_tags.cc.

References ARTS_USER_ERROR_IF, find_species_index(), is_predefined_model(), Isotopologues, and Joker.

Referenced by parse_tags().

◆ parse_tags()

Array< Tag > Species::parse_tags ( std::string_view  text)

Parse a list of species tags into an Array<Tag>

This is the function call that ArrayOfSpeciesTag uses to create itself from a string_view, but it also performs vital error checking necessary for ARTS internals

Parameters
textA textual representation of comma-separated species tags
Returns
Array<Tag> List of species tags with no constraints

Definition at line 162 of file species_tags.cc.

References parse_tag().

◆ 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 682 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 657 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 653 of file isotopologues.h.

References find_species_index(), and Isotopologues.

Referenced by select_joker(), and select_joker().

◆ select_joker() [1/2]

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

Definition at line 662 of file isotopologues.h.

References Joker, and 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 666 of file isotopologues.h.

References Joker, and select().

◆ start_positions()

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

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