10#include "matpack_data.h"
28 Numeric lower_freq{-1};
32 Numeric upper_freq{-1};
35 TagType type{TagType::FINAL};
39 Species cia_2nd_species{Species::FINAL};
41 constexpr Tag()
noexcept =
default;
44 explicit Tag(std::string_view text);
52 [[nodiscard]]
String Name()
const;
58 ARTS_ASSERT(ind < 0,
"Bad species extracted from: ", ir)
62 [[nodiscard]]
constexpr Numeric Mass()
const noexcept {
return Isotopologue().mass;}
64 [[nodiscard]] Numeric Q(Numeric T)
const;
66 [[nodiscard]] Numeric dQdT(Numeric T)
const;
68 [[nodiscard]]
String FullName()
const noexcept {
return Isotopologue().FullName();}
70 [[nodiscard]]
constexpr Species Spec()
const noexcept {
return Isotopologue().spec;}
72 [[nodiscard]]
constexpr TagType Type()
const noexcept {
return type;}
74 friend std::ostream&
operator<<(std::ostream& os,
const Tag& ot) {
return os << ot.Name();}
76 constexpr bool operator==(
const Tag& other)
const noexcept {
77 return other.spec_ind == spec_ind and
78 other.lower_freq == lower_freq and
79 other.upper_freq == upper_freq and
80 other.type == type and
81 other.cia_2nd_species == cia_2nd_species;
84 constexpr bool operator!=(
const Tag& other)
const noexcept {
85 return not operator==(other);
107 std::fill(this->begin(), this->end(), x);
112 this->resize(A.size());
113 std::copy(A.begin(), A.end(), this->begin());
126 for (
auto& x: ot) {
if (not first) os <<
' ';
else first =
false; os << x;}
132 ARTS_ASSERT(size() not_eq 0,
"Invalid ArrayOfSpeciesTag without any species")
138 ARTS_ASSERT(size() not_eq 0,
"Invalid ArrayOfSpeciesTag without any species")
139 return operator[](0).Type();
142 [[nodiscard]]
String Name() const;
144 [[nodiscard]]
bool Plain() const noexcept {
145 return std::any_of(cbegin(), cend(), [](
auto& spec){
return spec.Type() == Species::TagType::Plain;});
148 [[nodiscard]]
bool Zeeman() const noexcept {
149 return std::any_of(cbegin(), cend(), [](
auto& spec){
return spec.Type() == Species::TagType::Zeeman;});
152 [[nodiscard]]
bool RequireLines() const noexcept {
153 return Plain() or
Zeeman();
156 [[nodiscard]]
bool FreeElectrons() const noexcept {
157 return std::any_of(cbegin(), cend(), [](
auto& spec){
return spec.Type() == Species::TagType::FreeElectrons;});
160 [[nodiscard]]
bool Particles() const noexcept {
161 return std::any_of(cbegin(), cend(), [](
auto& spec){
return spec.Type() == Species::TagType::Particles;});
173 FreeElectrons{
false},
238 const Vector& rtp_vmr,
std::ostream & operator<<(std::ostream &os, AbsorptionCutoffTagTypeStatus val)
This file contains the definition of Array.
ArrayOfSpeciesTag() noexcept
ArrayOfSpeciesTag(ArrayOfSpeciesTag &&A) noexcept
ArrayOfSpeciesTag & operator=(SpeciesTag x)
ArrayOfSpeciesTag & operator=(ArrayOfSpeciesTag &&A) noexcept
friend std::ostream & operator<<(std::ostream &os, const ArrayOfSpeciesTag &ot)
ArrayOfSpeciesTag(const ArrayOfSpeciesTag &A)=default
Species::Species Species() const ARTS_NOEXCEPT
ArrayOfSpeciesTag(Index n, const SpeciesTag &fillvalue)
ArrayOfSpeciesTag(std::vector< SpeciesTag > x)
ArrayOfSpeciesTag & operator=(const ArrayOfSpeciesTag &A)
ArrayOfSpeciesTag(Index n)
This can be used to make arrays out of anything.
Array & operator=(base x)
const SpeciesTag & operator[](const Index n) const
#define ARTS_ASSERT(condition,...)
#define ENUMCLASS(ENUMTYPE, TYPE,...)
This file contains the definition of String, the ARTS string class.
constexpr Species spec(std::string_view part, std::string_view orig)
Array< Tag > parse_tags(std::string_view text)
Parse a list of species tags into an Array<Tag>
constexpr bool is_predefined_model(const IsotopeRecord &ir) noexcept
constexpr std::array Isotopologues
A list of all ARTS isotopologues, note how the species enum class input HAS to be sorted.
Numeric first_vmr(const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &rtp_vmr, const Species spec) ARTS_NOEXCEPT
constexpr Index find_species_index(const Species spec, const std::string_view isot) noexcept
constexpr std::string_view Joker
Implements Zeeman modeling.
Struct to test of an ArrayOfArrayOfSpeciesTag contains a tagtype.
Struct containing all information needed about one isotope.