ARTS 2.5.4 (git: 4c0d3b4d)
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 "lineshapemodel.h"
39#include "matpack.h"
40#include "quantum_numbers.h"
41#include "zeemandata.h"
42#include "jacobian.h"
43
44#include <utility>
45#include <vector>
46
47
49namespace Absorption {
54ENUMCLASS(MirroringType, char,
55 None, // No mirroring
56 Lorentz, // Mirror, but use Lorentz line shape
57 SameAsLineShape, // Mirror using the same line shape
58 Manual // Mirror by having a line in the array of line record with negative F0
59) // MirroringType
60
61#pragma GCC diagnostic push
62#pragma GCC diagnostic ignored "-Wreturn-type"
63constexpr std::string_view mirroringtype2metadatastring(MirroringType in) noexcept {
64 switch (in) {
65 case MirroringType::None:
66 return "These lines are not mirrored at 0 Hz.\n";
67 case MirroringType::Lorentz:
68 return "These lines are mirrored around 0 Hz using the Lorentz line shape.\n";
69 case MirroringType::SameAsLineShape:
70 return "These line are mirrored around 0 Hz using the original line shape.\n";
71 case MirroringType::Manual:
72 return "There are manual line entries in the catalog to mirror this line.\n";
73 case MirroringType::FINAL: break;
74 }
75}
76#pragma GCC diagnostic pop
77
82ENUMCLASS(NormalizationType, char,
83 None, // Do not renormalize the line shape
84 VVH, // Renormalize with Van Vleck and Huber specifications
85 VVW, // Renormalize with Van Vleck and Weiskopf specifications
86 RQ, // Renormalize using Rosenkranz's quadratic specifications
87 SFS // Renormalize using simple frequency scaling of the line strength
88) // NormalizationType
89
90#pragma GCC diagnostic push
91#pragma GCC diagnostic ignored "-Wreturn-type"
92constexpr std::string_view normalizationtype2metadatastring(NormalizationType in) {
93 switch (in) {
94 case NormalizationType::None:
95 return "No re-normalization in the far wing will be applied.\n";
96 case NormalizationType::VVH:
97 return "van Vleck and Huber far-wing renormalization will be applied, "
98 "i.e. F ~ (f tanh(hf/2kT))/(f0 tanh(hf0/2kT))\n";
99 case NormalizationType::VVW:
100 return "van Vleck and Weisskopf far-wing renormalization will be applied, "
101 "i.e. F ~ (f/f0)^2\n";
102 case NormalizationType::RQ:
103 return "Rosenkranz quadratic far-wing renormalization will be applied, "
104 "i.e. F ~ hf0/2kT sinh(hf0/2kT) (f/f0)^2\n";
105 case NormalizationType::SFS:
106 return "Simple frequency scaling of the far-wings will be applied, "
107 "i.e. F ~ (f / f0) * ((1 - exp(- hf / kT)) / (1 - exp(- hf0 / kT)))\n";
108 case NormalizationType::FINAL: break;
109 }
110}
111#pragma GCC diagnostic pop
112
117ENUMCLASS(PopulationType, char,
118 LTE, // Assume band is in LTE
119 NLTE, // Assume band is in NLTE and the upper-to-lower ratio is known
120 VibTemps, // Assume band is in NLTE described by vibrational temperatures and LTE at other levels
121 ByHITRANRosenkranzRelmat, // Assume band needs to compute relaxation matrix to derive HITRAN Y-coefficients
122 ByHITRANFullRelmat, // Assume band needs to compute and directly use the relaxation matrix according to HITRAN
123 ByMakarovFullRelmat, // Assume band needs to compute and directly use the relaxation matrix according to Makarov et al 2020
124 ByRovibLinearDipoleLineMixing // Assume band needs to compute and directly use the relaxation matrix according to Hartmann, Boulet, Robert, 2008, 1st edition
125) // PopulationType
126
127#pragma GCC diagnostic push
128#pragma GCC diagnostic ignored "-Wreturn-type"
129constexpr std::string_view populationtype2metadatastring(PopulationType in) {
130 switch (in) {
131 case PopulationType::LTE:
132 return "The lines are considered as in pure LTE.\n";
133 case PopulationType::ByMakarovFullRelmat:
134 return "The lines requires relaxation matrix calculations in LTE - Makarov et al 2020 full method.\n";
135 case PopulationType::ByRovibLinearDipoleLineMixing:
136 return "The lines requires relaxation matrix calculations in LTE - Hartmann, Boulet, Robert, 2008, 1st edition method.\n";
137 case PopulationType::ByHITRANFullRelmat:
138 return "The lines requires relaxation matrix calculations in LTE - HITRAN full method.\n";
139 case PopulationType::ByHITRANRosenkranzRelmat:
140 return "The lines requires Relaxation matrix calculations in LTE - HITRAN Rosenkranz method.\n";
141 case PopulationType::VibTemps:
142 return "The lines are considered as in NLTE by vibrational temperatures.\n";
143 case PopulationType::NLTE:
144 return "The lines are considered as in pure NLTE.\n";
145 case PopulationType::FINAL: return "There's an error";
146 }
147}
148#pragma GCC diagnostic pop
149
150constexpr bool relaxationtype_relmat(PopulationType in) noexcept {
151 return in == PopulationType::ByHITRANFullRelmat or
152 in == PopulationType::ByMakarovFullRelmat or
153 in == PopulationType::ByHITRANRosenkranzRelmat or
154 in == PopulationType::ByRovibLinearDipoleLineMixing;
155}
156
158ENUMCLASS(CutoffType, char,
159 None, // No cutoff frequency at all
160 ByLine // The cutoff frequency is at SingleLine::F0 plus the cutoff frequency plus the speed independent pressure shift
161) // CutoffType
162
164
169
172
175
177 Numeric glow{};
178
180 Numeric gupp{};
181
184
187
189 LineShape::Model lineshape{};
190
193
207 Numeric I0_=0,
208 Numeric E0_=0,
209 Numeric glow_=0,
210 Numeric gupp_=0,
211 Numeric A_=0,
214 Quantum::Number::LocalState localquanta_={}) :
215 F0(F0_),
216 I0(I0_),
217 E0(E0_),
218 glow(glow_),
219 gupp(gupp_),
220 A(A_),
221 zeeman(zeeman_),
222 lineshape(std::move(lineshape_)),
223 localquanta(std::move(localquanta_)) {}
224
231 lineshape(std::move(metamodel)), localquanta(std::move(metaquanta)) {}
232
236
238 [[nodiscard]] Index LineShapeElems() const noexcept {return lineshape.nelem();}
239
241 [[nodiscard]] Index LocalQuantumElems() const noexcept {return localquanta.val.nelem();}
242
246
253 void SetAutomaticZeeman(QuantumIdentifier qid);
254
259 void SetLineMixing2SecondOrderData(const Vector& d);
260
265 void SetLineMixing2AER(const Vector& d);
266
268 bifstream& read(bifstream& bif);
269
271 bofstream& write(bofstream& bof) const;
272}; // SingleLine
273
274std::ostream& operator<<(std::ostream&, const SingleLine&);
275
276std::istream& operator>>(std::istream&, SingleLine&);
277
280 bool bad=true;
281 bool selfbroadening=false;
282 bool bathbroadening=false;
283 CutoffType cutoff=CutoffType::None;
284 MirroringType mirroring=MirroringType::None;
285 PopulationType population=PopulationType::LTE;
286 NormalizationType normalization=NormalizationType::None;
287 LineShape::Type lineshapetype=LineShape::Type::DP;
294};
295
296struct Lines {
297 static constexpr Index version = 2;
298
301
304
306 CutoffType cutoff;
307
309 MirroringType mirroring;
310
312 PopulationType population;
313
315 NormalizationType normalization;
316
318 LineShape::Type lineshapetype;
319
322
325
328
331
334
337
354 Lines(bool selfbroadening_=false,
355 bool bathbroadening_=false,
356 CutoffType cutoff_=CutoffType::None,
357 MirroringType mirroring_=MirroringType::None,
358 PopulationType population_=PopulationType::LTE,
359 NormalizationType normalization_=NormalizationType::None,
360 LineShape::Type lineshapetype_=LineShape::Type::DP,
361 Numeric T0_=296,
362 Numeric cutofffreq_=-1,
363 Numeric linemixinglimit_=-1,
364 QuantumIdentifier quantumidentity_=QuantumIdentifier(),
365 ArrayOfSpecies broadeningspecies_={},
366 Array<SingleLine> lines_={}) :
367 selfbroadening(selfbroadening_),
368 bathbroadening(bathbroadening_),
369 cutoff(cutoff_),
370 mirroring(mirroring_),
371 population(population_),
372 normalization(normalization_),
373 lineshapetype(lineshapetype_),
374 T0(T0_),
375 cutofffreq(cutofffreq_),
376 linemixinglimit(linemixinglimit_),
377 quantumidentity(std::move(quantumidentity_)),
378 broadeningspecies(std::move(broadeningspecies_)),
379 lines(std::move(lines_)) {
381 if (bathbroadening) broadeningspecies.back() = Species::Species::Bath;
382 }
383
402 Lines(bool selfbroadening_,
403 bool bathbroadening_,
404 size_t nlines,
405 CutoffType cutoff_,
406 MirroringType mirroring_,
407 PopulationType population_,
408 NormalizationType normalization_,
409 LineShape::Type lineshapetype_,
410 Numeric T0_,
411 Numeric cutofffreq_,
412 Numeric linemixinglimit_,
413 QuantumIdentifier quantumidentity_,
414 ArrayOfSpecies broadeningspecies_,
415 const Quantum::Number::LocalState& metalocalquanta,
416 const LineShape::Model& metamodel) :
417 selfbroadening(selfbroadening_),
418 bathbroadening(bathbroadening_),
419 cutoff(cutoff_),
420 mirroring(mirroring_),
421 population(population_),
422 normalization(normalization_),
423 lineshapetype(lineshapetype_),
424 T0(T0_),
425 cutofffreq(cutofffreq_),
426 linemixinglimit(linemixinglimit_),
427 quantumidentity(std::move(quantumidentity_)),
428 broadeningspecies(std::move(broadeningspecies_)),
429 lines(nlines, SingleLine(metalocalquanta, metamodel)) {
431 if (bathbroadening) broadeningspecies.back() = Species::Species::Bath;
432 }
433
446 void AppendSingleLine(SingleLine&& sl);
447
460 void AppendSingleLine(const SingleLine& sl);
461
467 [[nodiscard]] bool MatchWithExternal(const SingleLineExternal& sle, const QuantumIdentifier& quantumidentity) const ARTS_NOEXCEPT;
468
475 [[nodiscard]] std::pair<bool, bool> Match(const Lines& l) const noexcept;
476
478 void sort_by_frequency();
479
481 void sort_by_einstein();
482
484 [[nodiscard]] String SpeciesName() const noexcept;
485
487 [[nodiscard]] String LineShapeMetaData() const noexcept;
488
490 [[nodiscard]] Species::Species Species() const noexcept {return quantumidentity.Species();}
491
493 [[nodiscard]] Species::IsotopeRecord Isotopologue() const noexcept {return quantumidentity.Isotopologue();}
494
496 [[nodiscard]] Index NumLines() const noexcept {return Index(lines.size());}
497
500
502 [[nodiscard]] Index NumBroadeners() const noexcept {return Index(broadeningspecies.nelem());}
503
505 [[nodiscard]] Index NumLocalQuanta() const noexcept {
506 return lines.size() ? lines.front().localquanta.val.nelem() : 0;}
507
513 [[nodiscard]] Index ZeemanCount(size_t k, Zeeman::Polarization type) const noexcept;
514
521 [[nodiscard]] Numeric ZeemanStrength(size_t k, Zeeman::Polarization type, Index i) const noexcept;
522
529 [[nodiscard]] Numeric ZeemanSplitting(size_t k, Zeeman::Polarization type, Index i) const noexcept;
530
532 void SetAutomaticZeeman() noexcept;
533
539 [[nodiscard]] Numeric F_mean(Numeric T=0) const noexcept;
540
546 [[nodiscard]] Numeric F_mean(const ConstVectorView& wgts) const noexcept;
547
549 [[nodiscard]] bool OnTheFlyLineMixing() const noexcept {
550 return population == PopulationType::ByMakarovFullRelmat or
551 population == PopulationType::ByRovibLinearDipoleLineMixing;
552 }
553
559 [[nodiscard]] bool DoLineMixing(Numeric P) const noexcept {
560 return linemixinglimit < 0 ? true : linemixinglimit > P;
561 }
562
563 [[nodiscard]] bool DoVmrDerivative(const QuantumIdentifier& qid) const noexcept {
564 return qid.Isotopologue() == quantumidentity.Isotopologue() or
565 (qid.Isotopologue().joker() and qid.Species() == quantumidentity.Species()) or
566 std::any_of(broadeningspecies.begin(), broadeningspecies.end(), [s=qid.Species()](auto& a){return a == s;});
567 }
568
570 [[nodiscard]] bool AnyLinemixing() const noexcept {
571 for (auto& line : lines) {
572 for (auto& shape : line.lineshape.Data()) {
573 if (shape.Y().type not_eq LineShape::TemperatureModel::None or
574 shape.G().type not_eq LineShape::TemperatureModel::None or
575 shape.DV().type not_eq LineShape::TemperatureModel::None) {
576 return true;
577 }
578 }
579 }
580 return false;
581 }
582
591 [[nodiscard]] LineShape::Output ShapeParameters(size_t k, Numeric T, Numeric P, const Vector& vmrs) const noexcept;
592
601 [[nodiscard]] LineShape::Output ShapeParameters(size_t k, Numeric T, Numeric P, size_t m) const noexcept;
602
611 [[nodiscard]] LineShape::Output ShapeParameters_dT(size_t k, Numeric T, Numeric P, const Vector& vmrs) const noexcept;
612
618 [[nodiscard]] Index LineShapePos(const Species::Species spec) const noexcept;
619
625 [[nodiscard]] Index LineShapePos(const QuantumIdentifier& qid) const noexcept {
626 return LineShapePos(qid.Species());
627 }
628
637 [[nodiscard]] LineShape::Output ShapeParameters_dVMR(size_t k, Numeric T, Numeric P,
638 const QuantumIdentifier& vmr_qid) const noexcept;
639
649 [[nodiscard]] Numeric ShapeParameter_dInternal(size_t k, Numeric T, Numeric P,
650 const Vector& vmrs,
651 const RetrievalQuantity& derivative) const noexcept;
652
658 [[nodiscard]] Numeric CutoffFreq(size_t k, Numeric shift=0) const noexcept;
659
665 [[nodiscard]] Numeric CutoffFreqMinus(size_t k, Numeric shift=0) const noexcept;
666
668 [[nodiscard]] Index BroadeningSpeciesPosition(Species::Species spec) const noexcept {
669 if (auto ptr = std::find(broadeningspecies.cbegin(),
670 broadeningspecies.cend(), spec); ptr not_eq broadeningspecies.cend())
671 return std::distance(broadeningspecies.cbegin(), ptr);
672 return -1;
673 }
674
676 [[nodiscard]] String MetaData() const;
677
679 void RemoveLine(Index) noexcept;
680
682 SingleLine PopLine(Index) noexcept;
683
685 void ReverseLines() noexcept;
686
688 [[nodiscard]] Numeric SpeciesMass() const noexcept;
689
696 [[nodiscard]] Vector BroadeningSpeciesVMR(const ConstVectorView&, const ArrayOfArrayOfSpeciesTag&) const;
697
705 [[nodiscard]] Vector BroadeningSpeciesMass(const ConstVectorView&, const ArrayOfArrayOfSpeciesTag&, const SpeciesIsotopologueRatios&, const Numeric& bath_mass=0) const;
706
713 [[nodiscard]] Numeric SelfVMR(const ConstVectorView&, const ArrayOfArrayOfSpeciesTag&) const;
714
717
719 bofstream& write(bofstream& os) const;
720
721 [[nodiscard]] bool OK() const noexcept;
722
723 [[nodiscard]] Numeric DopplerConstant(Numeric T) const noexcept;
724
725 [[nodiscard]] QuantumIdentifier QuantumIdentityOfLine(Index k) const noexcept;
726}; // Lines
727
728std::ostream& operator<<(std::ostream&, const Lines&);
729std::istream& operator>>(std::istream&, Lines&);
730
737
744
751
809
865
880
889
935
946std::vector<Lines> split_list_of_external_lines(std::vector<SingleLineExternal>& external_lines,
947 const std::vector<QuantumNumberType>& localquantas={},
948 const std::vector<QuantumNumberType>& globalquantas={});
949
951inline Index nelem(const Lines& l) {return l.NumLines();}
952
954inline Index nelem(const Array<Lines>& l) {Index n=0; for (auto& x:l) n+=nelem(x); return n;}
955
957inline Index nelem(const Array<Array<Lines>>& l) {Index n=0; for (auto& x:l) n+=nelem(x); return n;}
958
969
978} // namespace Absorption
979
985
986std::ostream& operator<<(std::ostream&, const ArrayOfAbsorptionLines&);
987
988std::ostream& operator<<(std::ostream&, const ArrayOfArrayOfAbsorptionLines&);
989
990using AbsorptionNormalizationType = Absorption::NormalizationType;
991using AbsorptionPopulationType = Absorption::PopulationType;
992using AbsorptionMirroringType = Absorption::MirroringType;
993using AbsorptionCutoffType = Absorption::CutoffType;
994
995#endif // absorptionlines_h
Absorption::CutoffType AbsorptionCutoffType
Absorption::NormalizationType AbsorptionNormalizationType
Absorption::PopulationType AbsorptionPopulationType
Absorption::MirroringType AbsorptionMirroringType
This file contains the class declaration of bifstream.
This file contains the class declaration of bofstream.
Index nelem() const ARTS_NOEXCEPT
Number of elements.
Definition: array.h:197
A constant view of a Vector.
Definition: matpackI.h:517
Main line shape model class.
Implements rational numbers to work with other ARTS types.
Definition: rational.h:52
Deals with internal derivatives, Jacobian definition, and OEM calculations.
Definition: jacobian.h:330
The Vector class.
Definition: matpackI.h:908
Main Zeeman Model.
Definition: zeemandata.h:296
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
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.
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 &)
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 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.
#define d
#define a
Quantum::Number::GlobalState QuantumIdentifier
Quantum::Number::Type QuantumNumberType
#define N
Definition: rng.cc:164
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.
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.
Struct containing all information needed about one isotope.
Definition: isotopologues.h:16
Headers and class definition of Zeeman modeling.