ARTS 2.5.4 (git: 31ce4f0e)
absorptionlines.h
Go to the documentation of this file.
1/* Copyright (C) 2019
2 Richard Larsson <ric.larsson@gmail.com>
3
4
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the
7 Free Software Foundation; either version 2, or (at your option) any
8 later version.
9
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
20 USA. */
21
32#ifndef absorptionlines_h
33#define absorptionlines_h
34
35#include "bifstream.h"
36#include "bofstream.h"
37#include "enums.h"
38#include "jacobian.h"
39#include "lineshapemodel.h"
40#include "matpack.h"
41#include "quantum_numbers.h"
42#include "species_tags.h"
43#include "zeemandata.h"
44
45#include <utility>
46#include <vector>
47
48
50namespace Absorption {
55ENUMCLASS(MirroringType, char,
56 None, // No mirroring
57 Lorentz, // Mirror, but use Lorentz line shape
58 SameAsLineShape, // Mirror using the same line shape
59 Manual // Mirror by having a line in the array of line record with negative F0
60) // MirroringType
61
62#pragma GCC diagnostic push
63#pragma GCC diagnostic ignored "-Wreturn-type"
64constexpr std::string_view mirroringtype2metadatastring(MirroringType in) noexcept {
65 switch (in) {
66 case MirroringType::None:
67 return "These lines are not mirrored at 0 Hz.\n";
68 case MirroringType::Lorentz:
69 return "These lines are mirrored around 0 Hz using the Lorentz line shape.\n";
70 case MirroringType::SameAsLineShape:
71 return "These line are mirrored around 0 Hz using the original line shape.\n";
72 case MirroringType::Manual:
73 return "There are manual line entries in the catalog to mirror this line.\n";
74 case MirroringType::FINAL: break;
75 }
76}
77#pragma GCC diagnostic pop
78
83ENUMCLASS(NormalizationType, char,
84 None, // Do not renormalize the line shape
85 VVH, // Renormalize with Van Vleck and Huber specifications
86 VVW, // Renormalize with Van Vleck and Weiskopf specifications
87 RQ, // Renormalize using Rosenkranz's quadratic specifications
88 SFS // Renormalize using simple frequency scaling of the line strength
89) // NormalizationType
90
91#pragma GCC diagnostic push
92#pragma GCC diagnostic ignored "-Wreturn-type"
93constexpr std::string_view normalizationtype2metadatastring(NormalizationType in) {
94 switch (in) {
95 case NormalizationType::None:
96 return "No re-normalization in the far wing will be applied.\n";
97 case NormalizationType::VVH:
98 return "van Vleck and Huber far-wing renormalization will be applied, "
99 "i.e. F ~ (f tanh(hf/2kT))/(f0 tanh(hf0/2kT))\n";
100 case NormalizationType::VVW:
101 return "van Vleck and Weisskopf far-wing renormalization will be applied, "
102 "i.e. F ~ (f/f0)^2\n";
103 case NormalizationType::RQ:
104 return "Rosenkranz quadratic far-wing renormalization will be applied, "
105 "i.e. F ~ hf0/2kT sinh(hf0/2kT) (f/f0)^2\n";
106 case NormalizationType::SFS:
107 return "Simple frequency scaling of the far-wings will be applied, "
108 "i.e. F ~ (f / f0) * ((1 - exp(- hf / kT)) / (1 - exp(- hf0 / kT)))\n";
109 case NormalizationType::FINAL: break;
110 }
111}
112#pragma GCC diagnostic pop
113
118ENUMCLASS(PopulationType, char,
119 LTE, // Assume band is in LTE
120 NLTE, // Assume band is in NLTE and the upper-to-lower ratio is known
121 VibTemps, // Assume band is in NLTE described by vibrational temperatures and LTE at other levels
122 ByHITRANRosenkranzRelmat, // Assume band needs to compute relaxation matrix to derive HITRAN Y-coefficients
123 ByHITRANFullRelmat, // Assume band needs to compute and directly use the relaxation matrix according to HITRAN
124 ByMakarovFullRelmat, // Assume band needs to compute and directly use the relaxation matrix according to Makarov et al 2020
125 ByRovibLinearDipoleLineMixing // Assume band needs to compute and directly use the relaxation matrix according to Hartmann, Boulet, Robert, 2008, 1st edition
126) // PopulationType
127
128#pragma GCC diagnostic push
129#pragma GCC diagnostic ignored "-Wreturn-type"
130constexpr std::string_view populationtype2metadatastring(PopulationType in) {
131 switch (in) {
132 case PopulationType::LTE:
133 return "The lines are considered as in pure LTE.\n";
134 case PopulationType::ByMakarovFullRelmat:
135 return "The lines requires relaxation matrix calculations in LTE - Makarov et al 2020 full method.\n";
136 case PopulationType::ByRovibLinearDipoleLineMixing:
137 return "The lines requires relaxation matrix calculations in LTE - Hartmann, Boulet, Robert, 2008, 1st edition method.\n";
138 case PopulationType::ByHITRANFullRelmat:
139 return "The lines requires relaxation matrix calculations in LTE - HITRAN full method.\n";
140 case PopulationType::ByHITRANRosenkranzRelmat:
141 return "The lines requires Relaxation matrix calculations in LTE - HITRAN Rosenkranz method.\n";
142 case PopulationType::VibTemps:
143 return "The lines are considered as in NLTE by vibrational temperatures.\n";
144 case PopulationType::NLTE:
145 return "The lines are considered as in pure NLTE.\n";
146 case PopulationType::FINAL: return "There's an error";
147 }
148}
149#pragma GCC diagnostic pop
150
151constexpr bool relaxationtype_relmat(PopulationType in) noexcept {
152 return in == PopulationType::ByHITRANFullRelmat or
153 in == PopulationType::ByMakarovFullRelmat or
154 in == PopulationType::ByHITRANRosenkranzRelmat or
155 in == PopulationType::ByRovibLinearDipoleLineMixing;
156}
157
159ENUMCLASS(CutoffType, char,
160 None, // No cutoff frequency at all
161 ByLine // The cutoff frequency is at SingleLine::F0 plus the cutoff frequency plus the speed independent pressure shift
162) // CutoffType
163
165
170
173
176
178 Numeric glow{};
179
181 Numeric gupp{};
182
185
188
190 LineShape::Model lineshape{};
191
194
208 Numeric I0_=0,
209 Numeric E0_=0,
210 Numeric glow_=0,
211 Numeric gupp_=0,
212 Numeric A_=0,
215 Quantum::Number::LocalState localquanta_={}) :
216 F0(F0_),
217 I0(I0_),
218 E0(E0_),
219 glow(glow_),
220 gupp(gupp_),
221 A(A_),
222 zeeman(zeeman_),
223 lineshape(std::move(lineshape_)),
224 localquanta(std::move(localquanta_)) {}
225
232 lineshape(std::move(metamodel)), localquanta(std::move(metaquanta)) {}
233
237
239 [[nodiscard]] Index LineShapeElems() const noexcept {return lineshape.nelem();}
240
242 [[nodiscard]] Index LocalQuantumElems() const noexcept {return localquanta.val.nelem();}
243
247
254 void SetAutomaticZeeman(QuantumIdentifier qid);
255
260 void SetLineMixing2SecondOrderData(const Vector& d);
261
266 void SetLineMixing2AER(const Vector& d);
267
269 bifstream& read(bifstream& bif);
270
272 bofstream& write(bofstream& bof) const;
273
274 friend std::ostream& operator<<(std::ostream&, const SingleLine&);
275
276 friend std::istream& operator>>(std::istream&, SingleLine&);
277}; // SingleLine
278
281 bool bad=true;
282 bool selfbroadening=false;
283 bool bathbroadening=false;
284 CutoffType cutoff=CutoffType::None;
285 MirroringType mirroring=MirroringType::None;
286 PopulationType population=PopulationType::LTE;
287 NormalizationType normalization=NormalizationType::None;
288 LineShape::Type lineshapetype=LineShape::Type::DP;
295};
296
297struct Lines {
298 static constexpr Index version = 2;
299
302
305
307 CutoffType cutoff;
308
310 MirroringType mirroring;
311
313 PopulationType population;
314
316 NormalizationType normalization;
317
319 LineShape::Type lineshapetype;
320
323
326
329
332
335
338
355 Lines(bool selfbroadening_=false,
356 bool bathbroadening_=false,
357 CutoffType cutoff_=CutoffType::None,
358 MirroringType mirroring_=MirroringType::None,
359 PopulationType population_=PopulationType::LTE,
360 NormalizationType normalization_=NormalizationType::None,
361 LineShape::Type lineshapetype_=LineShape::Type::DP,
362 Numeric T0_=296,
363 Numeric cutofffreq_=-1,
364 Numeric linemixinglimit_=-1,
365 QuantumIdentifier quantumidentity_=QuantumIdentifier(),
366 ArrayOfSpecies broadeningspecies_={},
367 Array<SingleLine> lines_={}) :
368 selfbroadening(selfbroadening_),
369 bathbroadening(bathbroadening_),
370 cutoff(cutoff_),
371 mirroring(mirroring_),
372 population(population_),
373 normalization(normalization_),
374 lineshapetype(lineshapetype_),
375 T0(T0_),
376 cutofffreq(cutofffreq_),
377 linemixinglimit(linemixinglimit_),
378 quantumidentity(std::move(quantumidentity_)),
379 broadeningspecies(std::move(broadeningspecies_)),
380 lines(std::move(lines_)) {
382 if (bathbroadening) broadeningspecies.back() = Species::Species::Bath;
383 }
384
403 Lines(bool selfbroadening_,
404 bool bathbroadening_,
405 size_t nlines,
406 CutoffType cutoff_,
407 MirroringType mirroring_,
408 PopulationType population_,
409 NormalizationType normalization_,
410 LineShape::Type lineshapetype_,
411 Numeric T0_,
412 Numeric cutofffreq_,
413 Numeric linemixinglimit_,
414 QuantumIdentifier quantumidentity_,
415 ArrayOfSpecies broadeningspecies_,
416 const Quantum::Number::LocalState& metalocalquanta,
417 const LineShape::Model& metamodel) :
418 selfbroadening(selfbroadening_),
419 bathbroadening(bathbroadening_),
420 cutoff(cutoff_),
421 mirroring(mirroring_),
422 population(population_),
423 normalization(normalization_),
424 lineshapetype(lineshapetype_),
425 T0(T0_),
426 cutofffreq(cutofffreq_),
427 linemixinglimit(linemixinglimit_),
428 quantumidentity(std::move(quantumidentity_)),
429 broadeningspecies(std::move(broadeningspecies_)),
430 lines(nlines, SingleLine(metalocalquanta, metamodel)) {
432 if (bathbroadening) broadeningspecies.back() = Species::Species::Bath;
433 }
434
447 void AppendSingleLine(SingleLine&& sl);
448
461 void AppendSingleLine(const SingleLine& sl);
462
468 [[nodiscard]] bool MatchWithExternal(const SingleLineExternal& sle, const QuantumIdentifier& quantumidentity) const ARTS_NOEXCEPT;
469
476 [[nodiscard]] std::pair<bool, bool> Match(const Lines& l) const noexcept;
477
479 void sort_by_frequency();
480
482 void sort_by_einstein();
483
485 [[nodiscard]] String SpeciesName() const noexcept;
486
488 [[nodiscard]] String LineShapeMetaData() const noexcept;
489
491 [[nodiscard]] Species::Species Species() const noexcept {return quantumidentity.Species();}
492
494 [[nodiscard]] Species::IsotopeRecord Isotopologue() const noexcept {return quantumidentity.Isotopologue();}
495
497 [[nodiscard]] Index NumLines() const noexcept {return Index(lines.size());}
498
501
503 [[nodiscard]] Index NumBroadeners() const noexcept {return Index(broadeningspecies.nelem());}
504
506 [[nodiscard]] Index NumLocalQuanta() const noexcept {
507 return lines.size() ? lines.front().localquanta.val.nelem() : 0;}
508
514 [[nodiscard]] Index ZeemanCount(size_t k, Zeeman::Polarization type) const noexcept;
515
522 [[nodiscard]] Numeric ZeemanStrength(size_t k, Zeeman::Polarization type, Index i) const noexcept;
523
530 [[nodiscard]] Numeric ZeemanSplitting(size_t k, Zeeman::Polarization type, Index i) const noexcept;
531
533 void SetAutomaticZeeman() noexcept;
534
540 [[nodiscard]] Numeric F_mean(Numeric T=0) const noexcept;
541
547 [[nodiscard]] Numeric F_mean(const ConstVectorView& wgts) const noexcept;
548
550 [[nodiscard]] bool OnTheFlyLineMixing() const noexcept {
551 return population == PopulationType::ByMakarovFullRelmat or
552 population == PopulationType::ByRovibLinearDipoleLineMixing;
553 }
554
560 [[nodiscard]] bool DoLineMixing(Numeric P) const noexcept {
561 return linemixinglimit < 0 ? true : linemixinglimit > P;
562 }
563
564 [[nodiscard]] bool DoVmrDerivative(const QuantumIdentifier& qid) const noexcept {
565 return qid.Isotopologue() == quantumidentity.Isotopologue() or
566 (qid.Isotopologue().joker() and qid.Species() == quantumidentity.Species()) or
567 std::any_of(broadeningspecies.begin(), broadeningspecies.end(), [s=qid.Species()](auto& a){return a == s;});
568 }
569
571 [[nodiscard]] bool AnyLinemixing() const noexcept {
572 for (auto& line : lines) {
573 for (auto& shape : line.lineshape.Data()) {
574 if (shape.Y().type not_eq LineShape::TemperatureModel::None or
575 shape.G().type not_eq LineShape::TemperatureModel::None or
576 shape.DV().type not_eq LineShape::TemperatureModel::None) {
577 return true;
578 }
579 }
580 }
581 return false;
582 }
583
592 [[nodiscard]] LineShape::Output ShapeParameters(size_t k, Numeric T, Numeric P, const Vector& vmrs) const noexcept;
593
602 [[nodiscard]] LineShape::Output ShapeParameters(size_t k, Numeric T, Numeric P, size_t m) const noexcept;
603
612 [[nodiscard]] LineShape::Output ShapeParameters_dT(size_t k, Numeric T, Numeric P, const Vector& vmrs) const noexcept;
613
619 [[nodiscard]] Index LineShapePos(const Species::Species spec) const noexcept;
620
626 [[nodiscard]] Index LineShapePos(const QuantumIdentifier& qid) const noexcept {
627 return LineShapePos(qid.Species());
628 }
629
638 [[nodiscard]] LineShape::Output ShapeParameters_dVMR(size_t k, Numeric T, Numeric P,
639 const QuantumIdentifier& vmr_qid) const noexcept;
640
650 [[nodiscard]] Numeric ShapeParameter_dInternal(size_t k, Numeric T, Numeric P,
651 const Vector& vmrs,
652 const RetrievalQuantity& derivative) const noexcept;
653
659 [[nodiscard]] Numeric CutoffFreq(size_t k, Numeric shift=0) const noexcept;
660
666 [[nodiscard]] Numeric CutoffFreqMinus(size_t k, Numeric shift=0) const noexcept;
667
669 [[nodiscard]] Index BroadeningSpeciesPosition(Species::Species spec) const noexcept {
670 if (auto ptr = std::find(broadeningspecies.cbegin(),
671 broadeningspecies.cend(), spec); ptr not_eq broadeningspecies.cend())
672 return std::distance(broadeningspecies.cbegin(), ptr);
673 return -1;
674 }
675
677 [[nodiscard]] String MetaData() const;
678
680 void RemoveLine(Index) noexcept;
681
683 SingleLine PopLine(Index) noexcept;
684
686 void ReverseLines() noexcept;
687
689 [[nodiscard]] Numeric SpeciesMass() const noexcept;
690
697 [[nodiscard]] Vector BroadeningSpeciesVMR(const ConstVectorView&, const ArrayOfArrayOfSpeciesTag&) const;
698
706 [[nodiscard]] Vector BroadeningSpeciesMass(const ConstVectorView&, const ArrayOfArrayOfSpeciesTag&, const SpeciesIsotopologueRatios&, const Numeric& bath_mass=0) const;
707
714 [[nodiscard]] Numeric SelfVMR(const ConstVectorView&, const ArrayOfArrayOfSpeciesTag&) const;
715
718
720 bofstream& write(bofstream& os) const;
721
722 [[nodiscard]] bool OK() const noexcept;
723
724 [[nodiscard]] Numeric DopplerConstant(Numeric T) const noexcept;
725
726 [[nodiscard]] QuantumIdentifier QuantumIdentityOfLine(Index k) const noexcept;
727
728 [[nodiscard]] Rational max(QuantumNumberType) const;
729
730 friend std::ostream& operator<<(std::ostream&, const Lines&);
731
732 friend std::istream& operator>>(std::istream&, Lines&);
733}; // Lines
734
741
748
755
813
869
884
893
939
950std::vector<Lines> split_list_of_external_lines(std::vector<SingleLineExternal>& external_lines,
951 const std::vector<QuantumNumberType>& localquantas={},
952 const std::vector<QuantumNumberType>& globalquantas={});
953
955inline Index nelem(const Lines& l) {return l.NumLines();}
956
958inline Index nelem(const Array<Lines>& l) {Index n=0; for (auto& x:l) n+=nelem(x); return n;}
959
961inline Index nelem(const Array<Array<Lines>>& l) {Index n=0; for (auto& x:l) n+=nelem(x); return n;}
962
973
982
988[[nodiscard]] bool any_cutoff(const Array<Array<Lines>>& abs_lines_per_species);
989} // namespace Absorption
990
996
997using AbsorptionNormalizationType = Absorption::NormalizationType;
998using AbsorptionPopulationType = Absorption::PopulationType;
999using AbsorptionMirroringType = Absorption::MirroringType;
1000using AbsorptionCutoffType = Absorption::CutoffType;
1001
1003 bool None{false}, Lorentz{false}, SameAsLineShape{false}, Manual{false};
1005 friend std::ostream& operator<<(std::ostream&, AbsorptionMirroringTagTypeStatus);
1006};
1007
1009 bool None{false}, VVH{false}, VVW{false}, RQ{false}, SFS{false};
1011 friend std::ostream& operator<<(std::ostream&, AbsorptionNormalizationTagTypeStatus);
1012};
1013
1015 bool LTE{false}, NLTE{false}, VibTemps{false},
1016 ByHITRANRosenkranzRelmat{false}, ByHITRANFullRelmat{false},
1017 ByMakarovFullRelmat{false}, ByRovibLinearDipoleLineMixing{false};
1019 friend std::ostream& operator<<(std::ostream&, AbsorptionPopulationTagTypeStatus);
1020};
1021
1023 bool None{false}, ByLine{false};
1025 friend std::ostream& operator<<(std::ostream&, AbsorptionCutoffTagTypeStatus);
1026};
1027
1029 bool DP{false}, LP{false}, VP{false}, SDVP{false}, HTP{false};
1031 friend std::ostream& operator<<(std::ostream&, AbsorptionLineShapeTagTypeStatus);
1032};
1033
1040
1042 : mirroring(lines),
1043 normalization(lines),
1044 population(lines),
1045 cutoff(lines),
1046 lineshapetype(lines) {}
1047 friend std::ostream& operator<<(std::ostream&, AbsorptionTagTypesStatus);
1048};
1049
1054
1057};
1058
1067 Index i,
1068 const ArrayOfArrayOfSpeciesTag& abs_species,
1069 const ArrayOfArrayOfAbsorptionLines& abs_lines_per_species);
1070
1071#endif // absorptionlines_h
Absorption::CutoffType AbsorptionCutoffType
Absorption::NormalizationType AbsorptionNormalizationType
Absorption::PopulationType AbsorptionPopulationType
Absorption::MirroringType AbsorptionMirroringType
AbsorptionSpeciesBandIndex flat_index(Index i, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species)
Get a flat index pair for species and band.
This file contains the class declaration of bifstream.
This file contains the class declaration of bofstream.
Index nelem() const ARTS_NOEXCEPT
Definition: array.h:92
A constant view of a Vector.
Definition: matpackI.h:512
Main line shape model class.
Deals with internal derivatives, Jacobian definition, and OEM calculations.
Definition: jacobian.h:325
The Vector class.
Definition: matpackI.h:899
Main Zeeman Model.
Definition: zeemandata.h:296
Binary output file stream class.
Definition: bifstream.h:43
Binary output file stream class.
Definition: bofstream.h:42
#define ARTS_NOEXCEPT
Definition: debug.h:80
Routines for setting up the jacobian.
#define nlines
Contains the line shape namespace.
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
Namespace to contain things required for absorption calculations.
constexpr bool relaxationtype_relmat(PopulationType in) noexcept
SingleLineExternal ReadFromHitranOnlineStream(istream &is)
Read from HITRAN online.
ENUMCLASS(MirroringType, char, None, Lorentz, SameAsLineShape, Manual) const expr std
Describes the type of mirroring line effects.
String cutofftype2metadatastring(CutoffType in, Numeric cutoff)
SingleLineExternal ReadFromJplStream(istream &is)
Read from JPL.
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::ostream & operator<<(std::ostream &os, const Absorption::Lines &lines)
std::istream & operator>>(std::istream &is, Lines &lines)
Numeric cutoff
SingleLineExternal ReadFromArtscat5Stream(istream &is)
Read from ARTSCAT-5.
bool any_cutoff(const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species)
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 Numeric k
Boltzmann constant convenience name [J/K].
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
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.
VectorView std(VectorView std, const Vector &y, const ArrayOfVector &ys, const Index start, const Index end_tmp)
Compute the standard deviation of the ranged ys.
Definition: raw.cc:205
Polarization
Zeeman polarization selection.
Definition: zeemandata.h:44
void read(HitranRelaxationMatrixData &hitran, ArrayOfAbsorptionLines &bands, const SpeciesIsotopologueRatios &isotopologue_ratio, const String &basedir, const Numeric linemixinglimit, const Numeric fmin, const Numeric fmax, const Numeric stot, const ModeOfLineMixing mode)
Read from HITRAN online line mixing file.
Quantum::Number::GlobalState QuantumIdentifier
Quantum::Number::Type QuantumNumberType
#define N
Definition: rng.cc:164
Helper struct for flat_index.
Index iband
The band index in abs_lines_per_species[ispecies].
Index ispecies
The species index in abs_species/abs_lines_per_species.
AbsorptionNormalizationTagTypeStatus normalization
AbsorptionPopulationTagTypeStatus population
AbsorptionLineShapeTagTypeStatus lineshapetype
AbsorptionCutoffTagTypeStatus cutoff
AbsorptionMirroringTagTypeStatus mirroring
AbsorptionTagTypesStatus(const ArrayOfArrayOfAbsorptionLines &lines)
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 BroadeningSpeciesPosition(Species::Species spec) const noexcept
Position of species if available or -1 else.
Numeric T0
Reference temperature for all parameters of the lines.
PopulationType population
Line population distribution.
Index NumLocalQuanta() const noexcept
Number of broadening species.
static constexpr Index version
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.
bool bathbroadening
Does the line broadening have bath broadening.
Lines(bool selfbroadening_, bool bathbroadening_, size_t nlines, CutoffType cutoff_, MirroringType mirroring_, PopulationType population_, NormalizationType normalization_, LineShape::Type lineshapetype_, Numeric T0_, Numeric cutofffreq_, Numeric linemixinglimit_, QuantumIdentifier quantumidentity_, ArrayOfSpecies broadeningspecies_, const Quantum::Number::LocalState &metalocalquanta, const LineShape::Model &metamodel)
XML-tag initialization.
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.
bool OK() const noexcept
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.
Numeric linemixinglimit
linemixing limit
Index NumBroadeners() const noexcept
Number of broadening species.
Numeric DopplerConstant(Numeric T) const noexcept
bool OnTheFlyLineMixing() const noexcept
On-the-fly line mixing.
NormalizationType normalization
Line normalization type.
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.
Species::IsotopeRecord Isotopologue() const noexcept
Isotopologue Index.
String LineShapeMetaData() const noexcept
Meta data for the line shape if it exists.
LineShape::Type lineshapetype
Type of line shape.
void MakeLineShapeModelCommon()
Make a common line shape if possible.
String SpeciesName() const noexcept
Species Name.
Numeric cutofffreq
cutoff frequency
MirroringType mirroring
Mirroring type.
CutoffType cutoff
cutoff type, by band or by line
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.
ArrayOfSpecies broadeningspecies
A list of broadening species.
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.
bool AnyLinemixing() const noexcept
Lines(bool selfbroadening_=false, bool bathbroadening_=false, CutoffType cutoff_=CutoffType::None, MirroringType mirroring_=MirroringType::None, PopulationType population_=PopulationType::LTE, NormalizationType normalization_=NormalizationType::None, LineShape::Type lineshapetype_=LineShape::Type::DP, Numeric T0_=296, Numeric cutofffreq_=-1, Numeric linemixinglimit_=-1, QuantumIdentifier quantumidentity_=QuantumIdentifier(), ArrayOfSpecies broadeningspecies_={}, Array< SingleLine > lines_={})
Default initialization.
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.
bool DoLineMixing(Numeric P) const noexcept
Returns if the pressure should do line mixing.
Index LineShapePos(const QuantumIdentifier &qid) const noexcept
Position among broadening species or -1.
bool selfbroadening
Does the line broadening have self broadening.
Rational max(QuantumNumberType) const
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.
bool DoVmrDerivative(const QuantumIdentifier &qid) const noexcept
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.
Computations and data for a single absorption line.
SingleLine(Quantum::Number::LocalState metaquanta, LineShape::Model metamodel)
Initialization for constant sizes.
Index LocalQuantumElems() const noexcept
Number of lower quantum numbers.
Index LineShapeElems() const noexcept
Number of lineshape elements.
SingleLine(Numeric F0_=0, Numeric I0_=0, Numeric E0_=0, Numeric glow_=0, Numeric gupp_=0, Numeric A_=0, Zeeman::Model zeeman_=Zeeman::Model(), LineShape::Model lineshape_=LineShape::Model(), Quantum::Number::LocalState localquanta_={})
Default initialization.
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.
Implements rational numbers to work with other ARTS types.
Definition: rational.h:43
Struct containing all information needed about one isotope.
Definition: isotopologues.h:16
#define d
#define a
Headers and class definition of Zeeman modeling.