ARTS  2.4.0(git:4fb77825)
absorptionlines.h
Go to the documentation of this file.
1 /* Copyright (C) 2019
2  Richard Larsson <larsson@mps.mpg.de>
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 <vector>
36 #include "bifstream.h"
37 #include "bofstream.h"
38 #include "lineshapemodel.h"
39 #include "matpack.h"
40 #include "quantum.h"
41 #include "zeemandata.h"
42 
44 namespace Absorption {
49 enum class MirroringType : Index {
50  None, // No mirroring
51  Lorentz, // Mirror, but use Lorentz line shape
52  SameAsLineShape, // Mirror using the same line shape
53  Manual, // Mirror by having a line in the array of line record with negative F0
54 }; // MirroringType
55 
57  if (in == "None")
58  return MirroringType::None;
59  else if (in == "Lorentz")
60  return MirroringType::Lorentz;
61  else if (in == "Same")
62  return MirroringType::SameAsLineShape;
63  else if (in == "Manual")
64  return MirroringType::Manual;
65  else
66  throw std::runtime_error("Cannot recognize the mirroring type");
67 }
68 
70  if (in == MirroringType::None)
71  return "None";
72  else if (in == MirroringType::Lorentz)
73  return "Lorentz";
74  else if (in == MirroringType::SameAsLineShape)
75  return "Same";
76  else if (in == MirroringType::Manual)
77  return "Manual";
78  std::terminate();
79 }
80 
82  if (in == MirroringType::None)
83  return "These lines are not mirrored at 0 Hz.\n";
84  else if (in == MirroringType::Lorentz)
85  return "These lines are mirrored around 0 Hz using the Lorentz line shape.\n";
86  else if (in == MirroringType::SameAsLineShape)
87  return "These line are mirrored around 0 Hz using the original line shape.\n";
88  else if (in == MirroringType::Manual)
89  return "There are manual line entries in the catalog to mirror this line.\n";
90  std::terminate();
91 }
92 
97 enum class NormalizationType : Index {
98  None, // Do not renormalize the line shape
99  VVH, // Renormalize with Van Vleck and Huber specifications
100  VVW, // Renormalize with Van Vleck and Weiskopf specifications
101  RosenkranzQuadratic, // Renormalize using Rosenkranz's quadratic specifications
102 }; // LineNormalizationType
103 
105  if (in == "None")
106  return NormalizationType::None;
107  else if (in == "VVH")
108  return NormalizationType::VVH;
109  else if (in == "VVW")
110  return NormalizationType::VVW;
111  else if (in == "RQ")
113  else
114  throw std::runtime_error("Cannot recognize the normalization type");
115 }
116 
118  if (in == NormalizationType::None)
119  return "None";
120  else if (in == NormalizationType::VVH)
121  return "VVH";
122  else if (in == NormalizationType::VVW)
123  return "VVW";
125  return "RQ";
126  std::terminate();
127 }
128 
130  if (in == NormalizationType::None)
131  return "No re-normalization in the far wing will be applied.\n";
132  else if (in == NormalizationType::VVH)
133  return "van Vleck and Huber far-wing renormalization will be applied, "
134  "i.e. F ~ (f tanh(hf/2kT))/(f0 tanh(hf0/2kT))\n";
135  else if (in == NormalizationType::VVW)
136  return "van Vleck and Weisskopf far-wing renormalization will be applied, "
137  "i.e. F ~ (f/f0)^2\n";
139  return "Rosenkranz quadratic far-wing renormalization will be applied, "
140  "i.e. F ~ hf0/2kT sinh(hf0/2kT) (f/f0)^2\n";
141  std::terminate();
142 }
143 
148 enum class PopulationType : Index {
149  ByLTE, // Assume line is in LTE
150  ByNLTEVibrationalTemperatures, // Assume line is in NLTE described by vibrational temperatures
151  ByNLTEPopulationDistribution, // Assume line is in NLTE and the upper-to-lower ratio is known
152  ByHITRANRosenkranzRelmat, // Assume line needs to compute relaxation matrix to derive HITRAN Y-coefficients
153  ByHITRANFullRelmat, // Assume line needs to compute and directly use the relaxation matrix
154 }; // PopulationType
155 
157  if (in == "LTE")
158  return PopulationType::ByLTE;
159  else if (in == "ByHITRANRosenkranzRelmat")
160  return PopulationType::ByHITRANRosenkranzRelmat;
161  else if (in == "ByHITRANFullRelmat")
163  else if (in == "NLTE-VibrationalTemperatures")
164  return PopulationType::ByNLTEVibrationalTemperatures;
165  else if (in == "NLTE")
166  return PopulationType::ByNLTEPopulationDistribution;
167  else
168  throw std::runtime_error("Cannot recognize the population type");
169 }
170 
172  switch (in) {
173  case PopulationType::ByLTE:
174  return "LTE";
176  return "ByHITRANFullRelmat";
177  case PopulationType::ByHITRANRosenkranzRelmat:
178  return "ByHITRANRosenkranzRelmat";
179  case PopulationType::ByNLTEVibrationalTemperatures:
180  return "NLTE-VibrationalTemperatures";
181  case PopulationType::ByNLTEPopulationDistribution:
182  return "NLTE";
183  } std::terminate();
184 }
185 
187  switch (in) {
188  case PopulationType::ByLTE:
189  return "The lines are considered as in pure LTE.\n";
191  return "The lines requires relaxation matrix calculations in LTE - HITRAN full method.\n";
192  case PopulationType::ByHITRANRosenkranzRelmat:
193  return "The lines requires Relaxation matrix calculations in LTE - HITRAN Rosenkranz method.\n";
194  case PopulationType::ByNLTEVibrationalTemperatures:
195  return "The lines are considered as in NLTE by vibrational temperatures.\n";
196  case PopulationType::ByNLTEPopulationDistribution:
197  return "The lines are considered as in pure NLTE.\n";
198  } std::terminate();
199 }
200 
202  return in == PopulationType::ByHITRANFullRelmat or
203  in == PopulationType::ByHITRANRosenkranzRelmat;
204 }
205 
207 enum class CutoffType : Index {
208  None, // No cutoff frequency at all
209  LineByLineOffset, // The cutoff frequency is at SingleLine::F0 plus the cutoff frequency
210  BandFixedFrequency, // The curoff frequency is the cutoff frequency for all SingleLine(s)
211 }; // LineCutoffType
212 
214  if (in == "None")
215  return CutoffType::None;
216  else if (in == "ByLine")
217  return CutoffType::LineByLineOffset;
218  else if (in == "ByBand")
220  else
221  throw std::runtime_error("Cannot recognize the cutoff type");
222 }
223 
225  if (in == CutoffType::None)
226  return "None";
227  else if (in == CutoffType::LineByLineOffset)
228  return "ByLine";
229  else if (in == CutoffType::BandFixedFrequency)
230  return "ByBand";
231  std::terminate();
232 }
233 
235  std::ostringstream os;
236  if (in == CutoffType::None)
237  os << "No cut-off will be applied.\n";
238  else if (in == CutoffType::LineByLineOffset)
239  os << "The lines will be cut-off " << cutoff << " Hz from the line center.\n";
240  else if (in == CutoffType::BandFixedFrequency)
241  os << "All lines are cut-off at " << cutoff << " Hz.\n";
242  return os.str();
243 }
244 
246 class SingleLine {
247 private:
250 
253 
256 
259 
262 
265 
268 
271 
273  std::vector<Rational> mlowerquanta;
274 
276  std::vector<Rational> mupperquanta;
277 
278 public:
293  Numeric I0=0,
294  Numeric E0=0,
295  Numeric glow=0,
296  Numeric gupp=0,
297  Numeric A=0,
298  Zeeman::Model zeeman=Zeeman::Model(),
299  const LineShape::Model& lineshape=LineShape::Model(),
300  const std::vector<Rational>& lowerquanta={},
301  const std::vector<Rational>& upperquanta={}) :
302  mF0(F0),
303  mI0(I0),
304  mE0(E0),
305  mglow(glow),
306  mgupp(gupp),
307  mA(A),
308  mzeeman(zeeman),
309  mlineshape(lineshape),
310  mlowerquanta(lowerquanta),
311  mupperquanta(upperquanta) {}
312 
318  SingleLine(size_t nbroadeners, size_t nquanta, const LineShape::Model& metamodel) :
319  mlineshape(metamodel), mlowerquanta(nquanta), mupperquanta(nquanta) {
320  if(Index(nbroadeners) not_eq mlineshape.nelem())
321  throw std::runtime_error("Mismatch between broadeners and model");
322  }
323 
327 
329  Index LineShapeElems() const noexcept {return mlineshape.nelem();}
330 
332  Index LowerQuantumElems() const noexcept {return mlowerquanta.size();}
333 
335  Index UpperQuantumElems() const noexcept {return mupperquanta.size();}
336 
340 
342  Numeric F0() const noexcept {return mF0;}
343 
345  Numeric E0() const noexcept {return mE0;}
346 
348  Numeric I0() const noexcept {return mI0;}
349 
351  Numeric A() const noexcept {return mA;}
352 
354  Numeric g_low() const noexcept {return mglow;}
355 
357  Numeric g_upp() const noexcept {return mgupp;}
358 
360  Zeeman::Model Zeeman() const noexcept {return mzeeman;}
361 
363  const LineShape::Model& LineShape() const noexcept {return mlineshape;}
364 
366  const std::vector<Rational>& LowerQuantumNumbers() const noexcept {return mlowerquanta;}
367 
369  const std::vector<Rational>& UpperQuantumNumbers() const noexcept {return mupperquanta;}
370 
374 
376  Numeric& F0() noexcept {return mF0;}
377 
379  Numeric& E0() noexcept {return mE0;}
380 
382  Numeric& I0() noexcept {return mI0;}
383 
385  Numeric& A() noexcept {return mA;}
386 
388  Numeric& g_low() noexcept {return mglow;}
389 
391  Numeric& g_upp() noexcept {return mgupp;}
392 
394  Zeeman::Model& Zeeman() noexcept {return mzeeman;}
395 
397  LineShape::Model& LineShape() noexcept {return mlineshape;}
398 
400  std::vector<Rational>& LowerQuantumNumbers() noexcept {return mlowerquanta;}
401 
403  std::vector<Rational>& UpperQuantumNumbers() noexcept {return mupperquanta;}
404 
408 
410  void F0(Numeric x) noexcept {mF0 = x;}
411 
413  void E0(Numeric x) noexcept {mE0 = x;}
414 
416  void I0(Numeric x) noexcept {mI0 = x;}
417 
419  void A(Numeric x) noexcept {mA = x;}
420 
422  void g_low(Numeric x) noexcept {mglow = x;}
423 
425  void g_upp(Numeric x) noexcept {mgupp = x;}
426 
430 
432  Rational LowerQuantumNumber(size_t i) const noexcept {return mlowerquanta[i];}
433 
435  Rational UpperQuantumNumber(size_t i) const noexcept {return mupperquanta[i];}
436 
438  Rational& LowerQuantumNumber(size_t i) noexcept {return mlowerquanta[i];}
439 
441  Rational& UpperQuantumNumber(size_t i) noexcept {return mupperquanta[i];}
442 
444  bool SameQuantumNumbers(const SingleLine& sl) const noexcept;
445 
449 
457  void SetAutomaticZeeman(QuantumIdentifier qid, const std::vector<QuantumNumberType>& keys) {
458  for(size_t i=0; i<keys.size(); i++) {
459  qid.LowerQuantumNumber(keys[i]) = mlowerquanta[i];
460  qid.UpperQuantumNumber(keys[i]) = mupperquanta[i];
461  }
462 
463  mzeeman = Zeeman::Model(qid);
464  }
465 
473  d, LineShape::LegacyLineMixingData::TypeLM::LM_2NDORDER)
474  .Data()[0]);
475  }
476 
481  void SetLineMixing2AER(const Vector& d) {
482  const LineShape::ModelParameters Y = {LineShape::TemperatureModel::LM_AER, d[4], d[5], d[6], d[7]};
483  const LineShape::ModelParameters G = {LineShape::TemperatureModel::LM_AER, d[8], d[9], d[10], d[11]};
484  for (auto& sm : mlineshape.Data()) {
485  sm.Y() = Y;
486  sm.G() = G;
487  }
488  }
489 
493  bif >> mF0 >> mI0 >> mE0 >> mglow >> mgupp >> mA >> mzeeman;
494 
496  mlineshape.read(bif);
497 
499  for (auto& rat: mlowerquanta) rat.read(bif);
500 
502  for (auto& rat: mupperquanta) rat.read(bif);
503 
504  return bif;
505  }
506 
508  bofstream& write(bofstream& bof) const {
510  bof << mF0 << mI0 << mE0 << mglow << mgupp << mA << mzeeman;
511 
513  mlineshape.write(bof);
514 
516  for (auto& rat: mlowerquanta) rat.write(bof);
517 
519  for (auto& rat: mupperquanta) rat.write(bof);
520 
521  return bof;
522  }
523 }; // SingleLine
524 
525 std::ostream& operator<<(std::ostream&, const SingleLine&);
526 
527 std::istream& operator>>(std::istream&, SingleLine&);
528 
531  bool bad=true;
532  bool selfbroadening=false;
533  bool bathbroadening=false;
534  CutoffType cutoff=CutoffType::None;
535  MirroringType mirroring=MirroringType::None;
536  PopulationType population=PopulationType::ByLTE;
537  NormalizationType normalization=NormalizationType::None;
538  LineShape::Type lineshapetype=LineShape::Type::DP;
545 };
546 
547 class Lines {
548 private:
551 
554 
557 
560 
563 
566 
569 
572 
575 
578 
581 
583  std::vector<QuantumNumberType> mlocalquanta;
584 
587 
589  std::vector<SingleLine> mlines;
590 
591 public:
609  Lines(bool selfbroadening=false,
610  bool bathbroadening=false,
611  CutoffType cutoff=CutoffType::None,
612  MirroringType mirroring=MirroringType::None,
613  PopulationType population=PopulationType::ByLTE,
614  NormalizationType normalization=NormalizationType::None,
615  LineShape::Type lineshapetype=LineShape::Type::DP,
616  Numeric T0=296,
617  Numeric cutofffreq=-1,
618  Numeric linemixinglimit=-1,
619  const QuantumIdentifier& quantumidentity=QuantumIdentifier(),
620  const std::vector<QuantumNumberType>& localquanta={},
621  const ArrayOfSpeciesTag& broadeningspecies={},
622  const std::vector<SingleLine>& lines={}) :
623  mselfbroadening(selfbroadening),
624  mbathbroadening(bathbroadening),
625  mcutoff(cutoff),
626  mmirroring(mirroring),
627  mpopulation(population),
628  mnormalization(normalization),
629  mlineshapetype(lineshapetype),
630  mT0(T0),
631  mcutofffreq(cutofffreq),
632  mlinemixinglimit(linemixinglimit),
633  mquantumidentity(quantumidentity),
634  mlocalquanta(localquanta),
635  mbroadeningspecies(broadeningspecies),
636  mlines(lines) {};
637 
656  Lines(bool selfbroadening,
657  bool bathbroadening,
658  size_t nlines,
659  CutoffType cutoff,
660  MirroringType mirroring,
661  PopulationType population,
662  NormalizationType normalization,
663  LineShape::Type lineshapetype,
664  Numeric T0,
665  Numeric cutofffreq,
666  Numeric linemixinglimit,
667  const QuantumIdentifier& quantumidentity,
668  const std::vector<QuantumNumberType>& localquanta,
669  const ArrayOfSpeciesTag& broadeningspecies,
670  const LineShape::Model& metamodel) :
671  mselfbroadening(selfbroadening),
672  mbathbroadening(bathbroadening),
673  mcutoff(cutoff),
674  mmirroring(mirroring),
675  mpopulation(population),
676  mnormalization(normalization),
677  mlineshapetype(lineshapetype),
678  mT0(T0),
679  mcutofffreq(cutofffreq),
680  mlinemixinglimit(linemixinglimit),
681  mquantumidentity(quantumidentity),
682  mlocalquanta(localquanta),
683  mbroadeningspecies(broadeningspecies),
684  mlines(nlines,
685  SingleLine(broadeningspecies.size(),
686  localquanta.size(), metamodel)) {};
687 
701  if(NumLocalQuanta() not_eq sl.LowerQuantumElems() or
702  NumLocalQuanta() not_eq sl.UpperQuantumElems())
703  throw std::runtime_error("Error calling appending function, bad size of quantum numbers");
704 
705  if(NumLines() not_eq 0 and
706  sl.LineShapeElems() not_eq mlines[0].LineShapeElems())
707  throw std::runtime_error("Error calling appending function, bad size of broadening species");
708 
709  mlines.push_back(std::move(sl));
710  }
711 
724  void AppendSingleLine(const SingleLine& sl) {
725  if(NumLocalQuanta() not_eq sl.LowerQuantumElems() or
726  NumLocalQuanta() not_eq sl.UpperQuantumElems())
727  throw std::runtime_error("Error calling appending function, bad size of quantum numbers");
728 
729  if(NumLines() not_eq 0 and
730  sl.LineShapeElems() not_eq mlines[0].LineShapeElems())
731  throw std::runtime_error("Error calling appending function, bad size of broadening species");
732 
733  mlines.push_back(sl);
734  }
735 
741  bool MatchWithExternal(const SingleLineExternal& sle, const QuantumIdentifier& quantumidentity) const noexcept {
742  if(sle.bad)
743  return false;
744  else if(sle.selfbroadening not_eq mselfbroadening)
745  return false;
746  else if(sle.bathbroadening not_eq mbathbroadening)
747  return false;
748  else if(sle.cutoff not_eq mcutoff)
749  return false;
750  else if(sle.mirroring not_eq mmirroring)
751  return false;
752  else if(sle.population not_eq mpopulation)
753  return false;
754  else if(sle.normalization not_eq mnormalization)
755  return false;
756  else if(sle.lineshapetype not_eq mlineshapetype)
757  return false;
758  else if(sle.T0 not_eq mT0)
759  return false;
760  else if(sle.cutofffreq not_eq mcutofffreq)
761  return false;
762  else if(sle.linemixinglimit not_eq mlinemixinglimit)
763  return false;
764  else if(quantumidentity not_eq mquantumidentity)
765  return false;
766  else if(not std::equal(sle.species.cbegin(), sle.species.cend(), mbroadeningspecies.cbegin(), mbroadeningspecies.cend()))
767  return false;
768  else if(NumLines() not_eq 0 and not sle.line.LineShape().Match(mlines[0].LineShape()))
769  return false;
770  else
771  return true;
772  }
773 
779  bool Match(const Lines& l) const noexcept {
780  if(l.mselfbroadening not_eq mselfbroadening)
781  return false;
782  else if(l.mbathbroadening not_eq mbathbroadening)
783  return false;
784  else if(l.mcutoff not_eq mcutoff)
785  return false;
786  else if(l.mmirroring not_eq mmirroring)
787  return false;
788  else if(l.mpopulation not_eq mpopulation)
789  return false;
790  else if(l.mnormalization not_eq mnormalization)
791  return false;
792  else if(l.mlineshapetype not_eq mlineshapetype)
793  return false;
794  else if(l.mT0 not_eq mT0)
795  return false;
796  else if(l.mcutofffreq not_eq mcutofffreq)
797  return false;
798  else if(l.mlinemixinglimit not_eq mlinemixinglimit)
799  return false;
800  else if(l.mquantumidentity not_eq mquantumidentity)
801  return false;
802  else if(not std::equal(l.mbroadeningspecies.cbegin(), l.mbroadeningspecies.cend(), mbroadeningspecies.cbegin(), mbroadeningspecies.cend()))
803  return false;
804  else if(not std::equal(l.mlocalquanta.cbegin(), l.mlocalquanta.cend(), mlocalquanta.cbegin(), mlocalquanta.cend()))
805  return false;
806  else if(NumLines() not_eq 0 and l.NumLines() not_eq 0 and not l.mlines[0].LineShape().Match(mlines[0].LineShape()))
807  return false;
808  else
809  return true;
810  }
811 
814  std::sort(mlines.begin(), mlines.end(),
815  [](const SingleLine& a, const SingleLine& b){return a.F0() < b.F0();});
816  }
817 
820  std::sort(mlines.begin(), mlines.end(),
821  [](const SingleLine& a, const SingleLine& b){return a.A() < b.A();});
822  }
823 
827  }
828 
830  String SpeciesName() const noexcept;
831 
833  String UpperQuantumNumbers() const noexcept;
834 
836  String LowerQuantumNumbers() const noexcept;
837 
839  String LineShapeMetaData() const noexcept {
840  return NumLines() ?
842  "";
843  }
844 
846  Index Species() const noexcept {return mquantumidentity.Species();}
847 
849  Index Isotopologue() const noexcept {return mquantumidentity.Isotopologue();}
850 
852  Index NumLines() const noexcept {return Index(mlines.size());}
853 
855  const std::vector<SingleLine>& AllLines() const noexcept {return mlines;}
856 
858  std::vector<SingleLine>& AllLines() noexcept {return mlines;}
859 
861  Index NumBroadeners() const noexcept {return Index(mbroadeningspecies.nelem());}
862 
864  Index NumLocalQuanta() const noexcept {return Index(mlocalquanta.size());}
865 
869 
872  void RemoveLocalQuantum(size_t);
873 
880  Rational LowerQuantumNumber(size_t k, QuantumNumberType qnt) const noexcept;
881 
888  Rational UpperQuantumNumber(size_t k, QuantumNumberType qnt) const noexcept;
889 
896  Rational& LowerQuantumNumber(size_t k, QuantumNumberType qnt) noexcept;
897 
904  Rational& UpperQuantumNumber(size_t k, QuantumNumberType qnt) noexcept;
905 
911  Index ZeemanCount(size_t k, Zeeman::Polarization type) const noexcept {
912  if (UpperQuantumNumber(k, QuantumNumberType::F).isDefined() and LowerQuantumNumber(k, QuantumNumberType::F).isDefined()) {
915  type);
916  } else {
919  type);
920  }
921  }
922 
929  Numeric ZeemanStrength(size_t k, Zeeman::Polarization type, Index i) const noexcept {
930  if (UpperQuantumNumber(k, QuantumNumberType::F).isDefined() and LowerQuantumNumber(k, QuantumNumberType::F).isDefined()) {
931  return mlines[k].Zeeman().Strength(UpperQuantumNumber(k, QuantumNumberType::F),
933  type, i);
934  } else {
935  return mlines[k].Zeeman().Strength(UpperQuantumNumber(k, QuantumNumberType::J),
937  type, i);
938  }
939  }
940 
947  Numeric ZeemanSplitting(size_t k, Zeeman::Polarization type, Index i) const noexcept {
948  if (UpperQuantumNumber(k, QuantumNumberType::F).isDefined() and LowerQuantumNumber(k, QuantumNumberType::F).isDefined()) {
949  return mlines[k].Zeeman().Splitting(UpperQuantumNumber(k, QuantumNumberType::F),
951  type, i);
952  } else {
953  return mlines[k].Zeeman().Splitting(UpperQuantumNumber(k, QuantumNumberType::J),
955  type, i);
956  }
957  }
958 
960  void SetAutomaticZeeman() noexcept {
961  for(auto& line: mlines)
962  line.SetAutomaticZeeman(mquantumidentity, mlocalquanta);
963  }
964 
970  Numeric F0(size_t k) const noexcept {return mlines[k].F0();}
971 
977  Numeric& F0(size_t k) noexcept {return mlines[k].F0();}
978 
983  Numeric F_mean() const noexcept {
984  const Numeric val = std::inner_product(mlines.cbegin(), mlines.cend(),
985  mlines.cbegin(), 0.0, std::plus<Numeric>(),
986  [](const auto& a, const auto& b){return a.F0() * b.I0();});
987  const Numeric div = std::accumulate(mlines.cbegin(), mlines.cend(), 0.0,
988  [](const auto& a, const auto& b){return a + b.I0();});
989  return val / div;
990  }
991 
997  Numeric F_mean(const ConstVectorView wgts) const noexcept {
998  const Numeric val = std::inner_product(mlines.cbegin(), mlines.cend(),
999  wgts.begin(), 0.0, std::plus<Numeric>(),
1000  [](const auto& a, const auto& b){return a.F0() * b;});
1001  const Numeric div = wgts.sum();
1002  return val / div;
1003  }
1004 
1010  Numeric E0(size_t k) const noexcept {return mlines[k].E0();}
1011 
1017  Numeric& E0(size_t k) noexcept {return mlines[k].E0();}
1018 
1024  Numeric I0(size_t k) const noexcept {return mlines[k].I0();}
1025 
1031  Numeric& I0(size_t k) noexcept {return mlines[k].I0();}
1032 
1038  Numeric A(size_t k) const noexcept {return mlines[k].A();}
1039 
1045  Numeric& A(size_t k) noexcept {return mlines[k].A();}
1046 
1052  Numeric g_low(size_t k) const noexcept {return mlines[k].g_low();}
1053 
1059  Numeric& g_low(size_t k) noexcept {return mlines[k].g_low();}
1060 
1066  Numeric g_upp(size_t k) const noexcept {return mlines[k].g_upp();}
1067 
1073  Numeric& g_upp(size_t k) noexcept {return mlines[k].g_upp();}
1074 
1076  MirroringType Mirroring() const noexcept {return mmirroring;}
1077 
1079  void Mirroring(MirroringType x) noexcept {mmirroring = x;}
1080 
1082  static bool validIndexForMirroring(Index x) noexcept {
1083  constexpr auto keys = stdarrayify(Index(MirroringType::None), MirroringType::None, MirroringType::Lorentz, MirroringType::SameAsLineShape, MirroringType::Manual);
1084  return std::any_of(keys.cbegin(), keys.cend(), [x](auto y){return x == y;});
1085  }
1086 
1088  static MirroringType string2Mirroring(const String& in) noexcept {
1089  if (in == "None")
1090  return MirroringType::None;
1091  else if (in == "Lorentz")
1092  return MirroringType::Lorentz;
1093  else if (in == "Same")
1094  return MirroringType::SameAsLineShape;
1095  else if (in == "Manual")
1096  return MirroringType::Manual;
1097  else
1098  return MirroringType(-1);
1099  }
1100 
1103 
1106 
1108  static bool validIndexForNormalization(Index x) noexcept {
1109  constexpr auto keys = stdarrayify(Index(NormalizationType::None), NormalizationType::VVH, NormalizationType::VVW, NormalizationType::RosenkranzQuadratic);
1110  return std::any_of(keys.cbegin(), keys.cend(), [x](auto y){return x == y;});
1111  }
1112 
1114  static NormalizationType string2Normalization(const String& in) noexcept {
1115  if (in == "None")
1116  return NormalizationType::None;
1117  else if (in == "VVH")
1118  return NormalizationType::VVH;
1119  else if (in == "VVW")
1120  return NormalizationType::VVW;
1121  else if (in == "RQ")
1123  else
1124  return NormalizationType(-1);
1125  }
1126 
1128  CutoffType Cutoff() const noexcept {return mcutoff;}
1129 
1131  void Cutoff(CutoffType x) noexcept {mcutoff = x;}
1132 
1134  static bool validIndexForCutoff(Index x) noexcept {
1135  constexpr auto keys = stdarrayify(Index(CutoffType::None), CutoffType::LineByLineOffset, CutoffType::BandFixedFrequency);
1136  return std::any_of(keys.cbegin(), keys.cend(), [x](auto y){return x == y;});
1137  }
1138 
1140  static CutoffType string2Cutoff(const String& in) noexcept {
1141  if (in == "None")
1142  return CutoffType::None;
1143  else if (in == "ByLine")
1144  return CutoffType::LineByLineOffset;
1145  else if (in == "ByBand")
1147  else
1148  return CutoffType(-1);
1149  }
1150 
1152  PopulationType Population() const noexcept {return mpopulation;}
1153 
1156 
1158  static bool validIndexForPopulation(Index x) noexcept {
1159  constexpr auto keys = stdarrayify(Index(PopulationType::ByLTE), PopulationType::ByHITRANFullRelmat, PopulationType::ByHITRANRosenkranzRelmat, PopulationType::ByNLTEVibrationalTemperatures, PopulationType::ByNLTEPopulationDistribution);
1160  return std::any_of(keys.cbegin(), keys.cend(), [x](auto y){return x == y;});
1161  }
1162 
1164  static PopulationType string2Population(const String& in) noexcept {
1165  if (in == "LTE")
1166  return PopulationType::ByLTE;
1167  else if (in == "ByHITRANFullRelmat")
1169  else if (in == "ByHITRANRosenkranzRelmat")
1170  return PopulationType::ByHITRANRosenkranzRelmat;
1171  else if (in == "NLTE-VibrationalTemperatures")
1172  return PopulationType::ByNLTEVibrationalTemperatures;
1173  else if (in == "NLTE")
1174  return PopulationType::ByNLTEPopulationDistribution;
1175  else
1176  return PopulationType(-1);
1177  }
1178 
1180  LineShape::Type LineShapeType() const noexcept {return mlineshapetype;}
1181 
1184 
1186  static bool validIndexForLineShapeType(Index x) noexcept {
1187  constexpr auto keys = stdarrayify(Index(LineShape::Type::DP), LineShape::Type::LP, LineShape::Type::VP, LineShape::Type::SDVP, LineShape::Type::HTP);
1188  return std::any_of(keys.cbegin(), keys.cend(), [x](auto y){return x == y;});
1189  }
1190 
1192  static LineShape::Type string2LineShapeType(const String& type) noexcept {
1193  if (type == "DP")
1194  return LineShape::Type::DP;
1195  else if (type == String("LP"))
1196  return LineShape::Type::LP;
1197  else if (type == String("VP"))
1198  return LineShape::Type::VP;
1199  else if (type == String("SDVP"))
1200  return LineShape::Type::SDVP;
1201  else if (type == String("HTP"))
1202  return LineShape::Type::HTP;
1203  else
1204  return LineShape::Type(-1);
1205  }
1206 
1212  bool DoLineMixing(Numeric P) const noexcept {
1213  return mlinemixinglimit < 0 ? true : mlinemixinglimit > P;
1214  }
1215 
1224  LineShape::Output ShapeParameters(size_t k, Numeric T, Numeric P, const Vector& vmrs) const noexcept;
1225 
1234  LineShape::Output ShapeParameters_dT(size_t k, Numeric T, Numeric P, const Vector& vmrs) const noexcept;
1235 
1241  Index LineShapePos(const Index& spec) const noexcept;
1242 
1248  Index LineShapePos(const QuantumIdentifier& qid) const noexcept {
1249  return LineShapePos(qid.Species());
1250  }
1251 
1261  const QuantumIdentifier& vmr_qid) const noexcept;
1262 
1273  const Vector& vmrs,
1274  const RetrievalQuantity& derivative) const noexcept;
1275 
1281  Numeric CutoffFreq(size_t k) const noexcept {
1282  switch(mcutoff) {
1283  case CutoffType::LineByLineOffset:
1284  return F0(k) + mcutofffreq;
1286  return mcutofffreq;
1287  case CutoffType::None:
1289  }
1290  std::terminate();
1291  }
1292 
1298  Numeric CutoffFreqMinus(size_t k, Numeric fmean) const noexcept {
1299  switch(mcutoff) {
1300  case CutoffType::LineByLineOffset:
1301  return F0(k) - mcutofffreq;
1303  return mcutofffreq - 2*fmean;
1304  case CutoffType::None:
1305  return std::numeric_limits<Numeric>::lowest();
1306  }
1307  std::terminate();
1308  }
1309 
1311  Numeric T0() const noexcept {
1312  return mT0;
1313  }
1314 
1316  void T0(Numeric x) noexcept {
1317  mT0 = x;
1318  }
1319 
1321  Numeric CutoffFreqValue() const noexcept {
1322  return mcutofffreq;
1323  }
1324 
1326  void CutoffFreqValue(Numeric x) noexcept {
1327  mcutofffreq = x;
1328  }
1329 
1331  Numeric LinemixingLimit() const noexcept {
1332  return mlinemixinglimit;
1333  }
1334 
1336  void LinemixingLimit(Numeric x) noexcept {
1337  mlinemixinglimit = x;
1338  }
1339 
1341  const std::vector<QuantumNumberType>& LocalQuanta() const noexcept {
1342  return mlocalquanta;
1343  }
1344 
1346  std::vector<QuantumNumberType>& LocalQuanta() noexcept {
1347  return mlocalquanta;
1348  }
1349 
1351  const ArrayOfSpeciesTag& BroadeningSpecies() const noexcept {
1352  return mbroadeningspecies;
1353  }
1354 
1357  return mbroadeningspecies;
1358  }
1359 
1361  bool Self() const noexcept {
1362  return mselfbroadening;
1363  }
1364 
1366  void Self(bool x) noexcept {
1367  mselfbroadening = x;
1368  }
1369 
1371  bool Bath() const noexcept {
1372  return mbathbroadening;
1373  }
1374 
1376  void Bath(bool x) noexcept {
1377  mbathbroadening = x;
1378  }
1379 
1381  const QuantumIdentifier& QuantumIdentity() const noexcept {
1382  return mquantumidentity;
1383  }
1384 
1387  return mquantumidentity;
1388  }
1389 
1393  for (size_t i=0; i<mlocalquanta.size(); i++) {
1394  qid_copy.UpperQuantumNumber(mlocalquanta[i]) = mlines[k].UpperQuantumNumber(i);
1395  qid_copy.LowerQuantumNumber(mlocalquanta[i]) = mlines[k].LowerQuantumNumber(i);
1396  }
1397  return qid_copy;
1398  }
1399 
1401  String MetaData() const;
1402 
1404  void RemoveLine(Index) noexcept;
1405 
1407  SingleLine PopLine(Index) noexcept;
1408 
1410  SingleLine& Line(Index) noexcept;
1411 
1413  const SingleLine& Line(Index) const noexcept;
1414 
1416  void ReverseLines() noexcept;
1417 
1419  Numeric SpeciesMass() const noexcept;
1420 
1428 
1436 
1439  for (auto& line: mlines)
1440  line.read(is);
1441  return is;
1442  }
1443 
1445  bofstream& write(bofstream& os) const {
1446  for (auto& line: mlines)
1447  line.write(os);
1448  return os;
1449  }
1450 
1451  bool OK() const noexcept;
1452 }; // Lines
1453 
1454 std::ostream& operator<<(std::ostream&, const Lines&);
1455 std::istream& operator>>(std::istream&, Lines&);
1456 
1463 
1470 
1477 
1535 
1591 
1606 
1615 
1676 
1722 
1733 std::vector<Lines> split_list_of_external_lines(std::vector<SingleLineExternal>& external_lines,
1734  const std::vector<QuantumNumberType>& localquantas={},
1735  const std::vector<QuantumNumberType>& globalquantas={});
1736 
1743 Lines createEmptyCopy(const Lines& al) noexcept;
1744 
1754 bool line_in_id(const Lines& band, const QuantumIdentifier& id, size_t line_index);
1755 
1762 bool line_is_id(const Lines& band, const QuantumIdentifier& id, size_t line_index);
1763 
1773 bool id_in_line(const Lines& band, const QuantumIdentifier& id, size_t line_index);
1774 
1784 bool line_upper_in_id(const Lines& band, const QuantumIdentifier& id, size_t line_index);
1785 
1795 bool line_lower_in_id(const Lines& band, const QuantumIdentifier& id, size_t line_index);
1796 
1806 bool id_in_line_upper(const Lines& band, const QuantumIdentifier& id, size_t line_index);
1807 
1817 bool id_in_line_lower(const Lines& band, const QuantumIdentifier& id, size_t line_index);
1818 
1820 inline Index nelem(const Lines& l) {return l.NumLines();}
1821 
1823 inline Index nelem(const Array<Lines>& l) {Index n=0; for (auto& x:l) n+=nelem(x); return n;}
1824 
1826 inline Index nelem(const Array<Array<Lines>>& l) {Index n=0; for (auto& x:l) n+=nelem(x); return n;}
1827 
1838 
1847 }; // Absorption
1848 
1853 
1854 std::ostream& operator<<(std::ostream&, const ArrayOfAbsorptionLines&);
1855 
1856 std::ostream& operator<<(std::ostream&, const ArrayOfArrayOfAbsorptionLines&);
1857 
1858 #endif // absorptionlines_h
AbsorptionSingleLine
Absorption::SingleLine AbsorptionSingleLine
Definition: absorptionlines.h:1847
Absorption::SingleLineExternal::cutoff
CutoffType cutoff
Definition: absorptionlines.h:534
Absorption::SingleLine::LowerQuantumNumber
Rational LowerQuantumNumber(size_t i) const noexcept
Lower quantum number.
Definition: absorptionlines.h:432
Absorption::Lines::Cutoff
CutoffType Cutoff() const noexcept
Returns cutoff style.
Definition: absorptionlines.h:1128
Absorption::Lines::mcutoff
CutoffType mcutoff
cutoff type, by band or by line
Definition: absorptionlines.h:556
Absorption::SingleLine::mgupp
Numeric mgupp
Upper level statistical weight.
Definition: absorptionlines.h:261
Absorption::Lines::Mirroring
void Mirroring(MirroringType x) noexcept
Returns mirroring style.
Definition: absorptionlines.h:1079
Absorption::Lines::LowerQuantumNumber
Rational LowerQuantumNumber(size_t k, QuantumNumberType qnt) const noexcept
Quantum number lower level.
Definition: absorptionlines.cc:40
Zeeman::Model
Main Zeeman Model.
Definition: zeemandata.h:358
Absorption::Lines::CutoffFreqValue
void CutoffFreqValue(Numeric x) noexcept
Sets internal cutoff frequency value.
Definition: absorptionlines.h:1326
Absorption::SingleLine::mF0
Numeric mF0
Central frequency.
Definition: absorptionlines.h:249
Absorption::SingleLine::I0
void I0(Numeric x) noexcept
Reference line strength.
Definition: absorptionlines.h:416
QuantumIdentifier::Isotopologue
void Isotopologue(Index iso)
Set the Isotopologue.
Definition: quantum.h:487
QuantumNumbers
Container class for Quantum Numbers.
Definition: quantum.h:222
Absorption::SingleLine::A
Numeric A() const noexcept
Einstein spontaneous emission.
Definition: absorptionlines.h:351
Absorption::Lines::g_low
Numeric g_low(size_t k) const noexcept
Lower level statistical weight.
Definition: absorptionlines.h:1052
Absorption::SingleLine::UpperQuantumElems
Index UpperQuantumElems() const noexcept
Number of upper quantum numbers.
Definition: absorptionlines.h:335
Absorption::Lines::AllLines
const std::vector< SingleLine > & AllLines() const noexcept
Lines.
Definition: absorptionlines.h:855
matpack.h
QuantumIdentifier
Class to identify and match lines by their quantum numbers.
Definition: quantum.h:390
Absorption::SingleLine::F0
Numeric F0() const noexcept
Central frequency.
Definition: absorptionlines.h:342
Absorption::Lines::F_mean
Numeric F_mean(const ConstVectorView wgts) const noexcept
Mean frequency by weight of line strengt.
Definition: absorptionlines.h:997
Absorption::SingleLine::LineShape
LineShape::Model & LineShape() noexcept
Line shape model.
Definition: absorptionlines.h:397
Absorption::Lines::mlines
std::vector< SingleLine > mlines
A list of individual lines.
Definition: absorptionlines.h:589
Absorption::SingleLine::g_upp
Numeric g_upp() const noexcept
Upper level statistical weight.
Definition: absorptionlines.h:357
Absorption::Lines::BroadeningSpeciesVMR
Vector BroadeningSpeciesVMR(const ConstVectorView, const ArrayOfArrayOfSpeciesTag &) const
Returns the VMRs of the broadening species.
Definition: absorptionlines.cc:2730
Absorption::Lines::AppendSingleLine
void AppendSingleLine(SingleLine &&sl)
Appends a single line to the absorption lines.
Definition: absorptionlines.h:700
Absorption::Lines::QuantumIdentityOfLine
QuantumIdentifier QuantumIdentityOfLine(Index k) const noexcept
Returns identity status.
Definition: absorptionlines.h:1391
Absorption::Lines::LineShapeType
LineShape::Type LineShapeType() const noexcept
Returns lineshapetype style.
Definition: absorptionlines.h:1180
Absorption::Lines::F_mean
Numeric F_mean() const noexcept
Mean frequency by weight of line strengt.
Definition: absorptionlines.h:983
Absorption::Lines::mlinemixinglimit
Numeric mlinemixinglimit
linemixing limit
Definition: absorptionlines.h:577
Absorption::SingleLine::F0
Numeric & F0() noexcept
Central frequency.
Definition: absorptionlines.h:376
Absorption::Lines::Normalization
void Normalization(NormalizationType x) noexcept
Returns normalization style.
Definition: absorptionlines.h:1105
Absorption::SingleLine::I0
Numeric I0() const noexcept
Reference line strength.
Definition: absorptionlines.h:348
Absorption::SingleLineExternal::T0
Numeric T0
Definition: absorptionlines.h:539
Absorption::Lines::sort_by_einstein
void sort_by_einstein()
Sort inner line list by Einstein coefficient.
Definition: absorptionlines.h:819
LineShape::ModelShape2MetaData
String ModelShape2MetaData(const Model &m)
Definition: lineshapemodel.cc:538
Absorption::Lines::truncate_global_quantum_numbers
void truncate_global_quantum_numbers()
Removes all global quantum numbers.
Definition: absorptionlines.h:825
QuantumNumberType::F
@ F
Absorption::Lines::NumLines
Index NumLines() const noexcept
Number of lines.
Definition: absorptionlines.h:852
Absorption::ReadFromJplStream
SingleLineExternal ReadFromJplStream(istream &is)
Read from JPL.
Definition: absorptionlines.cc:3310
Absorption::SingleLine::SetLineMixing2SecondOrderData
void SetLineMixing2SecondOrderData(const Vector &d)
Set the line mixing model to 2nd order.
Definition: absorptionlines.h:470
Absorption::normalizationtype2string
String normalizationtype2string(NormalizationType in)
Definition: absorptionlines.h:117
Absorption::id_in_line
bool id_in_line(const Lines &band, const QuantumIdentifier &id, size_t line_index)
Checks if the external quantum identifier match a line's ID.
Definition: absorptionlines.cc:2840
Absorption::Lines::T0
Numeric T0() const noexcept
Returns reference temperature.
Definition: absorptionlines.h:1311
Absorption::Lines::ZeemanSplitting
Numeric ZeemanSplitting(size_t k, Zeeman::Polarization type, Index i) const noexcept
Returns the splitting of a Zeeman split line.
Definition: absorptionlines.h:947
Absorption::SingleLineExternal::lineshapetype
LineShape::Type lineshapetype
Definition: absorptionlines.h:538
LineShape::Type::DP
@ DP
Absorption::operator<<
std::ostream & operator<<(std::ostream &, const SingleLine &)
Definition: absorptionlines.cc:2497
Absorption::SingleLine::mE0
Numeric mE0
Lower state energy level.
Definition: absorptionlines.h:255
Absorption::NormalizationType
NormalizationType
Describes the type of normalization line effects.
Definition: absorptionlines.h:97
Absorption::Lines::SelfVMR
Numeric SelfVMR(const ConstVectorView, const ArrayOfArrayOfSpeciesTag &) const
Returns the VMR of the species.
Definition: absorptionlines.cc:2737
Absorption::Lines::CutoffFreq
Numeric CutoffFreq(size_t k) const noexcept
Returns cutoff frequency or maximum value.
Definition: absorptionlines.h:1281
Absorption::Lines::Bath
bool Bath() const noexcept
Returns bath broadening status.
Definition: absorptionlines.h:1371
QuantumNumberType
QuantumNumberType
Enum for Quantum Numbers used for indexing.
Definition: quantum.h:48
linalg::std
void std(VectorView std, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
Compute the standard deviation of the ranged ys.
Definition: raw.cc:66
Absorption::Lines::E0
Numeric & E0(size_t k) noexcept
Lower level energy.
Definition: absorptionlines.h:1017
Absorption::Lines::Normalization
NormalizationType Normalization() const noexcept
Returns normalization style.
Definition: absorptionlines.h:1102
ARTS::Var::y
Vector y(Workspace &ws) noexcept
Definition: autoarts.h:7401
zeemandata.h
Headers and class definition of Zeeman modeling.
Absorption::SingleLine::LineShapeElems
Index LineShapeElems() const noexcept
Number of lineshape elements.
Definition: absorptionlines.h:329
Absorption::Lines::mpopulation
PopulationType mpopulation
Line population distribution.
Definition: absorptionlines.h:562
Absorption::Lines::string2Population
static PopulationType string2Population(const String &in) noexcept
Definition: absorptionlines.h:1164
Absorption::Lines::BroadeningSpecies
ArrayOfSpeciesTag & BroadeningSpecies() noexcept
Returns the broadening species.
Definition: absorptionlines.h:1356
Absorption::Lines::UpperQuantumNumbers
String UpperQuantumNumbers() const noexcept
Upper quantum numbers string.
Definition: absorptionlines.cc:2560
Absorption::Lines::I0
Numeric I0(size_t k) const noexcept
Reference line strength.
Definition: absorptionlines.h:1024
Absorption::reduced_rovibrational_dipole
Numeric reduced_rovibrational_dipole(Rational Jf, Rational Ji, Rational lf, Rational li, Rational k=Rational(1))
Compute the reduced rovibrational dipole moment.
Definition: absorptionlines.cc:2939
Absorption::SingleLine::read
bifstream & read(bifstream &bif)
Binary read for AbsorptionLines.
Definition: absorptionlines.h:491
Absorption::SingleLine::UpperQuantumNumbers
const std::vector< Rational > & UpperQuantumNumbers() const noexcept
Upper level quantum numbers.
Definition: absorptionlines.h:369
Absorption::Lines::sort_by_frequency
void sort_by_frequency()
Sort inner line list by frequency.
Definition: absorptionlines.h:813
Absorption::SingleLine::SetLineMixing2AER
void SetLineMixing2AER(const Vector &d)
Set the line mixing model to AER kind.
Definition: absorptionlines.h:481
Absorption::id_in_line_lower
bool id_in_line_lower(const Lines &band, const QuantumIdentifier &id, size_t line_index)
Checks if the external quantum identifier match a line's ID.
Definition: absorptionlines.cc:2904
Absorption::Lines::mlocalquanta
std::vector< QuantumNumberType > mlocalquanta
List of local quantum numbers, these must be defined.
Definition: absorptionlines.h:583
Absorption::Lines::mbathbroadening
bool mbathbroadening
Does the line broadening have bath broadening.
Definition: absorptionlines.h:553
Absorption::Lines::T0
void T0(Numeric x) noexcept
Sets reference temperature.
Definition: absorptionlines.h:1316
Absorption::SingleLine
Computations and data for a single absorption line.
Definition: absorptionlines.h:246
Absorption::Lines::ReverseLines
void ReverseLines() noexcept
Reverses the order of the internal lines.
Definition: absorptionlines.cc:2720
Absorption::SingleLine::E0
void E0(Numeric x) noexcept
Lower level energy.
Definition: absorptionlines.h:413
Absorption::id_in_line_upper
bool id_in_line_upper(const Lines &band, const QuantumIdentifier &id, size_t line_index)
Checks if the external quantum identifier match a line's ID.
Definition: absorptionlines.cc:2877
Absorption::SingleLine::UpperQuantumNumber
Rational & UpperQuantumNumber(size_t i) noexcept
Upper quantum number.
Definition: absorptionlines.h:441
Absorption::NormalizationType::None
@ None
Absorption::Lines::mcutofffreq
Numeric mcutofffreq
cutoff frequency
Definition: absorptionlines.h:574
quantum.h
Absorption::ReadFromArtscat5Stream
SingleLineExternal ReadFromArtscat5Stream(istream &is)
Read from ARTSCAT-5.
Definition: absorptionlines.cc:513
Absorption::SingleLine::mlineshape
LineShape::Model mlineshape
Line shape model.
Definition: absorptionlines.h:270
Absorption::populationtype2string
String populationtype2string(PopulationType in)
Definition: absorptionlines.h:171
stdarrayify
constexpr std::array< T, 1+sizeof...(Ts)> stdarrayify(const T &first, const Ts &... the_rest)
Make a std::array of a list of variables (must be 1-long at least)
Definition: array.h:374
Absorption::Lines::ShapeParameter_dInternal
Numeric ShapeParameter_dInternal(size_t k, Numeric T, Numeric P, const Vector &vmrs, const RetrievalQuantity &derivative) const noexcept
Line shape parameter internal derivative.
Definition: absorptionlines.cc:131
Absorption::Lines::CutoffFreqMinus
Numeric CutoffFreqMinus(size_t k, Numeric fmean) const noexcept
Returns negative cutoff frequency or lowest value.
Definition: absorptionlines.h:1298
LineShape::Model::nelem
Index nelem() const
Number of species in Model.
Definition: lineshapemodel.h:1308
Zeeman::nelem
constexpr Index nelem(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the number of elements of the polarization type of this transition.
Definition: zeemandata.h:135
Absorption::Lines::SpeciesMass
Numeric SpeciesMass() const noexcept
Mass of the molecule.
Definition: absorptionlines.cc:2725
Absorption::Lines::CutoffFreqValue
Numeric CutoffFreqValue() const noexcept
Returns internal cutoff frequency value.
Definition: absorptionlines.h:1321
Absorption::Lines::LinemixingLimit
void LinemixingLimit(Numeric x) noexcept
Sets line mixing limit.
Definition: absorptionlines.h:1336
Absorption::Lines::RemoveLocalQuantum
void RemoveLocalQuantum(size_t)
Remove quantum numbers at the given position from all lines.
Definition: absorptionlines.cc:2669
Array< SpeciesTag >
Absorption::Lines::Lines
Lines(bool selfbroadening=false, bool bathbroadening=false, CutoffType cutoff=CutoffType::None, MirroringType mirroring=MirroringType::None, PopulationType population=PopulationType::ByLTE, NormalizationType normalization=NormalizationType::None, LineShape::Type lineshapetype=LineShape::Type::DP, Numeric T0=296, Numeric cutofffreq=-1, Numeric linemixinglimit=-1, const QuantumIdentifier &quantumidentity=QuantumIdentifier(), const std::vector< QuantumNumberType > &localquanta={}, const ArrayOfSpeciesTag &broadeningspecies={}, const std::vector< SingleLine > &lines={})
Default initialization.
Definition: absorptionlines.h:609
AbsorptionLines
Absorption::Lines AbsorptionLines
Definition: absorptionlines.h:1850
Absorption::Lines::validIndexForLineShapeType
static bool validIndexForLineShapeType(Index x) noexcept
Checks if index is a valid lineshapetype.
Definition: absorptionlines.h:1186
ArrayOfAbsorptionLines
Array< AbsorptionLines > ArrayOfAbsorptionLines
Definition: absorptionlines.h:1851
Absorption::split_list_of_external_lines
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.
Definition: absorptionlines.cc:2435
Absorption::Lines::E0
Numeric E0(size_t k) const noexcept
Lower level energy.
Definition: absorptionlines.h:1010
Absorption::nelem
Index nelem(const Lines &l)
Number of lines.
Definition: absorptionlines.h:1820
LineShape::Model
Main line shape model class.
Definition: lineshapemodel.h:972
Absorption::ReadFromArtscat3Stream
SingleLineExternal ReadFromArtscat3Stream(istream &is)
Read from ARTSCAT-3.
Definition: absorptionlines.cc:155
Absorption::Lines::mselfbroadening
bool mselfbroadening
Does the line broadening have self broadening.
Definition: absorptionlines.h:550
Absorption::CutoffType::None
@ None
Absorption
Namespace to contain things required for absorption calculations.
Definition: absorptionlines.h:44
Absorption::SingleLine::mzeeman
Zeeman::Model mzeeman
Zeeman model.
Definition: absorptionlines.h:267
Absorption::SingleLineExternal::population
PopulationType population
Definition: absorptionlines.h:536
Absorption::ReadFromLBLRTMStream
SingleLineExternal ReadFromLBLRTMStream(istream &is)
Read from LBLRTM.
Definition: absorptionlines.cc:1922
QuantumIdentifier::Species
void Species(Index sp)
Set the Species.
Definition: quantum.h:481
Absorption::Lines::mmirroring
MirroringType mmirroring
Mirroring type.
Definition: absorptionlines.h:559
Absorption::SingleLineExternal::selfbroadening
bool selfbroadening
Definition: absorptionlines.h:532
Absorption::Lines::Bath
void Bath(bool x) noexcept
Returns bath broadening status.
Definition: absorptionlines.h:1376
Absorption::SingleLineExternal::normalization
NormalizationType normalization
Definition: absorptionlines.h:537
Absorption::Lines::validIndexForMirroring
static bool validIndexForMirroring(Index x) noexcept
Checks if index is a valid mirroring.
Definition: absorptionlines.h:1082
Absorption::Lines::Match
bool Match(const Lines &l) const noexcept
Checks if another line list matches this structure.
Definition: absorptionlines.h:779
Absorption::SingleLine::g_low
Numeric & g_low() noexcept
Lower level statistical weight.
Definition: absorptionlines.h:388
Absorption::Lines::string2LineShapeType
static LineShape::Type string2LineShapeType(const String &type) noexcept
Definition: absorptionlines.h:1192
Absorption::Lines::LineShapePos
Index LineShapePos(const QuantumIdentifier &qid) const noexcept
Position among broadening species or -1.
Definition: absorptionlines.h:1248
Absorption::Lines::Mirroring
MirroringType Mirroring() const noexcept
Returns mirroring style.
Definition: absorptionlines.h:1076
Absorption::Lines::mnormalization
NormalizationType mnormalization
Line normalization type.
Definition: absorptionlines.h:565
Absorption::Lines::string2Normalization
static NormalizationType string2Normalization(const String &in) noexcept
Definition: absorptionlines.h:1114
my_basic_string< char >
Absorption::ReadFromHitranOnlineStream
SingleLineExternal ReadFromHitranOnlineStream(istream &is)
Read from HITRAN online.
Definition: absorptionlines.cc:1171
Absorption::mirroringtype2metadatastring
String mirroringtype2metadatastring(MirroringType in)
Definition: absorptionlines.h:81
Absorption::SingleLine::F0
void F0(Numeric x) noexcept
Central frequency.
Definition: absorptionlines.h:410
Absorption::SingleLine::write
bofstream & write(bofstream &bof) const
Binary write for AbsorptionLines.
Definition: absorptionlines.h:508
Absorption::SingleLineExternal::line
SingleLine line
Definition: absorptionlines.h:544
Absorption::SingleLineExternal::linemixinglimit
Numeric linemixinglimit
Definition: absorptionlines.h:541
Absorption::Lines::ShapeParameters_dVMR
LineShape::Output ShapeParameters_dVMR(size_t k, Numeric T, Numeric P, const QuantumIdentifier &vmr_qid) const noexcept
Line shape parameters vmr derivative.
Definition: absorptionlines.cc:102
Absorption::SingleLine::mI0
Numeric mI0
Reference intensity.
Definition: absorptionlines.h:252
Absorption::SingleLineExternal::species
ArrayOfSpeciesTag species
Definition: absorptionlines.h:543
Absorption::SingleLine::A
Numeric & A() noexcept
Einstein spontaneous emission.
Definition: absorptionlines.h:385
Absorption::SingleLine::E0
Numeric E0() const noexcept
Lower level energy.
Definition: absorptionlines.h:345
Absorption::Lines::MatchWithExternal
bool MatchWithExternal(const SingleLineExternal &sle, const QuantumIdentifier &quantumidentity) const noexcept
Checks if an external line matches this structure.
Definition: absorptionlines.h:741
QuantumIdentifier::SetTransition
void SetTransition(const QuantumNumbers &upper, const QuantumNumbers &lower)
Set to transition type identifier.
Definition: quantum.cc:229
QuantumIdentifier::LowerQuantumNumber
constexpr Rational LowerQuantumNumber(QuantumNumberType X) const noexcept
Return a lower quantum number by copy.
Definition: quantum.h:602
ARTS::Group::Rational
Rational Rational
Definition: autoarts.h:96
LineShape::ModelParameters
Coefficients and temperature model for SingleSpeciesModel.
Definition: lineshapemodel.h:270
Absorption::Lines::mlineshapetype
LineShape::Type mlineshapetype
Type of line shape.
Definition: absorptionlines.h:568
Absorption::Lines::AppendSingleLine
void AppendSingleLine(const SingleLine &sl)
Appends a single line to the absorption lines.
Definition: absorptionlines.h:724
Absorption::Lines::I0
Numeric & I0(size_t k) noexcept
Reference line strength.
Definition: absorptionlines.h:1031
Absorption::Lines::ShapeParameters
LineShape::Output ShapeParameters(size_t k, Numeric T, Numeric P, const Vector &vmrs) const noexcept
Line shape parameters.
Definition: absorptionlines.cc:68
Absorption::Lines::mT0
Numeric mT0
Reference temperature for all parameters of the lines.
Definition: absorptionlines.h:571
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Absorption::Lines::NumLocalQuanta
Index NumLocalQuanta() const noexcept
Number of local quantum numbers.
Definition: absorptionlines.h:864
bifstream
Binary output file stream class.
Definition: bifstream.h:42
Absorption::mirroringtype2string
String mirroringtype2string(MirroringType in)
Definition: absorptionlines.h:69
Absorption::line_upper_in_id
bool line_upper_in_id(const Lines &band, const QuantumIdentifier &id, size_t line_index)
Checks if the external quantum identifier match a line's ID.
Definition: absorptionlines.cc:2786
Absorption::SingleLine::UpperQuantumNumbers
std::vector< Rational > & UpperQuantumNumbers() noexcept
Upper level quantum numbers.
Definition: absorptionlines.h:403
Absorption::Lines::F0
Numeric & F0(size_t k) noexcept
Central frequency.
Definition: absorptionlines.h:977
Absorption::Lines::string2Mirroring
static MirroringType string2Mirroring(const String &in) noexcept
Definition: absorptionlines.h:1088
Absorption::SingleLine::g_low
void g_low(Numeric x) noexcept
Lower level statistical weight.
Definition: absorptionlines.h:422
ArrayOfArrayOfAbsorptionLines
Array< ArrayOfAbsorptionLines > ArrayOfArrayOfAbsorptionLines
Definition: absorptionlines.h:1852
Absorption::normalizationtype2metadatastring
String normalizationtype2metadatastring(NormalizationType in)
Definition: absorptionlines.h:129
Absorption::cutofftype2metadatastring
String cutofftype2metadatastring(CutoffType in, Numeric cutoff)
Definition: absorptionlines.h:234
Absorption::MirroringType
MirroringType
Describes the type of mirroring line effects.
Definition: absorptionlines.h:49
Absorption::Lines::A
Numeric & A(size_t k) noexcept
Einstein spontaneous emission.
Definition: absorptionlines.h:1045
Absorption::SingleLine::UpperQuantumNumber
Rational UpperQuantumNumber(size_t i) const noexcept
Upper quantum number.
Definition: absorptionlines.h:435
Absorption::Lines
Definition: absorptionlines.h:547
Absorption::SingleLine::mglow
Numeric mglow
Lower level statistical weight.
Definition: absorptionlines.h:258
Absorption::Lines::Population
void Population(PopulationType x) noexcept
Sets population style.
Definition: absorptionlines.h:1155
Absorption::Lines::Species
Index Species() const noexcept
Species Index.
Definition: absorptionlines.h:846
Absorption::MirroringType::None
@ None
Absorption::Lines::OK
bool OK() const noexcept
Definition: absorptionlines.cc:3527
QuantumIdentifier::TRANSITION
@ TRANSITION
Definition: quantum.h:393
Absorption::SingleLine::SameQuantumNumbers
bool SameQuantumNumbers(const SingleLine &sl) const noexcept
Checks if the quantum numbers are the same of the two lines.
Definition: absorptionlines.cc:2679
max
#define max(a, b)
Definition: legacy_continua.cc:20629
Absorption::Lines::F0
Numeric F0(size_t k) const noexcept
Central frequency.
Definition: absorptionlines.h:970
Absorption::operator>>
std::istream & operator>>(std::istream &, SingleLine &)
Definition: absorptionlines.cc:2514
Absorption::SingleLineExternal::cutofffreq
Numeric cutofffreq
Definition: absorptionlines.h:540
Absorption::Lines::SpeciesName
String SpeciesName() const noexcept
Species Name.
Definition: absorptionlines.cc:2547
bifstream.h
This file contains the class declaration of bifstream.
LineShape::Type
Type
Type of line shape to compute.
Definition: lineshapemodel.h:788
bofstream.h
This file contains the class declaration of bofstream.
Absorption::SingleLineExternal::quantumidentity
QuantumIdentifier quantumidentity
Definition: absorptionlines.h:542
Absorption::Lines::Self
void Self(bool x) noexcept
Returns self broadening status.
Definition: absorptionlines.h:1366
Absorption::Lines::validIndexForPopulation
static bool validIndexForPopulation(Index x) noexcept
Checks if index is a valid population.
Definition: absorptionlines.h:1158
Absorption::Lines::g_low
Numeric & g_low(size_t k) noexcept
Lower level statistical weight.
Definition: absorptionlines.h:1059
Absorption::Lines::LocalQuanta
std::vector< QuantumNumberType > & LocalQuanta() noexcept
Returns local quantum numbers.
Definition: absorptionlines.h:1346
Absorption::SingleLine::SingleLine
SingleLine(size_t nbroadeners, size_t nquanta, const LineShape::Model &metamodel)
Initialization for constant sizes.
Definition: absorptionlines.h:318
Absorption::Lines::Population
PopulationType Population() const noexcept
Returns population style.
Definition: absorptionlines.h:1152
Absorption::SingleLine::LowerQuantumNumbers
const std::vector< Rational > & LowerQuantumNumbers() const noexcept
Lower level quantum numbers.
Definition: absorptionlines.h:366
Absorption::Lines::SetAutomaticZeeman
void SetAutomaticZeeman() noexcept
Set Zeeman effect for all lines that have the correct quantum numbers.
Definition: absorptionlines.h:960
LineShape::Output
Main output of Model.
Definition: lineshapemodel.h:875
Absorption::SingleLineExternal::bad
bool bad
Definition: absorptionlines.h:531
Absorption::Lines::ShapeParameters_dT
LineShape::Output ShapeParameters_dT(size_t k, Numeric T, Numeric P, const Vector &vmrs) const noexcept
Line shape parameters temperature derivatives.
Definition: absorptionlines.cc:76
Absorption::Lines::Cutoff
void Cutoff(CutoffType x) noexcept
Sets cutoff style.
Definition: absorptionlines.h:1131
Absorption::SingleLineExternal::mirroring
MirroringType mirroring
Definition: absorptionlines.h:535
Absorption::Lines::Isotopologue
Index Isotopologue() const noexcept
Isotopologue Index.
Definition: absorptionlines.h:849
Absorption::Lines::Line
SingleLine & Line(Index) noexcept
Returns a single line.
Definition: absorptionlines.cc:2709
N
#define N
Definition: rng.cc:164
Absorption::SingleLine::g_low
Numeric g_low() const noexcept
Lower level statistical weight.
Definition: absorptionlines.h:354
Absorption::Lines::g_upp
Numeric g_upp(size_t k) const noexcept
Upper level statistical weight.
Definition: absorptionlines.h:1066
Absorption::Lines::ZeemanStrength
Numeric ZeemanStrength(size_t k, Zeeman::Polarization type, Index i) const noexcept
Returns the strength of a Zeeman split line.
Definition: absorptionlines.h:929
Absorption::Lines::NumBroadeners
Index NumBroadeners() const noexcept
Number of broadening species.
Definition: absorptionlines.h:861
Absorption::SingleLine::mA
Numeric mA
Einstein spontaneous emission coefficient.
Definition: absorptionlines.h:264
Absorption::SingleLine::LineShape
const LineShape::Model & LineShape() const noexcept
Line shape model.
Definition: absorptionlines.h:363
nlines
#define nlines
Definition: legacy_continua.cc:22187
Absorption::Lines::LineShapePos
Index LineShapePos(const Index &spec) const noexcept
Position among broadening species or -1.
Definition: absorptionlines.cc:84
Absorption::SingleLine::g_upp
void g_upp(Numeric x) noexcept
Upper level statistical weight.
Definition: absorptionlines.h:425
Absorption::Lines::PopLine
SingleLine PopLine(Index) noexcept
Pops a single line.
Definition: absorptionlines.cc:2693
Absorption::Lines::g_upp
Numeric & g_upp(size_t k) noexcept
Upper level statistical weight.
Definition: absorptionlines.h:1073
Absorption::ReadFromArtscat4Stream
SingleLineExternal ReadFromArtscat4Stream(istream &is)
Read from ARTSCAT-4.
Definition: absorptionlines.cc:317
QuantumIdentifier::UpperQuantumNumber
constexpr Rational UpperQuantumNumber(QuantumNumberType X) const noexcept
Return a upper quantum number by copy.
Definition: quantum.h:597
Absorption::ReadFromHitran2001Stream
SingleLineExternal ReadFromHitran2001Stream(istream &is)
Read from HITRAN before 2004.
Definition: absorptionlines.cc:1560
Absorption::string2normalizationtype
NormalizationType string2normalizationtype(const String &in)
Definition: absorptionlines.h:104
LineShape
Computations of line shape derived parameters.
Definition: lineshapemodel.h:67
LineShape::Model::Data
const std::vector< SingleSpeciesModel > & Data() const noexcept
The line shape model data.
Definition: lineshapemodel.h:1345
Absorption::ReadFromMytran2Stream
SingleLineExternal ReadFromMytran2Stream(istream &is)
Read from Mytran2 The MYTRAN2 format is as follows (directly taken from the abs_my....
Definition: absorptionlines.cc:2953
Absorption::Lines::string2Cutoff
static CutoffType string2Cutoff(const String &in) noexcept
Definition: absorptionlines.h:1140
Absorption::SingleLine::g_upp
Numeric & g_upp() noexcept
Upper level statistical weight.
Definition: absorptionlines.h:391
Absorption::populationtype2metadatastring
String populationtype2metadatastring(PopulationType in)
Definition: absorptionlines.h:186
Absorption::Lines::LowerQuantumNumbers
String LowerQuantumNumbers() const noexcept
Lower quantum numbers string.
Definition: absorptionlines.cc:2570
String
my_basic_string< char > String
The String type for ARTS.
Definition: mystring.h:280
Absorption::Lines::QuantumIdentity
const QuantumIdentifier & QuantumIdentity() const noexcept
Returns identity status.
Definition: absorptionlines.h:1381
Absorption::SingleLine::SetAutomaticZeeman
void SetAutomaticZeeman(QuantumIdentifier qid, const std::vector< QuantumNumberType > &keys)
Set Zeeman effect by automatic detection.
Definition: absorptionlines.h:457
Absorption::Lines::LineShapeMetaData
String LineShapeMetaData() const noexcept
Meta data for the line shape if it exists.
Definition: absorptionlines.h:839
Absorption::relaxationtype_relmat
bool relaxationtype_relmat(PopulationType in)
Definition: absorptionlines.h:201
Absorption::Lines::QuantumIdentity
QuantumIdentifier & QuantumIdentity() noexcept
Returns identity status.
Definition: absorptionlines.h:1386
LineShape::Model::SetLineMixingModel
void SetLineMixingModel(SingleSpeciesModel x)
Sets the same line mixing model to all species.
Definition: lineshapemodel.h:1372
Absorption::Lines::ZeemanCount
Index ZeemanCount(size_t k, Zeeman::Polarization type) const noexcept
Returns the number of Zeeman split lines.
Definition: absorptionlines.h:911
Absorption::line_in_id
bool line_in_id(const Lines &band, const QuantumIdentifier &id, size_t line_index)
Checks if the external quantum identifier match a line's ID.
Definition: absorptionlines.cc:2749
Absorption::Lines::write
bofstream & write(bofstream &os) const
Binary write for Lines.
Definition: absorptionlines.h:1445
Absorption::SingleLineExternal::bathbroadening
bool bathbroadening
Definition: absorptionlines.h:533
Absorption::Lines::validIndexForCutoff
static bool validIndexForCutoff(Index x) noexcept
Checks if index is a valid cutoff.
Definition: absorptionlines.h:1134
Absorption::SingleLine::I0
Numeric & I0() noexcept
Reference line strength.
Definition: absorptionlines.h:382
Absorption::Lines::Self
bool Self() const noexcept
Returns self broadening status.
Definition: absorptionlines.h:1361
Absorption::SingleLine::LowerQuantumElems
Index LowerQuantumElems() const noexcept
Number of lower quantum numbers.
Definition: absorptionlines.h:332
Absorption::SingleLine::LowerQuantumNumbers
std::vector< Rational > & LowerQuantumNumbers() noexcept
Lower level quantum numbers.
Definition: absorptionlines.h:400
Absorption::Lines::validIndexForNormalization
static bool validIndexForNormalization(Index x) noexcept
Checks if index is a valid normalization.
Definition: absorptionlines.h:1108
Absorption::Lines::mquantumidentity
QuantumIdentifier mquantumidentity
Catalog ID.
Definition: absorptionlines.h:580
Absorption::SingleLine::Zeeman
Zeeman::Model & Zeeman() noexcept
Zeeman model.
Definition: absorptionlines.h:394
Absorption::Lines::DoLineMixing
bool DoLineMixing(Numeric P) const noexcept
Returns if the pressure should do line mixing.
Definition: absorptionlines.h:1212
Absorption::SingleLine::mlowerquanta
std::vector< Rational > mlowerquanta
Lower level quantum numbers.
Definition: absorptionlines.h:273
Absorption::createEmptyCopy
Lines createEmptyCopy(const Lines &al) noexcept
Creates a copy of the input lines structure.
Definition: absorptionlines.cc:2701
Absorption::CutoffType
CutoffType
Describes the type of cutoff calculations.
Definition: absorptionlines.h:207
Absorption::Lines::RemoveLine
void RemoveLine(Index) noexcept
Removes a single line.
Definition: absorptionlines.cc:2687
ARTS::Var::x
Vector x(Workspace &ws) noexcept
Definition: autoarts.h:7346
ARTS::Group::QuantumIdentifier
QuantumIdentifier QuantumIdentifier
Definition: autoarts.h:94
Absorption::SingleLine::E0
Numeric & E0() noexcept
Lower level energy.
Definition: absorptionlines.h:379
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
Absorption::SingleLine::LowerQuantumNumber
Rational & LowerQuantumNumber(size_t i) noexcept
Lower quantum number.
Definition: absorptionlines.h:438
Absorption::Lines::LinemixingLimit
Numeric LinemixingLimit() const noexcept
Returns line mixing limit.
Definition: absorptionlines.h:1331
Absorption::Lines::Lines
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 ArrayOfSpeciesTag &broadeningspecies, const LineShape::Model &metamodel)
XML-tag initialization.
Definition: absorptionlines.h:656
RetrievalQuantity
Deals with internal derivatives, Jacobian definition, and OEM calculations.
Definition: jacobian.h:120
Absorption::string2cutofftype
CutoffType string2cutofftype(const String &in)
Definition: absorptionlines.h:213
Absorption::Lines::MetaData
String MetaData() const
Returns a printable statement about the lines.
Definition: absorptionlines.cc:2580
Absorption::SingleLine::A
void A(Numeric x) noexcept
Einstein spontaneous emission.
Definition: absorptionlines.h:419
Absorption::cutofftype2string
String cutofftype2string(CutoffType in)
Definition: absorptionlines.h:224
Absorption::line_lower_in_id
bool line_lower_in_id(const Lines &band, const QuantumIdentifier &id, size_t line_index)
Checks if the external quantum identifier match a line's ID.
Definition: absorptionlines.cc:2813
Absorption::Lines::AllLines
std::vector< SingleLine > & AllLines() noexcept
Lines.
Definition: absorptionlines.h:858
Absorption::Lines::RemoveUnusedLocalQuantums
void RemoveUnusedLocalQuantums()
Remove quantum numbers that are not used by even a single line.
Definition: absorptionlines.cc:2643
Absorption::reduced_magnetic_quadrapole
Numeric reduced_magnetic_quadrapole(Rational Jf, Rational Ji, Rational N)
Compute the reduced magnetic quadrapole moment.
Definition: absorptionlines.cc:2946
Absorption::Lines::UpperQuantumNumber
Rational UpperQuantumNumber(size_t k, QuantumNumberType qnt) const noexcept
Quantum number upper level.
Definition: absorptionlines.cc:47
LineShape::LegacyLineMixingData::vector2modellm
Model vector2modellm(Vector x, LegacyLineMixingData::TypeLM type)
LineShape::Model from legacy input vector.
Definition: lineshapemodel.cc:427
LineShape::Model::write
bofstream & write(bofstream &bof) const
Binary write for Model.
Definition: lineshapemodel.h:1410
Absorption::SingleLineExternal
Single line reading output.
Definition: absorptionlines.h:530
Vector
The Vector class.
Definition: matpackI.h:860
Absorption::PopulationType
PopulationType
Describes the type of population level counter.
Definition: absorptionlines.h:148
Absorption::Lines::A
Numeric A(size_t k) const noexcept
Einstein spontaneous emission.
Definition: absorptionlines.h:1038
Absorption::SingleLine::SingleLine
SingleLine(Numeric F0=0, Numeric I0=0, Numeric E0=0, Numeric glow=0, Numeric gupp=0, Numeric A=0, Zeeman::Model zeeman=Zeeman::Model(), const LineShape::Model &lineshape=LineShape::Model(), const std::vector< Rational > &lowerquanta={}, const std::vector< Rational > &upperquanta={})
Default initialization.
Definition: absorptionlines.h:292
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:476
Absorption::Lines::mbroadeningspecies
ArrayOfSpeciesTag mbroadeningspecies
A list of broadening species.
Definition: absorptionlines.h:586
Absorption::string2populationtype
PopulationType string2populationtype(const String &in)
Definition: absorptionlines.h:156
Absorption::ReadFromHitran2004Stream
SingleLineExternal ReadFromHitran2004Stream(istream &is)
Read from newer HITRAN.
Definition: absorptionlines.cc:752
Array::nelem
Index nelem() const
Number of elements.
Definition: array.h:195
Absorption::SingleLine::mupperquanta
std::vector< Rational > mupperquanta
Upper level quantum numbers.
Definition: absorptionlines.h:276
Absorption::line_is_id
bool line_is_id(const Lines &band, const QuantumIdentifier &id, size_t line_index)
Checks if the external quantum identifier is equal to a line's identifier.
Definition: absorptionlines.cc:2931
Absorption::Lines::BroadeningSpecies
const ArrayOfSpeciesTag & BroadeningSpecies() const noexcept
Returns the broadening species.
Definition: absorptionlines.h:1351
Absorption::PopulationType::ByLTE
@ ByLTE
Rational
Implements rational numbers to work with other ARTS types.
Definition: rational.h:54
Zeeman::Polarization
Polarization
Zeeman polarization selection.
Definition: zeemandata.h:43
Absorption::Lines::LineShapeType
void LineShapeType(LineShape::Type x) noexcept
Sets lineshapetype style.
Definition: absorptionlines.h:1183
Absorption::Lines::LocalQuanta
const std::vector< QuantumNumberType > & LocalQuanta() const noexcept
Returns local quantum numbers.
Definition: absorptionlines.h:1341
Absorption::string2mirroringtype
MirroringType string2mirroringtype(const String &in)
Definition: absorptionlines.h:56
Absorption::SingleLine::Zeeman
Zeeman::Model Zeeman() const noexcept
Zeeman model.
Definition: absorptionlines.h:360
LineShape::Model::read
bifstream & read(bifstream &bif)
Binary read for Model.
Definition: lineshapemodel.h:1403
lineshapemodel.h
Contains the line shape namespace.
Absorption::Lines::read
bifstream & read(bifstream &is)
Binary read for Lines.
Definition: absorptionlines.h:1438
bofstream
Binary output file stream class.
Definition: bofstream.h:42
LineShape::vmrs
Vector vmrs(const ConstVectorView &atmospheric_vmrs, const ArrayOfArrayOfSpeciesTag &atmospheric_species, const QuantumIdentifier &self, const ArrayOfSpeciesTag &lineshape_species, bool self_in_list, bool bath_in_list, Type type)
Returns a VMR vector for this model's main calculations.
Definition: lineshapemodel.cc:474
QuantumNumberType::J
@ J