21 if (
value.npages() not_eq 1 or
value.nrows() not_eq 1) {
25 if (
value.npages() not_eq 1 or
value.nrows() not_eq 1 or
value.ncols() not_eq 1) {
29 if (
value.npages() not_eq 0 or
value.nrows() not_eq 0 or
value.ncols() not_eq 0) {
36 [](
const auto& val) { return val >= 0; });
42 const Index& line_index)
const
45 "Must have Numeric_t, input type is bad");
51 for (
size_t i=0; i<
levels.size(); i++) {
54 if (lt == Quantum::Number::StateMatchType::Level and lt.low) {
56 x.r_low =
value(i, 0, 0, 0);
59 if (lt == Quantum::Number::StateMatchType::Level and lt.upp) {
61 x.r_upp =
value(i, 0, 0, 0);
64 if (found1 and found2)
73 const Numeric T)
const
76 "Must have Numeric_t, input type is bad");
85 if (lt == Quantum::Number::StateMatchType::Level and lt.low) {
87 x.T_low =
value(i, 0, 0, 0);
91 if (lt == Quantum::Number::StateMatchType::Level and lt.upp) {
93 x.T_upp =
value(i, 0, 0, 0);
97 if (found1 and found2) {
106 levels(
std::move(levels_)),
107 vib_energy(
std::move(energies)),
108 value(
std::move(data))
115 levels(
std::move(levels_)),
116 vib_energy(
std::move(energies)),
117 value(data.nrows(), 1, 1, data.ncols())
119 value(joker, 0, 0, joker) = data;
125 levels(
std::move(levels_)),
126 vib_energy(
std::move(energies)),
127 value(data.nelem(), 1, 1, 1)
129 value(joker, 0, 0, 0) = data;
137 "Must have Tensor3_t, input type is bad");
145 for (Index itnlte = 0; itnlte < nnlte; itnlte++)
147 value(itnlte, joker, joker, joker),
148 p, lat, lon, itw_field);
158 ,
"Must have Vector_t, input type is bad");
161 "Bad dims for data:\n\tThe pressure dim of data contains: ",
162 value.ncols(),
" values and you are requesting element index ", ip,
"\n")
165 elm.
value(joker, 0, 0, 0) =
value(joker, 0, 0, ip);
170 return os << elm.
type <<
'\n'
181 "Must have Tensor3_t, input type is bad");
184 elm.value(joker, 0, 0, 0) =
value(joker, ip, ilat, ilon);
192 "Only \"None\", \"Numeric\", \"Vector\", and \"Tensor3\" types accepted\n"
193 "You request to have an EnergyLevelMap of type: ",
Index nelem() const ARTS_NOEXCEPT
#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
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.