45 auto x = lines[k].lineshape.GetParams(T, T0, P,
vmrs);
47 if (not DoLineMixing(P)) x.Y = x.G = x.DV = 0;
53 return lines[k].lineshape.GetParams(T, T0, P, m);
57 auto x = lines[k].lineshape.GetTemperatureDerivs(T, T0, P,
vmrs);
59 if (not DoLineMixing(P)) x.Y = x.G = x.DV = 0;
66 if(selfbroadening and spec == quantumidentity.Species()) {
71 const Index s = selfbroadening;
72 const Index e = broadeningspecies.nelem() - bathbroadening;
73 for(
Index i=s; i<e; i++) {
74 if(spec == broadeningspecies[i]) {
81 return broadeningspecies.nelem()-1;
86 const Index pos=LineShapePos(vmr_qid);
88 return lines[k].lineshape.GetVMRDerivs(T, T0, P, pos);
89 return LineShape::Output{};
93 const auto self = derivative.Mode() == LineShape::self_broadening;
94 const auto bath = derivative.Mode() == LineShape::bath_broadening;
95 const auto& ls = lines[k].lineshape;
97 if(derivative.QuantumIdentity().Species() not_eq
Species() or
98 derivative.QuantumIdentity().Isotopologue() not_eq Isotopologue())
100 if(self and selfbroadening)
101 return ls.GetInternalDeriv(
102 T, T0, P, 0,
vmrs, derivative.LineType());
104 return ls.GetInternalDeriv(
105 T, T0, P, LineShapePos(derivative.QuantumIdentity().Species()),
vmrs, derivative.LineType());
106 if(bath and bathbroadening)
107 return ls.GetInternalDeriv(
108 T, T0, P, ls.nelem() - 1,
vmrs, derivative.LineType());
111 return ls.GetInternalDeriv(
112 T, T0, P, LineShapePos(derivative.QuantumIdentity().Species()),
vmrs, derivative.LineType());
133 if (is.eof())
return data;
145 if (line.
nelem() == 0 && is.eof())
return data;
158 istringstream icecream(line);
163 if (artsid.length() != 0) {
166 ARTS_USER_ERROR_IF (isotopologue.is_joker() or isotopologue.type not_eq Species::TagType::Plain,
167 "A line catalog species can only be of the form \"Plain\", meaning it\nhas the form SPECIES-ISONUM.\n"
168 "Your input contains: ", artsid,
". which we cannot interpret as a plain species")
209 for (
Index j = 0; j < naux; j++) {
224 }
catch (
const std::runtime_error&) {
228 if (tgam != data.
T0) {
229 agam = agam *
pow(tgam / data.
T0, nair);
230 sgam = sgam *
pow(tgam / data.
T0, nself);
260 if (is.eof())
return data;
272 if (line.
nelem() == 0 && is.eof())
return data;
285 istringstream icecream(line);
290 if (artsid.length() != 0) {
294 ARTS_USER_ERROR_IF (isotopologue.is_joker() or isotopologue.type not_eq Species::TagType::Plain,
295 "A line catalog species can only be of the form \"Plain\", meaning it\nhas the form SPECIES-ISONUM.\n"
296 "Your input contains: ", artsid,
". which we cannot interpret as a plain species")
339 bool lmd_found =
false;
351 if (is.eof())
return data;
363 if (line.
nelem() == 0 && is.eof())
return data;
376 istringstream icecream(line);
382 if (artsid.length() != 0) {
385 ARTS_USER_ERROR_IF (isotopologue.is_joker() or isotopologue.type not_eq Species::TagType::Plain,
386 "A line catalog species can only be of the form \"Plain\", meaning it\nhas the form SPECIES-ISONUM.\n"
387 "Your input contains: ", artsid,
". which we cannot interpret as a plain species")
427 }
else if (token ==
"QN") {
432 "Unknown quantum number tag: ", token)
436 while (icecream and token not_eq
"LO") {
437 auto qn = Quantum::Number::toType(token);
453 "Error in catalog. Lower quantum number tag 'LO' not found.")
456 auto qn = Quantum::Number::toType(token);
457 while (icecream and not (token ==
"LM" or token ==
"LF" or token ==
"ZM" or token ==
"LSM" or token ==
"PB")) {
471 qn = Quantum::Number::toType(token);
473 }
else if (token ==
"LM") {
477 }
else if (token ==
"LF") {
486 }
else if (token ==
"ZM") {
490 }
else if (token ==
"LSM") {
499 if (token ==
"CUT") {
501 data.
cutoff = CutoffType::ByLine;
505 if (token ==
"LML") {
510 else if (token ==
"MTM") {
515 else if (token ==
"LNT") {
525 ARTS_USER_ERROR (
"Unknown line data tag in legacy reading routine: ", token)
529 }
catch (
const std::runtime_error& e) {
531 "Parse error in catalog line: \n",
532 line,
'\n', e.what())
550 data.
species[1] = Species::Species::Bath;
565 if (is.eof())
return data;
577 if (line.
nelem() == 0 && is.eof())
return data;
581 if (line[line.
nelem() - 1] == 13) {
582 line.erase(line.
nelem() - 1, 1);
607 constexpr Numeric w2Hz = Constant::c * 100.;
628 constexpr Numeric hi2arts = 1e-2 * Constant::c;
635 data.
line.
I0 = s * hi2arts;
653 constexpr Numeric w2Hz = Constant::c * 1e2;
661 agam = gam * hi2arts;
667 sgam = gam * hi2arts;
670 if (0 == sgam) sgam = agam;
706 constexpr Numeric w2Hz = Constant::c * 1e2;
815 data.
species[1] = Species::Species::Bath;
830 if (is.eof())
return data;
842 if (line.
nelem() == 0 && is.eof())
return data;
846 if (line[line.
nelem() - 1] == 13) {
847 line.erase(line.
nelem() - 1, 1);
872 constexpr Numeric w2Hz = Constant::c * 100.;
893 constexpr Numeric hi2arts = 1e-2 * Constant::c;
900 data.
line.
I0 = s * hi2arts;
918 constexpr Numeric w2Hz = Constant::c * 1e2;
926 agam = gam * hi2arts;
932 sgam = gam * hi2arts;
935 if (0 == sgam) sgam = agam;
971 constexpr Numeric w2Hz = Constant::c * 1e2;
1070 std::stringstream ss;
1072 ss >> upper >> lower;
1087 data.
species[1] = Species::Species::Bath;
1098 bool comment =
true;
1102 if (is.eof())
return data;
1114 if (line.
nelem() == 0 && is.eof())
return data;
1118 if (line[line.
nelem() - 1] == 13) {
1119 line.erase(line.
nelem() - 1, 1);
1144 constexpr Numeric w2Hz = Constant::c * 100.;
1166 constexpr Numeric hi2arts = 1e-2 * Constant::c;
1173 data.
line.
I0 = s * hi2arts;
1192 constexpr Numeric w2Hz = Constant::c * 1e2;
1200 agam = gam * hi2arts;
1206 sgam = gam * hi2arts;
1209 if (0 == sgam) sgam = agam;
1245 constexpr Numeric w2Hz = Constant::c * 1e2;
1335 bool comment =
true;
1339 if (is.eof())
return data;
1346 if (line[0] ==
'>' or line[0] ==
'%')
continue;
1352 if (line.
nelem() == 0 && is.eof())
return data;
1356 if (line[line.
nelem() - 1] == 13) {
1357 line.erase(line.
nelem() - 1, 1);
1381 constexpr Numeric w2Hz = Constant::c * 100.;
1403 constexpr Numeric hi2arts = 1e-2 * Constant::c;
1406 if (line[6] ==
'D') line[6] =
'E';
1412 data.
line.
I0 = s * hi2arts;
1431 constexpr Numeric w2Hz = Constant::c * 1e2;
1439 agam = gam * hi2arts;
1445 sgam = gam * hi2arts;
1448 if (0 == sgam) sgam = agam;
1484 constexpr Numeric w2Hz = Constant::c * 1e2;
1566 if (test == -1 || test == -3)
1586 "There is an error in the line mixing\n");
1699 const std::vector<QuantumNumberType>& localquantas,
1700 const std::vector<QuantumNumberType>& globalquantas)
1702 std::vector<Lines> lines(0);
1705 while(external_lines.size()) {
1706 auto& sle = external_lines.back();
1709 if (sle.selfbroadening) sle.species.front() = sle.quantumidentity.Species();
1710 if (sle.bathbroadening) sle.species.back() = Species::Species::Bath;
1713 for (
auto qn: globalquantas)
if (sle.quantumidentity.val.has(qn)) global_id.val.set(sle.quantumidentity.val[qn]);
1716 for (
auto qn: localquantas)
if (sle.quantumidentity.val.has(qn)) local_id.
val.
set(sle.quantumidentity.val[qn]);
1719 auto line = sle.line;
1720 line.localquanta = local_id;
1723 auto band = std::find_if(lines.begin(), lines.end(), [&](
const Lines& li){return li.MatchWithExternal(sle, global_id);});
1724 if (band not_eq lines.end()) {
1725 band -> AppendSingleLine(line);
1727 lines.push_back(
Lines(sle.selfbroadening, sle.bathbroadening, sle.cutoff,
1728 sle.mirroring, sle.population, sle.normalization,
1729 sle.lineshapetype, sle.T0, sle.cutofffreq,
1730 sle.linemixinglimit, global_id, sle.species, {line}));
1732 external_lines.pop_back();
1740 for(
auto& line: lines.
lines)
1746 for(
auto& line: lines.
lines)
1753 os << line.
F0 <<
' ' << line.
I0 <<
' ' << line.
E0 <<
' ' << line.
glow <<
' '
1754 << line.
gupp <<
' ' << line.
A <<
' ' << line.
zeeman <<
' '
1763 line.
gupp >> line.
A;
1788 std::ostringstream os;
1790 os <<
"\nLines meta-data:\n";
1791 os <<
'\t' <<
"Species identity:\n";
1792 os <<
"\t\tSpecies: "<< SpeciesName() <<
'\n';
1793 os <<
"\t\tIdentity: "<< quantumidentity <<
'\n';
1795 os <<
'\t' << populationtype2metadatastring(population);
1796 os <<
'\t' << normalizationtype2metadatastring(normalization);
1797 os <<
'\t' << LineShape::shapetype2metadatastring(lineshapetype);
1798 os <<
'\t' << mirroringtype2metadatastring(mirroring);
1799 os <<
'\t' <<
"The reference temperature for all line parameters is "
1801 if(linemixinglimit < 0)
1802 os <<
'\t' <<
"If applicable, there is no line mixing limit.\n";
1804 os <<
'\t' <<
"If applicable, there is a line mixing limit at "
1805 << linemixinglimit <<
" Pa.\n";
1807 if (not NumLines()) {
1808 os <<
"\tNo line data is available.\n";
1810 os <<
"\tThere are " << NumLines() <<
" lines available.\n";
1812 auto& line = lines.front();
1813 os <<
"\tThe front line has:\n";
1814 os <<
"\t\t" <<
"f0: " << line.F0 <<
" Hz\n";
1815 os <<
"\t\t" <<
"i0: " << line.I0 <<
" m^2/Hz\n";
1816 os <<
"\t\t" <<
"e0: " << line.E0 <<
" J\n";
1817 os <<
"\t\t" <<
"Lower stat. weight: " << line.glow <<
" [-]\n";
1818 os <<
"\t\t" <<
"Upper stat. weight: " << line.gupp <<
" [-]\n";
1819 os <<
"\t\t" <<
"A: " << line.A <<
" 1/s\n";
1820 os <<
"\t\t" <<
"Zeeman splitting of lower state: " << line.zeeman.gl() <<
" [-]\n";
1821 os <<
"\t\t" <<
"Zeeman splitting of upper state: " << line.zeeman.gu() <<
" [-]\n";
1822 os <<
"\t\t" <<
"Local quantum numbers: " << line.localquanta.val <<
"\n";
1828 os <<
"\t\t" <<
"Line shape parameters (are normalized by sum(VMR)):\n";
1829 for(
auto& ls_form: ls_meta)
1830 os <<
"\t\t\t" << ls_form <<
"\n";
1840 lines.erase(lines.begin() + i);
1846 auto line = lines[i];
1852 std::reverse(lines.begin(), lines.end());
1856 return quantumidentity.Isotopologue().mass;
1862 if (lineshapetype == LineShape::Type::DP)
1863 return Vector(broadeningspecies.nelem(), std::numeric_limits<Numeric>::quiet_NaN());
1873 if (lineshapetype == LineShape::Type::DP)
1874 return Vector(broadeningspecies.nelem(), std::numeric_limits<Numeric>::quiet_NaN());
1876 if (bathbroadening and bath_mass > 0)
mass[
mass.
nelem()-1] = bath_mass;
1884 "Bad species and vmr lists");
1893 if (not
iseven(Jf + lf + 1))
1894 return -
sqrt(2 * Jf + 1) *
wigner3j(Jf, k, Ji, li, lf - li, -lf);
1895 return +
sqrt(2 * Jf + 1) *
wigner3j(Jf, k, Ji, li, lf - li, -lf);
1900 return -
sqrt(6 * (2 * Jf + 1) * (2 * Ji + 1)) *
wigner6j(1, 1, 1, Ji, Jf,
N);
1901 return +
sqrt(6 * (2 * Jf + 1) * (2 * Ji + 1)) *
wigner6j(1, 1, 1, Ji, Jf,
N);
1919 bool comment =
true;
1923 if (is.eof())
return data;
1935 if (line.
nelem() == 0 && is.eof())
return data;
2021 tag = tag > 0 ? tag : -tag;
2081 const Index nb = broadeningspecies.nelem();
2084 if (not Isotopologue().OK())
return false;
2087 if (nb < (
Index(selfbroadening) +
Index(bathbroadening)))
2095 if (std::any_of(lines.cbegin(), lines.cend(), [nb](
auto& line){return line.LineShapeElems() != nb;}))
2099 if (std::any_of(lines.cbegin(), lines.cend(), [&](
auto& line){return line.LocalQuantumElems() != lines.front().LocalQuantumElems();}))
2108 return std::sqrt(Constant::doppler_broadening_const_squared * T / SpeciesMass());
2115 std::ostringstream os;
2117 case CutoffType::None:
2118 os <<
"No cut-off will be applied.\n";
break;
2119 case CutoffType::ByLine:
2120 os <<
"The lines will be cut-off " <<
cutoff <<
" Hz from the line center + D0.\n";
break;
2121 case CutoffType::FINAL:
break;
2177 "Error calling appending function, bad size of quantum numbers");
2180 sl.LineShapeElems() not_eq
lines[0].LineShapeElems(),
2181 "Error calling appending function, bad size of broadening species");
2183 lines.push_back(std::move(sl));
2189 "Error calling appending function, bad size of quantum numbers\n"
2190 "Type of quantum numbers in band: ",
lines.front().localquanta.val,
2197 "Error calling appending function, bad size of broadening species");
2199 lines.push_back(sl);
2205 if(sle.selfbroadening not_eq selfbroadening)
2207 if(sle.bathbroadening not_eq bathbroadening)
2209 if(sle.cutoff not_eq
cutoff)
2211 if(sle.mirroring not_eq mirroring)
2213 if(sle.population not_eq population)
2215 if(sle.normalization not_eq normalization)
2217 if(sle.lineshapetype not_eq lineshapetype)
2219 if(sle.T0 not_eq T0)
2221 if(sle.cutofffreq not_eq cutofffreq)
2223 if(sle.linemixinglimit not_eq linemixinglimit)
2225 if(quantumidentity not_eq qid)
2227 if(not std::equal(sle.species.cbegin(), sle.species.cend(), broadeningspecies.cbegin(), broadeningspecies.cend()))
2229 if(NumLines() not_eq 0 and not lines.front().localquanta.same_types_as(sle.line.localquanta))
2231 if(NumLines() not_eq 0 and not sle.line.lineshape.Match(lines.front().lineshape).first)
2238 if(
l.selfbroadening not_eq selfbroadening)
2239 return {
false,
false};
2240 if(
l.bathbroadening not_eq bathbroadening)
2241 return {
false,
false};
2243 return {
false,
false};
2244 if(
l.mirroring not_eq mirroring)
2245 return {
false,
false};
2246 if(
l.population not_eq population)
2247 return {
false,
false};
2248 if(
l.normalization not_eq normalization)
2249 return {
false,
false};
2250 if(
l.lineshapetype not_eq lineshapetype)
2251 return {
false,
false};
2253 return {
false,
false};
2254 if(
l.cutofffreq not_eq cutofffreq)
2255 return {
false,
false};
2256 if(
l.linemixinglimit not_eq linemixinglimit)
2257 return {
false,
false};
2258 if(
l.quantumidentity not_eq quantumidentity)
2259 return {
false,
false};
2260 if(not std::equal(
l.broadeningspecies.cbegin(),
l.broadeningspecies.cend(), broadeningspecies.cbegin(), broadeningspecies.cend()))
2261 return {
false,
false};
2262 if(NumLines() not_eq 0 and
l.NumLines() not_eq 0 and not lines.front().localquanta.same_types_as(
l.lines.front().localquanta))
2263 return {
false,
false};
2264 if(NumLines() not_eq 0 and
l.NumLines() not_eq 0) {
2265 if (
auto matchpair =
l.lines.front().lineshape.Match(lines.front().lineshape); not matchpair.first)
return matchpair;
2268 return {
true,
true};
2288 ARTS_ASSERT(qns.val.has(QuantumNumberType::F) or qns.val.has(QuantumNumberType::J))
2289 return qns.val.has(QuantumNumberType::F) ? qns.val[QuantumNumberType::F] : qns.val[QuantumNumberType::J];
2296 auto& val =
get(lines[k].localquanta);
2302 Index i)
const noexcept {
2306 auto& val =
get(lines[k].localquanta);
2307 return lines[k].zeeman.Strength(val.upp(), val.low(), type, i);
2312 Index i)
const noexcept {
2316 auto& val =
get(lines[k].localquanta);
2317 return lines[k].zeeman.Splitting(val.upp(), val.low(), type, i);
2321 for(
auto& line:
lines)
2326 const Numeric val = std::inner_product(lines.cbegin(), lines.cend(),
2327 wgts.begin(), 0.0, std::plus<>(),
2328 [](
const auto&
a,
const auto&
b){return a.F0 * b;});
2329 const Numeric div = wgts.sum();
2336 const Index n = NumLines();
2339 const Numeric ratiopart = QT0 / QT;
2342 for (
Index i=0; i<n; i++) {
2345 const Numeric dip_squared = - lines[i].I0/(pop0 * lines[i].F0 * std::expm1(- (Constant::h * lines[i].F0) / (Constant::k * T0)));
2346 wgts[i] = pop * dip_squared;
2349 return F_mean(wgts);
2352#pragma GCC diagnostic push
2353#pragma GCC diagnostic ignored "-Wreturn-type"
2356 case CutoffType::ByLine:
2357 return lines[k].F0 + cutofffreq + (mirroring == MirroringType::Manual ? - shift : shift);
2358 case CutoffType::None:
2360 case CutoffType::FINAL:
break;
2363#pragma GCC diagnostic pop
2365#pragma GCC diagnostic push
2366#pragma GCC diagnostic ignored "-Wreturn-type"
2369 case CutoffType::ByLine:
2370 return lines[k].F0 - cutofffreq + (mirroring == MirroringType::Manual ? - shift : shift);
2371 case CutoffType::None:
2372 return std::numeric_limits<Numeric>::lowest();
2373 case CutoffType::FINAL:
break;
2376#pragma GCC diagnostic pop
2379 for (
auto& line:
lines)
2385 for (
auto& line:
lines)
2392 for (
auto&
a: lines[k].localquanta.val) qid.
val.
set(
a);
2401 for (
Index j=0; j<m; j++) {
2405 LineShape::TemperatureModel t=LineShape::TemperatureModel::None;
2406 for (
auto& line :
lines) {
2408 if (t == LineShape::TemperatureModel::None) t = data.type;
2409 ARTS_USER_ERROR_IF(t not_eq data.type,
"Cannot make a common line shape model for the band as there are multiple non-empty types: ", data.type,
" and ", t)
2414 for (
auto& line :
lines) {
2415 if (
auto& data = line.lineshape[j].Data()[i]; data.type not_eq t) {
Numeric wavenumber_to_joule(Numeric e)
A little helper function to convert energy from units of wavenumber (cm^-1) to Joule (J).
Declarations required for the calculation of absorption coefficients.
std::ostream & operator<<(std::ostream &os, const ArrayOfAbsorptionLines &aol)
Contains the absorption namespace.
Index nelem() const ARTS_NOEXCEPT
Number of elements.
A constant view of a Vector.
Index nelem() const noexcept
Returns the number of elements.
Main line shape model class.
void SetLineMixingModel(SingleSpeciesModel x)
Sets the same line mixing model to all species.
bifstream & read(bifstream &bif)
Binary read for Model.
bofstream & write(bofstream &bof) const
Binary write for Model.
const std::vector< SingleSpeciesModel > & Data() const noexcept
The line shape model data.
void set(Value v)
Sets the value if it exists or adds it otherwise.
Index nelem() const
Return number of quantum numbers.
bool has(Types... ts) const ARTS_NOEXCEPT
Returns whether all the Types are part of the list, the types must be sorted.
Value & add(Type t)
Add for manipulation.
Implements rational numbers to work with other ARTS types.
Deals with internal derivatives, Jacobian definition, and OEM calculations.
Binary output file stream class.
Binary output file stream class.
Input manipulator class for doubles to enable nan and inf parsing.
Index nelem() const
Number of elements.
Constants of physical expressions as constexpr.
Helper macros for debugging.
#define ARTS_ASSERT(condition,...)
#define ARTS_USER_ERROR(...)
#define ARTS_USER_ERROR_IF(condition,...)
constexpr bool good_enum(EnumType x) noexcept
Checks if the enum number is good.
This file contains basic functions to handle ASCII files.
Numeric boltzman_factor(Numeric T, Numeric E0)
Computes exp(- E0/kT)
Numeric boltzman_ratio(const Numeric &T, const Numeric &T0, const Numeric &E0)
Computes exp(E0/c (T - T0) / (T * T0))
Numeric single_partition_function(const Numeric &T, const Species::IsotopeRecord &ir)
Computes the partition function at one temperature.
Constains various line scaling functions.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
void extract(T &x, String &line, Index n)
Extract something from the beginning of a string.
Namespace to contain things required for absorption calculations.
std::ostream & operator<<(std::ostream &, const SingleLine &)
SingleLineExternal ReadFromHitranOnlineStream(istream &is)
Read from HITRAN online.
String cutofftype2metadatastring(CutoffType in, Numeric cutoff)
SingleLineExternal ReadFromJplStream(istream &is)
Read from JPL.
const Quantum::Number::Value & get(const Quantum::Number::LocalState &qns) ARTS_NOEXCEPT
Numeric reduced_rovibrational_dipole(Rational Jf, Rational Ji, Rational lf, Rational li, Rational k=Rational(1))
Compute the reduced rovibrational dipole moment.
SingleLineExternal ReadFromArtscat3Stream(istream &is)
Read from ARTSCAT-3.
Index nelem(const Lines &l)
Number of lines.
SingleLineExternal ReadFromLBLRTMStream(istream &is)
Read from LBLRTM.
std::istream & operator>>(std::istream &, SingleLine &)
SingleLineExternal ReadFromArtscat5Stream(istream &is)
Read from ARTSCAT-5.
Numeric reduced_magnetic_quadrapole(Rational Jf, Rational Ji, Rational N)
Compute the reduced magnetic quadrapole moment.
SingleLineExternal ReadFromHitran2004Stream(istream &is)
Read from newer HITRAN.
SingleLineExternal ReadFromHitran2001Stream(istream &is)
Read from HITRAN before 2004.
SingleLineExternal ReadFromArtscat4Stream(istream &is)
Read from ARTSCAT-4.
std::vector< Lines > split_list_of_external_lines(std::vector< SingleLineExternal > &external_lines, const std::vector< QuantumNumberType > &localquantas={}, const std::vector< QuantumNumberType > &globalquantas={})
Splits a list of lines into proper Lines.
constexpr auto pow2(T x) noexcept -> decltype(x *x)
power of two
constexpr auto atm2pa(T x) noexcept -> decltype(x *101 '325.0)
Conversion from Atm to Pa.
QuantumIdentifier id_from_lookup(Index mol, char isochar)
Finds the ID of the ARTS species from HITRAN.
Numeric ratio_from_lookup(Index mol, char isochar)
Finds the isotopologue ratio of the species from HITRAN.
constexpr Numeric l(const Index p0, const Index n, const Numeric x, const SortedVectorType &xi, const Index j, const std::pair< Numeric, Numeric > cycle={ -180, 180}) noexcept
QuantumIdentifier id_from_lookup(Index tag)
Finds the ID of the ARTS species from JPL.
Model vector2modellm(Vector x, LegacyLineMixingData::TypeLM type)
LineShape::Model from legacy input vector.
ArrayOfString ModelMetaDataArray(const Model &m, const bool self, const ArrayOfSpecies &sts, const Numeric T0)
Model lblrtm_model(Numeric sgam, Numeric nself, Numeric agam, Numeric nair, Numeric psf, std::array< Numeric, 12 > aer_interp)
constexpr ModelParameters modelparameterGetEmpty(const TemperatureModel t) noexcept
std::istream & from_linefunctiondata(std::istream &data, Type &type, bool &self, bool &bath, Model &m, ArrayOfSpecies &species)
constexpr bool modelparameterEmpty(const ModelParameters mp) noexcept
Model hitran_model(Numeric sgam, Numeric nself, Numeric agam, Numeric nair, Numeric psf)
Vector mass(const ConstVectorView &atmospheric_vmrs, const ArrayOfArrayOfSpeciesTag &atmospheric_species, const ArrayOfSpecies &lineshape_species, const SpeciesIsotopologueRatios &ir) ARTS_NOEXCEPT
Returns a mass vector for this model's main calculations.
std::istream & from_pressurebroadeningdata(std::istream &data, LineShape::Type &type, bool &self, bool &bath, Model &m, ArrayOfSpecies &species, const QuantumIdentifier &qid)
Legacy reading of old deprecated PressureBroadeningData class.
String ModelShape2MetaData(const Model &m)
std::istream & from_artscat4(std::istream &is, Type &type, bool &self, bool &bath, Model &m, ArrayOfSpecies &species, const QuantumIdentifier &qid)
std::istream & from_linemixingdata(std::istream &data, Model &lsc)
Legacy reading of old deprecated LineMixingData class.
constexpr Index nVars
Current max number of line shape variables.
Vector vmrs(const ConstVectorView &atmospheric_vmrs, const ArrayOfArrayOfSpeciesTag &atmospheric_species, const ArrayOfSpecies &lineshape_species) ARTS_NOEXCEPT
Returns a VMR vector for this model's main calculations.
ValueList from_hitran(std::string_view upp, std::string_view low)
String update_isot_name(const String &old_name)
Updates the name of the isotopologue based on updates of the isotopologues.
constexpr Index find_species_index(const Species spec, const std::string_view isot) noexcept
constexpr Index nelem(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the number of elements of the polarization type of this transition.
Polarization
Zeeman polarization selection.
invlib::Vector< ArtsVector > Vector
invlib wrapper type for ARTS vectors.
Numeric pow(const Rational base, Numeric exp)
Power of.
Numeric sqrt(const Rational r)
Square root.
constexpr bool iseven(const Rational r) noexcept
Returns true if even integer.
void sort_by_einstein()
Sort inner line list by Einstein coefficient.
void sort_by_frequency()
Sort inner line list by frequency.
Numeric ZeemanSplitting(size_t k, Zeeman::Polarization type, Index i) const noexcept
Returns the splitting of a Zeeman split line.
SingleLine PopLine(Index) noexcept
Pops a single line.
Index NumLocalQuanta() const noexcept
Number of broadening species.
void RemoveLine(Index) noexcept
Removes a single line.
Numeric F_mean(Numeric T=0) const noexcept
Mean frequency by weight of line strength.
void SetAutomaticZeeman() noexcept
Set Zeeman effect for all lines that have the correct quantum numbers.
Vector BroadeningSpeciesVMR(const ConstVectorView &, const ArrayOfArrayOfSpeciesTag &) const
Returns the VMRs of the broadening species.
LineShape::Output ShapeParameters_dT(size_t k, Numeric T, Numeric P, const Vector &vmrs) const noexcept
Line shape parameters temperature derivatives.
LineShape::Output ShapeParameters_dVMR(size_t k, Numeric T, Numeric P, const QuantumIdentifier &vmr_qid) const noexcept
Line shape parameters vmr derivative.
Array< SingleLine > lines
A list of individual lines.
Numeric ShapeParameter_dInternal(size_t k, Numeric T, Numeric P, const Vector &vmrs, const RetrievalQuantity &derivative) const noexcept
Line shape parameter internal derivative.
Index NumLines() const noexcept
Number of lines.
bofstream & write(bofstream &os) const
Binary write for Lines.
Index NumBroadeners() const noexcept
Number of broadening species.
Numeric DopplerConstant(Numeric T) const noexcept
QuantumIdentifier QuantumIdentityOfLine(Index k) const noexcept
bifstream & read(bifstream &is)
Binary read for Lines.
LineShape::Output ShapeParameters(size_t k, Numeric T, Numeric P, const Vector &vmrs) const noexcept
Line shape parameters.
bool MatchWithExternal(const SingleLineExternal &sle, const QuantumIdentifier &quantumidentity) const ARTS_NOEXCEPT
Checks if an external line matches this structure.
String LineShapeMetaData() const noexcept
Meta data for the line shape if it exists.
void MakeLineShapeModelCommon()
Make a common line shape if possible.
String SpeciesName() const noexcept
Species Name.
Numeric CutoffFreq(size_t k, Numeric shift=0) const noexcept
Returns cutoff frequency or maximum value.
void ReverseLines() noexcept
Reverses the order of the internal lines.
std::pair< bool, bool > Match(const Lines &l) const noexcept
Checks if another line list matches this structure.
void AppendSingleLine(SingleLine &&sl)
Appends a single line to the absorption lines.
Numeric SelfVMR(const ConstVectorView &, const ArrayOfArrayOfSpeciesTag &) const
Returns the VMR of the species.
Numeric CutoffFreqMinus(size_t k, Numeric shift=0) const noexcept
Returns negative cutoff frequency or lowest value.
String MetaData() const
Returns a printable statement about the lines.
Index ZeemanCount(size_t k, Zeeman::Polarization type) const noexcept
Returns the number of Zeeman split lines.
Numeric SpeciesMass() const noexcept
Mass of the molecule.
Index LineShapePos(const Species::Species spec) const noexcept
Position among broadening species or -1.
QuantumIdentifier quantumidentity
Catalog ID.
Numeric ZeemanStrength(size_t k, Zeeman::Polarization type, Index i) const noexcept
Returns the strength of a Zeeman split line.
Vector BroadeningSpeciesMass(const ConstVectorView &, const ArrayOfArrayOfSpeciesTag &, const SpeciesIsotopologueRatios &, const Numeric &bath_mass=0) const
Returns the mass of the broadening species.
Single line reading output.
QuantumIdentifier quantumidentity
NormalizationType normalization
LineShape::Type lineshapetype
Computations and data for a single absorption line.
Numeric E0
Lower state energy level.
bofstream & write(bofstream &bof) const
Binary write for AbsorptionLines.
bifstream & read(bifstream &bif)
Binary read for AbsorptionLines.
Numeric F0
Central frequency.
Quantum::Number::LocalState localquanta
Local quantum numbers.
LineShape::Model lineshape
Line shape model.
void SetAutomaticZeeman(QuantumIdentifier qid)
Set Zeeman effect by automatic detection.
Zeeman::Model zeeman
Zeeman model.
Numeric A
Einstein spontaneous emission coefficient.
Index LocalQuantumElems() const noexcept
Number of lower quantum numbers.
Numeric glow
Lower level statistical weight.
void SetLineMixing2AER(const Vector &d)
Set the line mixing model to AER kind.
Numeric gupp
Upper level statistical weight.
Index LineShapeElems() const noexcept
Number of lineshape elements.
void SetLineMixing2SecondOrderData(const Vector &d)
Set the line mixing model to 2nd order.
Numeric I0
Reference intensity.
Coefficients and temperature model for SingleSpeciesModel.
A logical struct for global quantum numbers with species identifiers.
Species::Species Species() const noexcept
Species::IsotopeRecord Isotopologue() const noexcept
A logical struct for local quantum numbers.
A complete quantum number value with type information.
constexpr void set(std::string_view s, bool upp)
Set level value.
String FullName() const noexcept
Numeric wigner6j(const Rational j1, const Rational j2, const Rational j3, const Rational l1, const Rational l2, const Rational l3)
Wigner 6J symbol.
Numeric wigner3j(const Rational j1, const Rational j2, const Rational j3, const Rational m1, const Rational m2, const Rational m3)
Wigner 3J symbol.