Go to the documentation of this file.
35 throw std::runtime_error(
"Must have Numeric_t, input type is bad");
41 for (
size_t i=0; i<
mlevels.size(); i++) {
52 if (found1 and found2)
60 const Index& line_index,
64 throw std::runtime_error(
"Must have Numeric_t, input type is bad");
83 if (found1 and found2) {
93 mvib_energy(energies),
102 mvib_energy(energies),
112 mvib_energy(energies),
123 else if (
mtype not_eq EnergyLevelMapType::Tensor3_t)
124 throw std::runtime_error(
"Must have Tensor3_t, input type is bad");
132 for (
Index itnlte = 0; itnlte < nnlte; itnlte++)
146 throw std::runtime_error(
"Must have Vector_t, input type is bad");
149 std::ostringstream os;
150 os <<
"Bad dims for data:\n\tThe pressure dim of data contains: "
151 <<
mvalue.
ncols() <<
" values and you are requesting element index " << ip <<
"\n";
152 throw std::runtime_error(os.str());
162 return EnergyLevelMapType::Tensor3_t;
163 else if (s ==
"Vector")
165 else if (s ==
"Numeric")
167 else if (s ==
"None")
170 std::ostringstream os;
171 os <<
"Only \"None\", \"Numeric\", \"Vector\", and \"Tensor3\" types accepted\n"
172 <<
"You request to have an EnergyLevelMap of type: " << s <<
'\n';
173 throw std::runtime_error(os.str());
180 case EnergyLevelMapType::Tensor3_t:
195 << elm.
Data() <<
'\n'
203 else if (
mtype not_eq EnergyLevelMapType::Tensor3_t)
204 throw std::runtime_error(
"Must have Tensor3_t, input type is bad");
Index atmosphere_dim(Workspace &ws) noexcept
Class to map energy levels.
Output2 get_ratio_params(const AbsorptionLines &band, const Index &line_index) const
Get the output required for Population::NLTE.
Numeric lat(Workspace &ws) noexcept
Output4 get_vibtemp_params(const AbsorptionLines &band, const Index &line_index, const Numeric T) const
Get the output required for Population::NLTE-VibrationalTemperatures.
const Vector & Energies() const noexcept
Energy level type.
const Tensor4 & Data() const noexcept
Energy level type.
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.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
bool id_in_line_lower(const Lines &band, const QuantumIdentifier &id, size_t line_index)
Checks if the external quantum identifier match a line's ID.
bool id_in_line_upper(const Lines &band, const QuantumIdentifier &id, size_t line_index)
Checks if the external quantum identifier match a line's ID.
String energylevelmaptype2string(EnergyLevelMapType type)
Numeric lon(Workspace &ws) noexcept
Index nelem(const Lines &l)
Number of lines.
const ArrayOfQuantumIdentifier & Levels() const noexcept
Energy level type.
void ThrowIfNotOK() const
EnergyLevelMapType Type() const noexcept
Energy level type.
Index ncols() const
Returns the number of columns.
NUMERIC Numeric
The type to use for all floating point numbers.
ArrayOfQuantumIdentifier mlevels
EnergyLevelMap operator[](Index ip) const
EnergyLevelMapType string2energylevelmaptype(const String &s)
Index nrows(Workspace &ws) noexcept
EnergyLevelMap InterpToGridPos(Index atmosphere_dim, const ArrayOfGridPos &p, const ArrayOfGridPos &lat, const ArrayOfGridPos &lon) const
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.
std::ostream & operator<<(std::ostream &os, const EnergyLevelMap &elm)
Header file for special_interp.cc.
EnergyLevelMap operator()(Index ip, Index ilat, Index ilon) const
Vector x(Workspace &ws) noexcept
INDEX Index
The type to use for all integer numbers and indices.
Index ncols(Workspace &ws) noexcept
Index nelem() const
Number of elements.