ARTS 2.5.0 (git: 9ee3ac6c)
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
37#include "bofstream.h"
38
39#include "enums.h"
40
41#include "lineshapemodel.h"
42
43#include "matpack.h"
44
45#include "quantum.h"
46
47#include "zeemandata.h"
48
49#include <vector>
50
51
53namespace Absorption {
58ENUMCLASS(MirroringType, char,
59 None, // No mirroring
60 Lorentz, // Mirror, but use Lorentz line shape
61 SameAsLineShape, // Mirror using the same line shape
62 Manual // Mirror by having a line in the array of line record with negative F0
63) // MirroringType
64
65#pragma GCC diagnostic push
66#pragma GCC diagnostic ignored "-Wreturn-type"
67constexpr std::string_view mirroringtype2metadatastring(MirroringType in) noexcept {
68 switch (in) {
70 return "These lines are not mirrored at 0 Hz.\n";
71 case MirroringType::Lorentz:
72 return "These lines are mirrored around 0 Hz using the Lorentz line shape.\n";
73 case MirroringType::SameAsLineShape:
74 return "These line are mirrored around 0 Hz using the original line shape.\n";
75 case MirroringType::Manual:
76 return "There are manual line entries in the catalog to mirror this line.\n";
77 case MirroringType::FINAL: break;
78 }
79}
80#pragma GCC diagnostic pop
81
86ENUMCLASS(NormalizationType, char,
87 None, // Do not renormalize the line shape
88 VVH, // Renormalize with Van Vleck and Huber specifications
89 VVW, // Renormalize with Van Vleck and Weiskopf specifications
90 RQ, // Renormalize using Rosenkranz's quadratic specifications
91 SFS // Renormalize using simple frequency scaling of the line strength
92) // NormalizationType
93
94#pragma GCC diagnostic push
95#pragma GCC diagnostic ignored "-Wreturn-type"
96constexpr std::string_view normalizationtype2metadatastring(NormalizationType in) {
97 switch (in) {
99 return "No re-normalization in the far wing will be applied.\n";
100 case NormalizationType::VVH:
101 return "van Vleck and Huber far-wing renormalization will be applied, "
102 "i.e. F ~ (f tanh(hf/2kT))/(f0 tanh(hf0/2kT))\n";
103 case NormalizationType::VVW:
104 return "van Vleck and Weisskopf far-wing renormalization will be applied, "
105 "i.e. F ~ (f/f0)^2\n";
106 case NormalizationType::RQ:
107 return "Rosenkranz quadratic far-wing renormalization will be applied, "
108 "i.e. F ~ hf0/2kT sinh(hf0/2kT) (f/f0)^2\n";
109 case NormalizationType::SFS:
110 return "Simple frequency scaling of the far-wings will be applied, "
111 "i.e. F ~ (f / f0) * ((1 - exp(- hf / kT)) / (1 - exp(- hf0 / kT)))\n";
112 case NormalizationType::FINAL: break;
113 }
114}
115#pragma GCC diagnostic pop
116
121ENUMCLASS(PopulationType, char,
122 LTE, // Assume band is in LTE
123 NLTE, // Assume band is in NLTE and the upper-to-lower ratio is known
124 VibTemps, // Assume band is in NLTE described by vibrational temperatures and LTE at other levels
125 ByHITRANRosenkranzRelmat, // Assume band needs to compute relaxation matrix to derive HITRAN Y-coefficients
126 ByHITRANFullRelmat, // Assume band needs to compute and directly use the relaxation matrix according to HITRAN
127 ByMakarovFullRelmat, // Assume band needs to compute and directly use the relaxation matrix according to Makarov et al 2020
128 ByRovibLinearDipoleLineMixing // Assume band needs to compute and directly use the relaxation matrix according to Hartmann, Boulet, Robert, 2008, 1st edition
129) // PopulationType
130
131#pragma GCC diagnostic push
132#pragma GCC diagnostic ignored "-Wreturn-type"
133constexpr std::string_view populationtype2metadatastring(PopulationType in) {
134 switch (in) {
135 case PopulationType::LTE:
136 return "The lines are considered as in pure LTE.\n";
137 case PopulationType::ByMakarovFullRelmat:
138 return "The lines requires relaxation matrix calculations in LTE - Makarov et al 2020 full method.\n";
139 case PopulationType::ByRovibLinearDipoleLineMixing:
140 return "The lines requires relaxation matrix calculations in LTE - Hartmann, Boulet, Robert, 2008, 1st edition method.\n";
141 case PopulationType::ByHITRANFullRelmat:
142 return "The lines requires relaxation matrix calculations in LTE - HITRAN full method.\n";
143 case PopulationType::ByHITRANRosenkranzRelmat:
144 return "The lines requires Relaxation matrix calculations in LTE - HITRAN Rosenkranz method.\n";
145 case PopulationType::VibTemps:
146 return "The lines are considered as in NLTE by vibrational temperatures.\n";
147 case PopulationType::NLTE:
148 return "The lines are considered as in pure NLTE.\n";
149 case PopulationType::FINAL: return "There's an error";
150 }
151}
152#pragma GCC diagnostic pop
153
154constexpr bool relaxationtype_relmat(PopulationType in) noexcept {
155 return in == PopulationType::ByHITRANFullRelmat or
156 in == PopulationType::ByMakarovFullRelmat or
157 in == PopulationType::ByHITRANRosenkranzRelmat or
158 in == PopulationType::ByRovibLinearDipoleLineMixing;
159}
160
162ENUMCLASS(CutoffType, char,
163 None, // No cutoff frequency at all
164 ByLine // The cutoff frequency is at SingleLine::F0 plus the cutoff frequency plus the speed independent pressure shift
165) // CutoffType
166
168
171private:
173 Numeric mF0{};
174
176 Numeric mI0{};
177
179 Numeric mE0{};
180
182 Numeric mglow{};
183
185 Numeric mgupp{};
186
189
191 Zeeman::Model mzeeman{};
192
194 LineShape::Model mlineshape{};
195
197 std::vector<Rational> mlowerquanta{};
198
200 std::vector<Rational> mupperquanta{};
201
202public:
217 Numeric I0=0,
218 Numeric E0=0,
219 Numeric glow=0,
220 Numeric gupp=0,
221 Numeric A=0,
224 std::vector<Rational> lowerquanta={},
225 std::vector<Rational> upperquanta={}) :
226 mF0(F0),
227 mI0(I0),
228 mE0(E0),
229 mglow(glow),
230 mgupp(gupp),
231 mA(A),
232 mzeeman(zeeman),
233 mlineshape(std::move(lineshape)),
234 mlowerquanta(std::move(lowerquanta)),
235 mupperquanta(std::move(upperquanta)) {}
236
242 SingleLine(size_t nbroadeners, size_t nquanta, LineShape::Model metamodel) :
243 mlineshape(std::move(metamodel)), mlowerquanta(nquanta), mupperquanta(nquanta) {
244 ARTS_USER_ERROR_IF(Index(nbroadeners) not_eq mlineshape.nelem(),
245 "Mismatch between broadeners and model");
246 }
247
251
253 [[nodiscard]] Index LineShapeElems() const noexcept {return mlineshape.nelem();}
254
256 [[nodiscard]] Index LowerQuantumElems() const noexcept {return mlowerquanta.size();}
257
259 [[nodiscard]] Index UpperQuantumElems() const noexcept {return mupperquanta.size();}
260
264
266 [[nodiscard]] Numeric F0() const noexcept {return mF0;}
267
269 [[nodiscard]] Numeric E0() const noexcept {return mE0;}
270
272 [[nodiscard]] Numeric I0() const noexcept {return mI0;}
273
275 [[nodiscard]] Numeric A() const noexcept {return mA;}
276
278 [[nodiscard]] Numeric g_low() const noexcept {return mglow;}
279
281 [[nodiscard]] Numeric g_upp() const noexcept {return mgupp;}
282
284 [[nodiscard]] Zeeman::Model Zeeman() const noexcept {return mzeeman;}
285
287 [[nodiscard]] const LineShape::Model& LineShape() const noexcept {return mlineshape;}
288
290 [[nodiscard]] const std::vector<Rational>& LowerQuantumNumbers() const noexcept {return mlowerquanta;}
291
293 [[nodiscard]] const std::vector<Rational>& UpperQuantumNumbers() const noexcept {return mupperquanta;}
294
298
300 Numeric& F0() noexcept {return mF0;}
301
303 Numeric& E0() noexcept {return mE0;}
304
306 Numeric& I0() noexcept {return mI0;}
307
309 Numeric& A() noexcept {return mA;}
310
312 Numeric& g_low() noexcept {return mglow;}
313
315 Numeric& g_upp() noexcept {return mgupp;}
316
318 Zeeman::Model& Zeeman() noexcept {return mzeeman;}
319
321 LineShape::Model& LineShape() noexcept {return mlineshape;}
322
324 std::vector<Rational>& LowerQuantumNumbers() noexcept {return mlowerquanta;}
325
327 std::vector<Rational>& UpperQuantumNumbers() noexcept {return mupperquanta;}
328
332
334 void F0(Numeric x) noexcept {mF0 = x;}
335
337 void E0(Numeric x) noexcept {mE0 = x;}
338
340 void I0(Numeric x) noexcept {mI0 = x;}
341
343 void A(Numeric x) noexcept {mA = x;}
344
346 void g_low(Numeric x) noexcept {mglow = x;}
347
349 void g_upp(Numeric x) noexcept {mgupp = x;}
350
354
356 [[nodiscard]] Rational LowerQuantumNumber(size_t i) const noexcept {return mlowerquanta[i];}
357
359 [[nodiscard]] Rational UpperQuantumNumber(size_t i) const noexcept {return mupperquanta[i];}
360
362 Rational& LowerQuantumNumber(size_t i) noexcept {return mlowerquanta[i];}
363
365 Rational& UpperQuantumNumber(size_t i) noexcept {return mupperquanta[i];}
366
368 [[nodiscard]] bool SameQuantumNumbers(const SingleLine& sl) const noexcept;
369
373
381 void SetAutomaticZeeman(QuantumIdentifier qid, const std::vector<QuantumNumberType>& keys);
382
387 void SetLineMixing2SecondOrderData(const Vector& d);
388
393 void SetLineMixing2AER(const Vector& d);
394
396 bifstream& read(bifstream& bif);
397
399 bofstream& write(bofstream& bof) const;
400}; // SingleLine
401
402std::ostream& operator<<(std::ostream&, const SingleLine&);
403
404std::istream& operator>>(std::istream&, SingleLine&);
405
408 bool bad=true;
409 bool selfbroadening=false;
410 bool bathbroadening=false;
413 PopulationType population=PopulationType::LTE;
415 LineShape::Type lineshapetype=LineShape::Type::DP;
422};
423
424class Lines {
425public:
426 static constexpr Index version = 1;
427private:
430
433
435 CutoffType mcutoff;
436
438 MirroringType mmirroring;
439
441 PopulationType mpopulation;
442
444 NormalizationType mnormalization;
445
448
451
454
457
460
462 std::vector<QuantumNumberType> mlocalquanta;
463
466
468 std::vector<SingleLine> mlines;
469
470public:
488 Lines(bool selfbroadening=false,
489 bool bathbroadening=false,
490 CutoffType cutoff=CutoffType::None,
491 MirroringType mirroring=MirroringType::None,
492 PopulationType population=PopulationType::LTE,
493 NormalizationType normalization=NormalizationType::None,
494 LineShape::Type lineshapetype=LineShape::Type::DP,
495 Numeric T0=296,
496 Numeric cutofffreq=-1,
497 Numeric linemixinglimit=-1,
498 const QuantumIdentifier& quantumidentity=QuantumIdentifier(),
499 std::vector<QuantumNumberType> localquanta={},
500 ArrayOfSpecies broadeningspecies={},
501 std::vector<SingleLine> lines={}) :
502 mselfbroadening(selfbroadening),
503 mbathbroadening(bathbroadening),
505 mmirroring(mirroring),
506 mpopulation(population),
507 mnormalization(normalization),
508 mlineshapetype(lineshapetype),
509 mT0(T0),
510 mcutofffreq(cutofffreq),
511 mlinemixinglimit(linemixinglimit),
512 mquantumidentity(quantumidentity),
513 mlocalquanta(std::move(localquanta)),
514 mbroadeningspecies(std::move(broadeningspecies)),
515 mlines(std::move(lines)) {
516 if (selfbroadening) mbroadeningspecies.front() = quantumidentity.Species();
517 if (bathbroadening) mbroadeningspecies.back() = Species::Species::Bath;
518 }
519
538 Lines(bool selfbroadening,
539 bool bathbroadening,
540 size_t nlines,
541 CutoffType cutoff,
542 MirroringType mirroring,
543 PopulationType population,
544 NormalizationType normalization,
545 LineShape::Type lineshapetype,
546 Numeric T0,
547 Numeric cutofffreq,
548 Numeric linemixinglimit,
549 const QuantumIdentifier& quantumidentity,
550 const std::vector<QuantumNumberType>& localquanta,
551 const ArrayOfSpecies& broadeningspecies,
552 const LineShape::Model& metamodel) :
553 mselfbroadening(selfbroadening),
554 mbathbroadening(bathbroadening),
556 mmirroring(mirroring),
557 mpopulation(population),
558 mnormalization(normalization),
559 mlineshapetype(lineshapetype),
560 mT0(T0),
561 mcutofffreq(cutofffreq),
562 mlinemixinglimit(linemixinglimit),
563 mquantumidentity(quantumidentity),
564 mlocalquanta(localquanta),
565 mbroadeningspecies(broadeningspecies),
567 SingleLine(broadeningspecies.size(),
568 localquanta.size(), metamodel)) {
569 if (selfbroadening) mbroadeningspecies.front() = quantumidentity.Species();
570 if (bathbroadening) mbroadeningspecies.back() = Species::Species::Bath;
571 }
572
585 void AppendSingleLine(SingleLine&& sl);
586
599 void AppendSingleLine(const SingleLine& sl);
600
606 [[nodiscard]] bool MatchWithExternal(const SingleLineExternal& sle, const QuantumIdentifier& quantumidentity) const ARTS_NOEXCEPT;
607
613 [[nodiscard]] bool Match(const Lines& l) const noexcept;
614
616 void sort_by_frequency();
617
619 void sort_by_einstein();
620
623
626
628 [[nodiscard]] String SpeciesName() const noexcept;
629
631 [[nodiscard]] String UpperQuantumNumbers() const noexcept;
632
634 [[nodiscard]] String LowerQuantumNumbers() const noexcept;
635
637 [[nodiscard]] String LineShapeMetaData() const noexcept;
638
640 [[nodiscard]] Species::Species Species() const noexcept {return mquantumidentity.Species();}
641
643 [[nodiscard]] const Species::IsotopeRecord& Isotopologue() const noexcept {return mquantumidentity.Isotopologue();}
644
646 [[nodiscard]] Index NumLines() const noexcept {return Index(mlines.size());}
647
649 [[nodiscard]] const std::vector<SingleLine>& AllLines() const noexcept {return mlines;}
650
652 std::vector<SingleLine>& AllLines() noexcept {return mlines;}
653
655 [[nodiscard]] Index NumBroadeners() const noexcept {return Index(mbroadeningspecies.nelem());}
656
658 [[nodiscard]] Index NumLocalQuanta() const noexcept {return Index(mlocalquanta.size());}
659
663
666 void RemoveLocalQuantum(size_t);
667
674 [[nodiscard]] Rational LowerQuantumNumber(size_t k, QuantumNumberType qnt) const noexcept;
675
682 [[nodiscard]] Rational UpperQuantumNumber(size_t k, QuantumNumberType qnt) const noexcept;
683
690 Rational& LowerQuantumNumber(size_t k, QuantumNumberType qnt) noexcept;
691
698 Rational& UpperQuantumNumber(size_t k, QuantumNumberType qnt) noexcept;
699
705 [[nodiscard]] Index ZeemanCount(size_t k, Zeeman::Polarization type) const noexcept;
706
713 [[nodiscard]] Numeric ZeemanStrength(size_t k, Zeeman::Polarization type, Index i) const noexcept;
714
721 [[nodiscard]] Numeric ZeemanSplitting(size_t k, Zeeman::Polarization type, Index i) const noexcept;
722
724 void SetAutomaticZeeman() noexcept;
725
731 [[nodiscard]] Numeric F0(size_t k) const noexcept {return mlines[k].F0();}
732
738 Numeric& F0(size_t k) noexcept {return mlines[k].F0();}
739
745 [[nodiscard]] Numeric F_mean(Numeric T=0) const noexcept;
746
752 [[nodiscard]] Numeric F_mean(const ConstVectorView& wgts) const noexcept;
753
759 [[nodiscard]] Numeric E0(size_t k) const noexcept {return mlines[k].E0();}
760
766 Numeric& E0(size_t k) noexcept {return mlines[k].E0();}
767
773 [[nodiscard]] Numeric I0(size_t k) const noexcept {return mlines[k].I0();}
774
780 Numeric& I0(size_t k) noexcept {return mlines[k].I0();}
781
787 [[nodiscard]] Numeric A(size_t k) const noexcept {return mlines[k].A();}
788
794 Numeric& A(size_t k) noexcept {return mlines[k].A();}
795
801 [[nodiscard]] Numeric g_low(size_t k) const noexcept {return mlines[k].g_low();}
802
808 Numeric& g_low(size_t k) noexcept {return mlines[k].g_low();}
809
815 [[nodiscard]] Numeric g_upp(size_t k) const noexcept {return mlines[k].g_upp();}
816
822 Numeric& g_upp(size_t k) noexcept {return mlines[k].g_upp();}
823
825 [[nodiscard]] MirroringType Mirroring() const noexcept {return mmirroring;}
826
828 MirroringType& Mirroring() noexcept {return mmirroring;}
829
831 void Mirroring(MirroringType x) noexcept {mmirroring = x;}
832
834 static bool validIndexForMirroring(Index x) noexcept {
835 return good_enum(MirroringType(x));
836 }
837
839 static MirroringType string2Mirroring(const String& in) noexcept {
840 return toMirroringType(in);
841 }
842
844 [[nodiscard]] NormalizationType Normalization() const noexcept {return mnormalization;}
845
847 NormalizationType& Normalization() noexcept {return mnormalization;}
848
850 void Normalization(NormalizationType x) noexcept {mnormalization = x;}
851
853 static bool validIndexForNormalization(Index x) noexcept {
854 return good_enum(NormalizationType(x));
855 }
856
858 static NormalizationType string2Normalization(const String& in) noexcept {
859 return toNormalizationType(in);
860 }
861
863 [[nodiscard]] CutoffType Cutoff() const noexcept {return mcutoff;}
864
866 CutoffType& Cutoff() noexcept {return mcutoff;}
867
869 void Cutoff(CutoffType x) noexcept {mcutoff = x;}
870
872 static bool validIndexForCutoff(Index x) noexcept {
873 return good_enum(CutoffType(x));
874 }
875
877 static CutoffType string2Cutoff(const String& in) noexcept {
878 return toCutoffType(in);
879 }
880
882 [[nodiscard]] PopulationType Population() const noexcept {return mpopulation;}
883
885 [[nodiscard]] bool OnTheFlyLineMixing() const noexcept {
886 return mpopulation == PopulationType::ByMakarovFullRelmat or
887 mpopulation == PopulationType::ByRovibLinearDipoleLineMixing;
888 }
889
891 PopulationType& Population() noexcept {return mpopulation;}
892
894 void Population(PopulationType x) noexcept {mpopulation = x;}
895
897 static bool validIndexForPopulation(Index x) noexcept {
898 return good_enum(PopulationType(x));
899 }
900
902 static PopulationType string2Population(const String& in) noexcept {
903 return toPopulationType(in);
904 }
905
907 [[nodiscard]] LineShape::Type LineShapeType() const noexcept {return mlineshapetype;}
908
911
914
916 static bool validIndexForLineShapeType(Index x) noexcept {
917 return good_enum(LineShape::Type(x));
918 }
919
922 return LineShape::toType(type);
923 }
924
930 [[nodiscard]] bool DoLineMixing(Numeric P) const noexcept {
931 return mlinemixinglimit < 0 ? true : mlinemixinglimit > P;
932 }
933
942 [[nodiscard]] LineShape::Output ShapeParameters(size_t k, Numeric T, Numeric P, const Vector& vmrs) const noexcept;
943
952 [[nodiscard]] LineShape::Output ShapeParameters(size_t k, Numeric T, Numeric P, size_t m) const noexcept;
953
962 [[nodiscard]] LineShape::Output ShapeParameters_dT(size_t k, Numeric T, Numeric P, const Vector& vmrs) const noexcept;
963
969 [[nodiscard]] Index LineShapePos(const Species::Species spec) const noexcept;
970
976 [[nodiscard]] Index LineShapePos(const QuantumIdentifier& qid) const noexcept {
977 return LineShapePos(qid.Species());
978 }
979
988 [[nodiscard]] LineShape::Output ShapeParameters_dVMR(size_t k, Numeric T, Numeric P,
989 const QuantumIdentifier& vmr_qid) const noexcept;
990
1000 [[nodiscard]] Numeric ShapeParameter_dInternal(size_t k, Numeric T, Numeric P,
1001 const Vector& vmrs,
1002 const RetrievalQuantity& derivative) const noexcept;
1003
1009 [[nodiscard]] Numeric CutoffFreq(size_t k, Numeric shift=0) const noexcept;
1010
1016 [[nodiscard]] Numeric CutoffFreqMinus(size_t k, Numeric shift=0) const noexcept;
1017
1019 [[nodiscard]] Numeric T0() const noexcept {
1020 return mT0;
1021 }
1022
1024 void T0(Numeric x) noexcept {
1025 mT0 = x;
1026 }
1027
1029 [[nodiscard]] Numeric CutoffFreqValue() const noexcept {
1030 return mcutofffreq;
1031 }
1032
1034 void CutoffFreqValue(Numeric x) noexcept {
1035 mcutofffreq = x;
1036 }
1037
1039 [[nodiscard]] Numeric LinemixingLimit() const noexcept {
1040 return mlinemixinglimit;
1041 }
1042
1044 void LinemixingLimit(Numeric x) noexcept {
1045 mlinemixinglimit = x;
1046 }
1047
1049 [[nodiscard]] const std::vector<QuantumNumberType>& LocalQuanta() const noexcept {
1050 return mlocalquanta;
1051 }
1052
1054 std::vector<QuantumNumberType>& LocalQuanta() noexcept {
1055 return mlocalquanta;
1056 }
1057
1059 [[nodiscard]] const ArrayOfSpecies& BroadeningSpecies() const noexcept {
1060 return mbroadeningspecies;
1061 }
1062
1065 return mbroadeningspecies;
1066 }
1067
1069 [[nodiscard]] Index BroadeningSpeciesPosition(Species::Species spec) const noexcept {
1070 if (auto ptr = std::find(mbroadeningspecies.cbegin(),
1071 mbroadeningspecies.cend(), spec); ptr not_eq mbroadeningspecies.cend())
1072 return std::distance(mbroadeningspecies.cbegin(), ptr);
1073 return -1;
1074 }
1075
1077 [[nodiscard]] bool Self() const noexcept {
1078 return mselfbroadening;
1079 }
1080
1082 void Self(bool x) noexcept {
1083 mselfbroadening = x;
1084 }
1085
1087 [[nodiscard]] bool Bath() const noexcept {
1088 return mbathbroadening;
1089 }
1090
1092 void Bath(bool x) noexcept {
1093 mbathbroadening = x;
1094 }
1095
1097 [[nodiscard]] const QuantumIdentifier& QuantumIdentity() const noexcept {
1098 return mquantumidentity;
1099 }
1100
1103 return mquantumidentity;
1104 }
1105
1107 [[nodiscard]] QuantumIdentifier QuantumIdentityOfLine(Index k) const noexcept;
1108
1110 [[nodiscard]] String MetaData() const;
1111
1113 void RemoveLine(Index) noexcept;
1114
1116 SingleLine PopLine(Index) noexcept;
1117
1119 SingleLine& Line(Index) noexcept;
1120
1122 [[nodiscard]] const SingleLine& Line(Index) const noexcept;
1123
1125 void ReverseLines() noexcept;
1126
1128 [[nodiscard]] Numeric SpeciesMass() const noexcept;
1129
1136 [[nodiscard]] Vector BroadeningSpeciesVMR(const ConstVectorView&, const ArrayOfArrayOfSpeciesTag&) const;
1137
1145 [[nodiscard]] Vector BroadeningSpeciesMass(const ConstVectorView&, const ArrayOfArrayOfSpeciesTag&, const SpeciesIsotopologueRatios&, const Numeric& bath_mass=0) const;
1146
1153 [[nodiscard]] Numeric SelfVMR(const ConstVectorView&, const ArrayOfArrayOfSpeciesTag&) const;
1154
1156 bifstream& read(bifstream& is);
1157
1159 bofstream& write(bofstream& os) const;
1160
1161 [[nodiscard]] bool OK() const noexcept;
1162
1163 [[nodiscard]] Numeric DopplerConstant(Numeric T) const noexcept;
1164}; // Lines
1165
1166std::ostream& operator<<(std::ostream&, const Lines&);
1167std::istream& operator>>(std::istream&, Lines&);
1168
1175
1182
1189
1247
1303
1359
1374
1383
1429
1440std::vector<Lines> split_list_of_external_lines(std::vector<SingleLineExternal>& external_lines,
1441 const std::vector<QuantumNumberType>& localquantas={},
1442 const std::vector<QuantumNumberType>& globalquantas={});
1443
1450Lines createEmptyCopy(const Lines& al) noexcept;
1451
1453inline Index nelem(const Lines& l) {return l.NumLines();}
1454
1456inline Index nelem(const Array<Lines>& l) {Index n=0; for (auto& x:l) n+=nelem(x); return n;}
1457
1459inline Index nelem(const Array<Array<Lines>>& l) {Index n=0; for (auto& x:l) n+=nelem(x); return n;}
1460
1471
1480
1482ENUMCLASS(QuantumIdentifierLineTargetType, char,
1483 None,
1484 Species,
1486 Band,
1487 Line,
1488 Level
1489)
1490
1491struct QuantumIdentifierLineTarget {
1492 QuantumIdentifierLineTargetType found{QuantumIdentifierLineTargetType::None};
1493 bool lower{false};
1494 bool upper{false};
1495
1497 constexpr QuantumIdentifierLineTarget() noexcept = default;
1498
1500 constexpr QuantumIdentifierLineTarget(const QuantumIdentifier& qt, const QuantumIdentifier& qid) ARTS_NOEXCEPT : QuantumIdentifierLineTarget()
1501 {
1502 ARTS_ASSERT(qid.type == Quantum::IdentifierType::Transition);
1503
1504 // We have no match if we do not match the species
1505 if (qt.Species() == qid.Species()) found = QuantumIdentifierLineTargetType::Species;
1506
1507 // We can only match the isotopologue if we match the species
1508 if (found == QuantumIdentifierLineTargetType::Species and qt.Isotopologue() == qid.Isotopologue()) found = QuantumIdentifierLineTargetType::Isotopologue;
1509
1510 // We do cannot match the band if we do not match the isotopologue
1511 if (found == QuantumIdentifierLineTargetType::Isotopologue) {
1512 if (qt.type == Quantum::IdentifierType::All) {
1513
1514 // Nothing to do here
1515
1516 } else if (qt.type == Quantum::IdentifierType::None) {
1517
1518 found = QuantumIdentifierLineTargetType::None; // We turned this off!
1519
1520 } else if (qt.type == Quantum::IdentifierType::Transition) {
1521
1522 // We are band specific values
1523 bool all_good = true;
1524 for (auto qn: ::enumtyps::QuantumNumberTypeTypes) {
1525 if (qn not_eq QuantumNumberType::FINAL) {
1526 const Rational& low_band = qid.Lower()[qn];
1527 const Rational& low_targ = qt.Lower()[qn];
1528 const Rational& upp_band = qid.Upper()[qn];
1529 const Rational& upp_targ = qt.Upper()[qn];
1530 all_good = all_good
1531 and (low_band.isUndefined() or low_band == low_targ)
1532 and (upp_band.isUndefined() or upp_band == upp_targ);
1533 }
1534 }
1535
1536 // We are a band?
1537 if (all_good) found = QuantumIdentifierLineTargetType::Band;
1538
1539 } else if (qt.type == Quantum::IdentifierType::EnergyLevel) {
1540
1541 // We are the right species, are we a level?
1542 bool low_lvl = true;
1543 bool upp_lvl = true;
1544 for (auto qn: ::enumtyps::QuantumNumberTypeTypes) {
1545 if (qn not_eq QuantumNumberType::FINAL) {
1546 // Check only numbers in the energy levels
1547 const Rational& low_band = qid.Lower()[qn];
1548 const Rational& upp_band = qid.Upper()[qn];
1549 const Rational& lvl_targ = qt.Level()[qn];
1550 low_lvl = low_lvl and (low_band.isUndefined() or low_band == lvl_targ);
1551 upp_lvl = upp_lvl and (upp_band.isUndefined() or upp_band == lvl_targ);
1552 }
1553 }
1554
1555 // We are a level?
1556 if (low_lvl or upp_lvl) found = QuantumIdentifierLineTargetType::Level;
1557 lower = low_lvl;
1558 upper = upp_lvl;
1559
1560 }
1561 }
1562 }
1563
1565 QuantumIdentifierLineTarget(const QuantumIdentifier& qt, const Lines& lines) ARTS_NOEXCEPT :
1566 QuantumIdentifierLineTarget(qt, lines.QuantumIdentity()) {}
1567
1569 QuantumIdentifierLineTarget(const QuantumIdentifier&, const Lines&, const Index) ARTS_NOEXCEPT;
1570
1572 constexpr bool operator==(QuantumIdentifierLineTargetType x) const noexcept {return x == found;}
1573
1575 constexpr bool operator!=(QuantumIdentifierLineTargetType x) const noexcept {return x != found;}
1576
1578 friend std::ostream& operator<<(std::ostream& os, QuantumIdentifierLineTarget qlt) {
1579 return os << qlt.found << ' ' << qlt.lower << ' ' << qlt.upper;
1580 }
1581};
1582} // namespace Absorption
1583
1588
1589std::ostream& operator<<(std::ostream&, const ArrayOfAbsorptionLines&);
1590
1591std::ostream& operator<<(std::ostream&, const ArrayOfArrayOfAbsorptionLines&);
1592
1593using AbsorptionNormalizationType = Absorption::NormalizationType;
1594using AbsorptionPopulationType = Absorption::PopulationType;
1595using AbsorptionMirroringType = Absorption::MirroringType;
1596using AbsorptionCutoffType = Absorption::CutoffType;
1597
1598#endif // absorptionlines_h
Absorption::CutoffType AbsorptionCutoffType
Absorption::NormalizationType AbsorptionNormalizationType
Absorption::PopulationType AbsorptionPopulationType
Absorption::MirroringType AbsorptionMirroringType
Numeric E0
This file contains the class declaration of bifstream.
This file contains the class declaration of bofstream.
void sort_by_einstein()
Sort inner line list by Einstein coefficient.
void RemoveLocalQuantum(size_t)
Remove quantum numbers at the given position from all lines.
void sort_by_frequency()
Sort inner line list by frequency.
static CutoffType string2Cutoff(const String &in) noexcept
Numeric ZeemanSplitting(size_t k, Zeeman::Polarization type, Index i) const noexcept
Returns the splitting of a Zeeman split line.
Numeric g_low(size_t k) const noexcept
Lower level statistical weight.
SingleLine PopLine(Index) noexcept
Pops a single line.
QuantumIdentifier mquantumidentity
Catalog ID.
Index BroadeningSpeciesPosition(Species::Species spec) const noexcept
Position of species if available or -1 else.
Numeric & E0(size_t k) noexcept
Lower level energy.
Numeric & g_upp(size_t k) noexcept
Upper level statistical weight.
void T0(Numeric x) noexcept
Sets reference temperature.
Index NumLocalQuanta() const noexcept
Number of local quantum numbers.
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.
static bool validIndexForCutoff(Index x) noexcept
Checks if index is a valid cutoff.
bool mbathbroadening
Does the line broadening have bath broadening.
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.
Rational LowerQuantumNumber(size_t k, QuantumNumberType qnt) const noexcept
Quantum number lower level.
LineShape::Output ShapeParameters_dT(size_t k, Numeric T, Numeric P, const Vector &vmrs) const noexcept
Line shape parameters temperature derivatives.
MirroringType Mirroring() const noexcept
Returns mirroring style.
static bool validIndexForPopulation(Index x) noexcept
Checks if index is a valid population.
Numeric I0(size_t k) const noexcept
Reference line strength.
PopulationType & Population() noexcept
Returns population style reference.
static MirroringType string2Mirroring(const String &in) noexcept
LineShape::Type LineShapeType() const noexcept
Returns lineshapetype style.
static LineShape::Type string2LineShapeType(const String &type) noexcept
const Species::IsotopeRecord & Isotopologue() const noexcept
Isotopologue Index.
static bool validIndexForLineShapeType(Index x) noexcept
Checks if index is a valid lineshapetype.
void RemoveUnusedLocalQuantums()
Remove quantum numbers that are not used by even a single line.
const std::vector< QuantumNumberType > & LocalQuanta() const noexcept
Returns local quantum numbers.
std::vector< SingleLine > & AllLines() noexcept
Lines.
Rational UpperQuantumNumber(size_t k, QuantumNumberType qnt) const noexcept
Quantum number upper level.
Numeric F0(size_t k) const noexcept
Central frequency.
void Self(bool x) noexcept
Returns self broadening status.
Numeric E0(size_t k) const noexcept
Lower level energy.
LineShape::Output ShapeParameters_dVMR(size_t k, Numeric T, Numeric P, const QuantumIdentifier &vmr_qid) const noexcept
Line shape parameters vmr derivative.
CutoffType & Cutoff() noexcept
Returns cutoff style reference.
NormalizationType Normalization() const noexcept
Returns normalization style.
SingleLine & Line(Index) noexcept
Returns a single line.
void Cutoff(CutoffType x) noexcept
Sets cutoff style.
PopulationType Population() const noexcept
Returns population style.
bool OK() const noexcept
ArrayOfSpecies & BroadeningSpecies() noexcept
Returns the broadening species.
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.
static bool validIndexForNormalization(Index x) noexcept
Checks if index is a valid normalization.
bofstream & write(bofstream &os) const
Binary write for Lines.
Numeric CutoffFreqValue() const noexcept
Returns internal cutoff frequency value.
Index NumBroadeners() const noexcept
Number of broadening species.
Numeric DopplerConstant(Numeric T) const noexcept
String LowerQuantumNumbers() const noexcept
Lower quantum numbers string.
bool OnTheFlyLineMixing() const noexcept
On-the-fly line mixing.
const ArrayOfSpecies & BroadeningSpecies() const noexcept
Returns the broadening species.
Numeric & F0(size_t k) noexcept
Central frequency.
NormalizationType & Normalization() noexcept
Returns normalization style reference.
void Bath(bool x) noexcept
Returns bath broadening status.
bool Bath() const noexcept
Returns bath broadening status.
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, const QuantumIdentifier &quantumidentity, const std::vector< QuantumNumberType > &localquanta, const ArrayOfSpecies &broadeningspecies, const LineShape::Model &metamodel)
XML-tag initialization.
const QuantumIdentifier & QuantumIdentity() const noexcept
Returns identity status.
Numeric T0() const noexcept
Returns reference temperature.
QuantumIdentifier QuantumIdentityOfLine(Index k) const noexcept
Returns identity status.
CutoffType mcutoff
cutoff type, by band or by line
static PopulationType string2Population(const String &in) noexcept
void Population(PopulationType x) noexcept
Sets population style.
void CutoffFreqValue(Numeric x) noexcept
Sets internal cutoff frequency value.
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.
void LinemixingLimit(Numeric x) noexcept
Sets line mixing limit.
PopulationType mpopulation
Line population distribution.
Numeric mlinemixinglimit
linemixing limit
NormalizationType mnormalization
Line normalization type.
bool MatchWithExternal(const SingleLineExternal &sle, const QuantumIdentifier &quantumidentity) const ARTS_NOEXCEPT
Checks if an external line matches this structure.
Numeric mT0
Reference temperature for all parameters of the lines.
CutoffType Cutoff() const noexcept
Returns cutoff style.
bool Self() const noexcept
Returns self broadening status.
String LineShapeMetaData() const noexcept
Meta data for the line shape if it exists.
QuantumIdentifier & QuantumIdentity() noexcept
Returns identity status.
String SpeciesName() const noexcept
Species Name.
ArrayOfSpecies mbroadeningspecies
A list of broadening species.
Numeric g_upp(size_t k) const noexcept
Upper level statistical weight.
void truncate_local_quantum_numbers()
Removes all local quantum numbers.
const std::vector< SingleLine > & AllLines() const noexcept
Lines.
void Normalization(NormalizationType x) noexcept
Returns normalization style.
Numeric & I0(size_t k) noexcept
Reference line strength.
void truncate_global_quantum_numbers()
Removes all global quantum numbers.
MirroringType & Mirroring() noexcept
Returns mirroring style reference.
Numeric CutoffFreq(size_t k, Numeric shift=0) const noexcept
Returns cutoff frequency or maximum value.
String UpperQuantumNumbers() const noexcept
Upper quantum numbers string.
void ReverseLines() noexcept
Reverses the order of the internal lines.
void AppendSingleLine(SingleLine &&sl)
Appends a single line to the absorption lines.
static bool validIndexForMirroring(Index x) noexcept
Checks if index is a valid mirroring.
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.
Numeric & A(size_t k) noexcept
Einstein spontaneous emission.
Numeric mcutofffreq
cutoff frequency
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.
std::vector< SingleLine > mlines
A list of individual lines.
Index LineShapePos(const QuantumIdentifier &qid) const noexcept
Position among broadening species or -1.
std::vector< QuantumNumberType > mlocalquanta
List of local quantum numbers, these must be defined.
static NormalizationType string2Normalization(const String &in) 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, const QuantumIdentifier &quantumidentity=QuantumIdentifier(), std::vector< QuantumNumberType > localquanta={}, ArrayOfSpecies broadeningspecies={}, std::vector< SingleLine > lines={})
Default initialization.
bool mselfbroadening
Does the line broadening have self broadening.
MirroringType mmirroring
Mirroring type.
Numeric SpeciesMass() const noexcept
Mass of the molecule.
Index LineShapePos(const Species::Species spec) const noexcept
Position among broadening species or -1.
std::vector< QuantumNumberType > & LocalQuanta() noexcept
Returns local quantum numbers.
Numeric LinemixingLimit() const noexcept
Returns line mixing limit.
LineShape::Type mlineshapetype
Type of line shape.
Numeric & g_low(size_t k) noexcept
Lower level statistical weight.
Numeric ZeemanStrength(size_t k, Zeeman::Polarization type, Index i) const noexcept
Returns the strength of a Zeeman split line.
void Mirroring(MirroringType x) noexcept
Returns mirroring style.
LineShape::Type & LineShapeType() noexcept
Returns lineshapetype style reference.
void LineShapeType(LineShape::Type x) noexcept
Sets lineshapetype style.
Numeric A(size_t k) const noexcept
Einstein spontaneous emission.
bool Match(const Lines &l) const noexcept
Checks if another line list matches this structure.
Vector BroadeningSpeciesMass(const ConstVectorView &, const ArrayOfArrayOfSpeciesTag &, const SpeciesIsotopologueRatios &, const Numeric &bath_mass=0) const
Returns the mass of the broadening species.
Computations and data for a single absorption line.
std::vector< Rational > & LowerQuantumNumbers() noexcept
Lower level quantum numbers.
Numeric A() const noexcept
Einstein spontaneous emission.
Numeric & E0() noexcept
Lower level energy.
const LineShape::Model & LineShape() const noexcept
Line shape model.
Index UpperQuantumElems() const noexcept
Number of upper quantum numbers.
Index LowerQuantumElems() const noexcept
Number of lower quantum numbers.
Rational & UpperQuantumNumber(size_t i) noexcept
Upper quantum number.
Numeric & I0() noexcept
Reference line strength.
Numeric & g_low() noexcept
Lower level statistical weight.
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(), std::vector< Rational > lowerquanta={}, std::vector< Rational > upperquanta={})
Default initialization.
Numeric & F0() noexcept
Central frequency.
const std::vector< Rational > & UpperQuantumNumbers() const noexcept
Upper level quantum numbers.
void I0(Numeric x) noexcept
Reference line strength.
std::vector< Rational > & UpperQuantumNumbers() noexcept
Upper level quantum numbers.
Numeric g_upp() const noexcept
Upper level statistical weight.
const std::vector< Rational > & LowerQuantumNumbers() const noexcept
Lower level quantum numbers.
void g_low(Numeric x) noexcept
Lower level statistical weight.
Numeric F0() const noexcept
Central frequency.
Rational UpperQuantumNumber(size_t i) const noexcept
Upper quantum number.
Rational & LowerQuantumNumber(size_t i) noexcept
Lower quantum number.
Numeric & g_upp() noexcept
Upper level statistical weight.
void F0(Numeric x) noexcept
Central frequency.
Numeric & A() noexcept
Einstein spontaneous emission.
Rational LowerQuantumNumber(size_t i) const noexcept
Lower quantum number.
Numeric E0() const noexcept
Lower level energy.
void E0(Numeric x) noexcept
Lower level energy.
Zeeman::Model & Zeeman() noexcept
Zeeman model.
void g_upp(Numeric x) noexcept
Upper level statistical weight.
Numeric g_low() const noexcept
Lower level statistical weight.
Index LineShapeElems() const noexcept
Number of lineshape elements.
void A(Numeric x) noexcept
Einstein spontaneous emission.
Numeric I0() const noexcept
Reference line strength.
SingleLine(size_t nbroadeners, size_t nquanta, LineShape::Model metamodel)
Initialization for constant sizes.
LineShape::Model & LineShape() noexcept
Line shape model.
Zeeman::Model Zeeman() const noexcept
Zeeman model.
Index nelem() const ARTS_NOEXCEPT
Number of elements.
Definition: array.h:195
A constant view of a Vector.
Definition: matpackI.h:489
Main line shape model class.
Implements rational numbers to work with other ARTS types.
Definition: rational.h:52
constexpr bool isUndefined() const noexcept
Is the object not defined.
Definition: rational.h:108
Deals with internal derivatives, Jacobian definition, and OEM calculations.
Definition: jacobian.h:345
The Vector class.
Definition: matpackI.h:876
Main Zeeman Model.
Definition: zeemandata.h:357
Binary output file stream class.
Definition: bifstream.h:42
Binary output file stream class.
Definition: bofstream.h:42
#define ARTS_NOEXCEPT
Definition: debug.h:80
#define ARTS_ASSERT(condition,...)
Definition: debug.h:83
#define ARTS_USER_ERROR_IF(condition,...)
Definition: debug.h:134
constexpr bool good_enum(EnumType x) noexcept
Checks if the enum number is good.
Definition: enums.h:21
#define nlines
Contains the line shape namespace.
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Namespace to contain things required for absorption calculations.
std::ostream & operator<<(std::ostream &, const SingleLine &)
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.
Numeric cutoff
std::istream & operator>>(std::istream &, SingleLine &)
Lines createEmptyCopy(const Lines &al) noexcept
Creates a copy of the input lines structure.
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 ReadFromHitran2012Stream(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.
char Type type
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.
X3 LineCenter None
Definition: constants.h:576
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.
#define d
constexpr bool operator==(const QuantumNumbers &a, const QuantumNumbers &b)
Check if all quantum numbers are the same between a and b.
Definition: quantum.h:257
constexpr bool operator!=(const QuantumNumbers &a, const QuantumNumbers &b)
Opposite of operator==()
Definition: quantum.h:277
Quantum::Identifier QuantumIdentifier
Definition: quantum.h:471
#define N
Definition: rng.cc:164
Single line reading output.
Struct containing all information needed about one isotope.
Definition: isotopologues.h:14
Headers and class definition of Zeeman modeling.