37 if (
type == EnergyLevelMapType::Tensor3_t) {
38 }
else if (
type == EnergyLevelMapType::Vector_t) {
42 }
else if (
type == EnergyLevelMapType::Numeric_t) {
46 }
else if (
type == EnergyLevelMapType::None_t) {
54 [](
const auto& val) { return val >= 0; });
60 const Index& line_index)
const
63 "Must have Numeric_t, input type is bad");
69 for (
size_t i=0; i<
levels.size(); i++) {
72 if (lt == Quantum::Number::StateMatchType::Level and lt.low) {
74 x.r_low =
value(i, 0, 0, 0);
77 if (lt == Quantum::Number::StateMatchType::Level and lt.upp) {
79 x.r_upp =
value(i, 0, 0, 0);
82 if (found1 and found2)
94 "Must have Numeric_t, input type is bad");
103 if (lt == Quantum::Number::StateMatchType::Level and lt.low) {
105 x.T_low =
value(i, 0, 0, 0);
109 if (lt == Quantum::Number::StateMatchType::Level and lt.upp) {
111 x.T_upp =
value(i, 0, 0, 0);
115 if (found1 and found2) {
124 levels(std::move(levels_)),
125 vib_energy(std::move(energies)),
126 value(std::move(data))
133 levels(std::move(levels_)),
134 vib_energy(std::move(energies)),
135 value(data.nrows(), 1, 1, data.ncols())
143 levels(std::move(levels_)),
144 vib_energy(std::move(energies)),
145 value(data.nelem(), 1, 1, 1)
155 "Must have Tensor3_t, input type is bad");
163 for (
Index itnlte = 0; itnlte < nnlte; itnlte++)
166 p, lat, lon, itw_field);
173 if (
type == EnergyLevelMapType::Numeric_t)
176 ,
"Must have Vector_t, input type is bad");
179 "Bad dims for data:\n\tThe pressure dim of data contains: ",
180 value.
ncols(),
" values and you are requesting element index ", ip,
"\n")
182 EnergyLevelMap elm(EnergyLevelMapType::Numeric_t, 1, 1, 1, *
this);
188 return os << elm.
type <<
'\n'
196 if (
type == EnergyLevelMapType::None_t or
type == EnergyLevelMapType::Numeric_t)
199 "Must have Tensor3_t, input type is bad");
201 auto elm =
EnergyLevelMap(EnergyLevelMapType::Numeric_t, 1, 1, 1, *
this);
210 "Only \"None\", \"Numeric\", \"Vector\", and \"Tensor3\" types accepted\n"
211 "You request to have an EnergyLevelMap of type: ",
Index nelem() const ARTS_NOEXCEPT
Index ncols() const noexcept
Index nrows() const noexcept
Index nbooks() const noexcept
Index npages() const noexcept
Index nelem() const noexcept
Returns the number of elements.
Iterator1D begin() ARTS_NOEXCEPT
Return iterator to first element.
Iterator1D end() ARTS_NOEXCEPT
Return iterator behind last element.
#define ARTS_USER_ERROR_IF(condition,...)
EnergyLevelMapType toEnergyLevelMapTypeOrThrow(std::string_view s)
std::ostream & operator<<(std::ostream &os, const EnergyLevelMap &elm)
Class to map energy levels.
constexpr EnergyLevelMapType toEnergyLevelMapType(std::string_view s) noexcept
constexpr std::string_view toString(EnergyLevelMapType x) noexcept
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
void interp_atmfield_gp2itw(Matrix &itw, const Index &atmosphere_dim, const ArrayOfGridPos &gp_p, const ArrayOfGridPos &gp_lat, const ArrayOfGridPos &gp_lon)
Converts atmospheric grid positions to weights for interpolation of an atmospheric field.
void interp_atmfield_by_itw(VectorView x, const Index &atmosphere_dim, ConstTensor3View x_field, const ArrayOfGridPos &gp_p, const ArrayOfGridPos &gp_lat, const ArrayOfGridPos &gp_lon, ConstMatrixView itw)
Interpolates an atmospheric field with pre-calculated weights by interp_atmfield_gp2itw.
Header file for special_interp.cc.
Array< SingleLine > lines
A list of individual lines.
QuantumIdentifier quantumidentity
Catalog ID.
bool OK() const ARTS_NOEXCEPT
EnergyLevelMap operator[](Index ip) const
Output2 get_ratio_params(const AbsorptionLines &band, const Index &line_index) const
Get the output required for Population::NLTE.
Output4 get_vibtemp_params(const AbsorptionLines &band, const Numeric T) const
Get the output required for Population::NLTE-VibrationalTemperatures.
EnergyLevelMap InterpToGridPos(Index atmosphere_dim, const ArrayOfGridPos &p, const ArrayOfGridPos &lat, const ArrayOfGridPos &lon) const
ArrayOfQuantumIdentifier levels
void ThrowIfNotOK() const ARTS_NOEXCEPT
EnergyLevelMap operator()(Index ip, Index ilat, Index ilon) const
StateMatchType operates so that a check less than a level should be 'better', bar None.