ARTS  2.3.1285(git:92a29ea9-dirty)
linerecord.h
Go to the documentation of this file.
1 /* Copyright (C) 2000-2013
2  Stefan Buehler <sbuehler@ltu.se>
3  Axel von Engeln <engeln@uni-bremen.de>
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  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18  USA. */
19 
26 #ifndef linerecord_h
27 #define linerecord_h
28 
29 #include <cmath>
30 #include <stdexcept>
31 #include "array.h"
32 #include "constants.h"
33 #include "lineshapemodel.h"
34 #include "matpackI.h"
35 #include "messages.h"
36 #include "mystring.h"
37 #include "quantum.h"
38 #include "wigner_functions.h"
39 #include "zeemandata.h"
40 
41 /* Forward declaration of classes */
42 class SpeciesRecord;
43 class IsotopologueRecord;
44 
201 enum class MirroringType : Index {
202  // Describes the type of mirroring line effects.
203  // LineRecord effect: Adds MTM (String)MirroringType under line modifications when saving ARTSCAT5
204  None, // No mirroring
205  Lorentz, // Mirror, but use Lorentz line shape
206  SameAsLineShape, // Mirror using the same line shape
207  Manual, // Mirror by having a line in the array of line record with negative F0
208 };
209 
211  // Describes the type of normalization line effects.
212  // LineRecord effect: Adds LNT (String)LineNormalizationType under line modifications when saving ARTSCAT5
213  // 0 is ignored on printing
214  None, // Do not renormalize the line shape
215  VVH, // Renormalize with Van Vleck and Huber specifications
216  VVW, // Renormalize with Van Vleck and Weiskopf specifications
217  RosenkranzQuadratic, // Renormalize using Rosenkranz's quadratic specifications
218 };
219 
220 enum class LinePopulationType : Index {
221  // Describes the type of population level counter.
222  // LineRecord effect: Adds POP (String)LinePopulationType under line modifications when saving ARTSCAT5
223  ByLTE, // Assume line is in LTE
224  ByVibrationalTemperatures, // Assume line is in NLTE described by vibrational temperatures
225  ByPopulationDistribution, // Assume line is in NLTE and the upper-to-lower ratio is known
226 };
227 
228 class LineRecord {
229  public:
234  : mversion(5),
235  mqid(QuantumIdentifier::TRANSITION, 1000000, 1000000),
236  mf(0.),
237  mi0(0.),
238  mti0(0.),
239  melow(0.),
240  mevlow(-1.0),
241  mnlte_lower_index(-1),
242  mevupp(-1.0),
243  mnlte_upper_index(-1),
244  ma(NAN),
245  mgupper(NAN),
246  mglower(NAN),
247  mstandard(true),
248  mcutoff(-1.0),
249  mlinemixing_limit(-1.0),
250  mmirroring(MirroringType::None),
251  mlinenorm(LineNormalizationType::None),
252  mpopulation(LinePopulationType::ByLTE) { /* Nothing to do here. */
253  }
254 
259  LineRecord(Index species,
260  Index isotopologue,
261  Numeric f,
262  Numeric psf,
263  Numeric i0,
264  Numeric ti0,
265  Numeric elow,
266  Numeric agam,
267  Numeric sgam,
268  Numeric nair,
269  Numeric nself,
270  Numeric /*tgam*/,
271  const ArrayOfNumeric& /*aux*/,
272  Numeric /* df */,
273  Numeric /* di0 */,
274  Numeric /* dagam */,
275  Numeric /* dsgam */,
276  Numeric /* dnair */,
277  Numeric /* dnself */,
278  Numeric /* dpsf */)
279  : mversion(5),
280  mqid(QuantumIdentifier::TRANSITION, species, isotopologue),
281  mf(f),
282  mi0(i0),
283  mti0(ti0),
284  melow(elow),
285  mevlow(-1.0),
286  mnlte_lower_index(-1),
287  mevupp(-1.0),
288  mnlte_upper_index(-1),
289  ma(NAN),
290  mgupper(NAN),
291  mglower(NAN),
292  mlineshapemodel(sgam, nself, agam, nair, psf),
293  mstandard(true),
294  mcutoff(-1.0),
295  mlinemixing_limit(-1.0),
296  mmirroring(MirroringType::None),
297  mlinenorm(LineNormalizationType::None),
298  mpopulation(LinePopulationType::ByLTE) {}
299 
301  String VersionString() const;
302 
304  Index Version() const { return mversion; }
305  void SetVersion5() { mversion = 5; }
306 
307  /* Set to latest compatible version of the catalog to store all data */
308  void SetVersionToLatest() { mversion = 5; }
309 
312  Index Species() const { return mqid.Species(); }
313 
317  Index Isotopologue() const { return mqid.Isotopologue(); }
318 
322  String Name() const;
323 
333  const SpeciesRecord& SpeciesData() const;
334 
346  const IsotopologueRecord& IsotopologueData() const;
347 
349  Numeric F() const { return mf; }
350 
352  void setF(Numeric new_mf) { mf = new_mf; }
353 
355  Numeric Psf() const { return mlineshapemodel.Data().back().D0().X0; }
356 
369  Numeric I0() const { return mi0; }
370 
372  void setI0(Numeric new_mi0) { mi0 = new_mi0; }
373 
375  Numeric Ti0() const { return mti0; }
376  //FIXME: really in cm-1 still?
378  Numeric Elow() const { return melow; }
379  void SetElow(Numeric new_melow) { melow = new_melow; }
380  //FIXME: really in cm-1 still?
382  Numeric Evlow() const { return mevlow; }
383  void SetEvlow(Numeric evlow) { mevlow = evlow; }
384  Index NLTELowerIndex() const { return mnlte_lower_index; }
385  void SetNLTELowerIndex(Index nlte_lower_index) {
386  mnlte_lower_index = nlte_lower_index;
387  }
388  //FIXME: really in cm-1 still?
390  Numeric Evupp() const { return mevupp; }
391  void SetEvupp(Numeric evupp) { mevupp = evupp; }
392  Index NLTEUpperIndex() const { return mnlte_upper_index; }
393  void SetNLTEUpperIndex(Index nlte_upper_index) {
394  mnlte_upper_index = nlte_upper_index;
395  }
396 
398  Numeric Agam() const { return mlineshapemodel.Data().back().G0().X0; }
399 
401  Numeric Sgam() const { return mlineshapemodel.Data().front().G0().X0; }
402 
404  Numeric Nair() const { return mlineshapemodel.Data().back().G0().X1; }
405 
407  Numeric Nself() const { return mlineshapemodel.Data().front().G0().X1; }
408 
410  Numeric A() const { return ma; }
411 
413  using namespace Constant;
414  return 3 * h * epsilon_0 / (16 * pi) * ma * pow3(c / mf);
415  }
416 
418  using namespace Constant;
419  return 3 * h / (16 * pi * mu_0) * ma * pow3(c / mf);
420  }
421 
423  const Rational Jf = LowerQuantumNumber(QuantumNumberType::J);
424  const Rational Ji = UpperQuantumNumber(QuantumNumberType::J);
425  const Rational lf = LowerQuantumNumber(QuantumNumberType::l2);
426  const Rational li = UpperQuantumNumber(QuantumNumberType::l2);
427  const Numeric val =
428  sqrt(2 * Jf + 1) * wigner3j(Jf, k, Ji, li, lf - li, -lf);
429  if ((Jf + lf + 1) % 2)
430  return -val;
431  else
432  return +val;
433  }
434 
436  const Rational Jf = LowerQuantumNumber(QuantumNumberType::J);
437  const Rational Ji = UpperQuantumNumber(QuantumNumberType::J);
438  const Rational N = LowerQuantumNumber(QuantumNumberType::N);
439  constexpr Rational one(1, 1);
440  const Numeric val = sqrt(6 * (2 * Jf + 1) * (2 * Ji + 1)) *
441  wigner6j(one, one, one, Ji, Jf, N);
442  if ((Jf + N) % 2)
443  return -val;
444  else
445  return +val;
446  }
447 
449  Numeric G_upper() const { return mgupper; }
450 
452  Numeric G_lower() const { return mglower; }
453 
455  void SetQuantumNumberLower(const Index i, const Rational r) {
456  mqid.LowerQuantumNumbers().Set(i, r);
457  }
458  void SetQuantumNumberLower(const String i, const Rational r) {
459  mqid.LowerQuantumNumbers().Set(i, r);
460  }
462  mqid.LowerQuantumNumbers().Set(i, r);
463  }
465  mqid.UpperQuantumNumbers().Set(i, r);
466  }
467  void SetQuantumNumberUpper(const String i, const Rational r) {
468  mqid.UpperQuantumNumbers().Set(i, r);
469  }
470  void SetQuantumNumberUpper(const Index i, const Rational r) {
471  mqid.UpperQuantumNumbers().Set(i, r);
472  }
473 
475  const QuantumIdentifier& QuantumIdentity() const { return mqid; }
477  return mqid.LowerQuantumNumbers();
478  }
480  return mqid.UpperQuantumNumbers();
481  }
483  return mqid.LowerQuantumNumber(X);
484  }
486  return mqid.UpperQuantumNumber(X);
487  }
488  bool InQuantumID(const QuantumIdentifier& qid) const { return mqid.In(qid); }
489  bool UpperStateInQuantumID(const QuantumIdentifier& qid) const {
490  return mqid.InUpper(qid);
491  }
492  bool LowerStateInQuantumID(const QuantumIdentifier& qid) const {
493  return mqid.InLower(qid);
494  }
495 
497  bool do_linemixing(const Numeric& P) const noexcept {
498  if (mlinemixing_limit < 0)
499  return true;
500  else
501  return mlinemixing_limit > P;
502  }
503 
505  Numeric& Y,
506  Numeric& G,
507  Numeric& DV,
508  const Numeric& T,
509  const Numeric& P,
510  const ConstVectorView vmrs,
511  const ArrayOfArrayOfSpeciesTag& abs_species) const {
512  if (do_linemixing(P)) {
513  const auto v = mlineshapemodel.vmrs(vmrs, abs_species, mqid);
514  Y = mlineshapemodel.Y(T, mti0, P, v);
515  G = mlineshapemodel.G(T, mti0, P, v);
516  DV = mlineshapemodel.DV(T, mti0, P, v);
517  } else
518  Y = G = DV = 0;
519  }
520 
522  Numeric& G0,
523  Numeric& G2,
524  Numeric& ETA,
525  Numeric& D0,
526  Numeric& D2,
527  Numeric& FVC,
528  const Numeric& T,
529  const Numeric& P,
530  const ConstVectorView vmrs,
531  const ArrayOfArrayOfSpeciesTag& abs_species) const {
532  const auto v = mlineshapemodel.vmrs(vmrs, abs_species, mqid);
533  G0 = mlineshapemodel.G0(T, mti0, P, v);
534  D0 = mlineshapemodel.D0(T, mti0, P, v);
535  G2 = mlineshapemodel.G2(T, mti0, P, v);
536  D2 = mlineshapemodel.D2(T, mti0, P, v);
537  FVC = mlineshapemodel.FVC(T, mti0, P, v);
538  ETA = mlineshapemodel.ETA(T, mti0, P, v);
539  }
540 
542  Numeric& dG0,
543  Numeric& dG2,
544  Numeric& dETA,
545  Numeric& dD0,
546  Numeric& dD2,
547  Numeric& dFVC,
548  const Numeric& T,
549  const Numeric& P,
550  const ConstVectorView vmrs,
551  const ArrayOfArrayOfSpeciesTag& abs_species) const {
552  const auto v = mlineshapemodel.vmrs(vmrs, abs_species, mqid);
553  dG0 = mlineshapemodel.dG0_dT(T, mti0, P, v);
554  dD0 = mlineshapemodel.dD0_dT(T, mti0, P, v);
555  dG2 = mlineshapemodel.dG2_dT(T, mti0, P, v);
556  dD2 = mlineshapemodel.dD2_dT(T, mti0, P, v);
557  dFVC = mlineshapemodel.dFVC_dT(T, mti0, P, v);
558  dETA = mlineshapemodel.dETA_dT(T, mti0, P, v);
559  }
560 
562  mlineshapemodel.SetLineMixingModel(
565  .Data()[0]);
566  }
567 
569  for (auto& sm : mlineshapemodel.Data())
570  for (Index i = 0; i < d.nelem(); i++) sm.Interp()[i] = d[i];
571  }
572 
573  LineShape::Model& GetLineShapeModel() { return mlineshapemodel; }
574  const LineShape::Model& GetLineShapeModel() const { return mlineshapemodel; }
575 
576  void SetLineShapeModel(const LineShape::Model& lsm) { mlineshapemodel = lsm; }
577 
579  if (mlineshapemodel.Bath())
580  mlineshapemodel = LineShape::Model(mlineshapemodel.Data().back(),
581  mlineshapemodel.ModelType());
582  else
583  throw std::runtime_error(
584  "Cannot keep only pure air since no air broadening exists");
585  }
586 
588  if (mlineshapemodel.Self()) mlineshapemodel.Remove(0);
589  }
590 
592  const String& spec,
593  const String& var) {
594  mlineshapemodel.Set(x, spec, LineShape::string2variable(var));
595  }
596 
598  const String& spec,
599  const String& var,
600  const String& coeff) {
601  auto x = GetLineShapeModelParameters(spec, var);
602  LineShape::SingleModelParameter(x, coeff) = X;
603  SetLineShapeModelParameters(x, spec, var);
604  }
605 
607  const String& spec, const String& var) const {
608  return mlineshapemodel.Get(spec, LineShape::string2variable(var));
609  }
610 
611  void SetSpecial() { mstandard = false; }
612  void SetStandard() { mstandard = true; }
613 
614  bool LineMixingByBand() const { return not mstandard; }
615 
616  bool LineShapeModelHasAir() const noexcept { return mlineshapemodel.Bath(); }
617 
619  Numeric& D0,
620  const Numeric& T,
621  const Numeric& P,
622  const Numeric& self_vmr) const {
623  G0 = P * (mlineshapemodel.Data().front().compute(
624  T, mti0, LineShape::Variable::G0) *
625  self_vmr +
626  mlineshapemodel.Data().back().compute(
627  T, mti0, LineShape::Variable::G0) *
628  (1 - self_vmr));
629  D0 = P * (mlineshapemodel.Data().front().compute(
630  T, mti0, LineShape::Variable::D0) *
631  self_vmr +
632  mlineshapemodel.Data().back().compute(
633  T, mti0, LineShape::Variable::D0) *
634  (1 - self_vmr));
635  }
636 
637  Numeric PressureBroadeningAirBroadeningNair() const { return Nair(); }
638  Numeric PressureBroadeningAirBroadeningPsf() const { return Psf(); }
639  Numeric PressureBroadeningAirBroadeningAgam() const { return Agam(); }
640 
642  const Numeric& P,
643  const Vector& vmrs,
644  const RetrievalQuantity& derivative) const
645  noexcept {
646  const bool self = derivative.Mode() == LineShape::self_broadening;
647  const bool bath = derivative.Mode() == LineShape::bath_broadening;
648  if (mlineshapemodel.Self() and self)
649  return mlineshapemodel.GetInternalDeriv(
650  T, mti0, P, 0, vmrs, derivative.PropMatType());
651  else if (self) {
652  const auto pos = mlineshapemodel.this_species(mqid);
653  return mlineshapemodel.GetInternalDeriv(
654  T, mti0, P, pos, vmrs, derivative.PropMatType());
655  } else if (mlineshapemodel.Bath() and bath)
656  return mlineshapemodel.GetInternalDeriv(T,
657  mti0,
658  P,
659  mlineshapemodel.nelem() - 1,
660  vmrs,
661  derivative.PropMatType());
662  else if (bath)
663  return 0;
664  else {
665  const auto pos =
666  mlineshapemodel.this_species(derivative.QuantumIdentity());
667  return mlineshapemodel.GetInternalDeriv(
668  T, mti0, P, pos, vmrs, derivative.PropMatType());
669  }
670  }
671 
673  const Numeric& P,
674  const ConstVectorView vmrs,
675  const ArrayOfArrayOfSpeciesTag& abs_species,
676  const RetrievalQuantity& derivative) const {
677  auto v = mlineshapemodel.vmrs(vmrs, abs_species, mqid);
678  return GetPrepInternalDerivative(T, P, v, derivative);
679  }
680 
682  const Numeric& P,
683  const Vector& vmrs) const noexcept {
684  auto x = mlineshapemodel.GetParams(T, mti0, P, vmrs);
685  if (not do_linemixing(P)) x.Y = x.G = x.DV = 0;
686  return x;
687  }
688 
691  const Numeric& T,
692  const Numeric& P,
693  const ConstVectorView vmrs,
694  const ArrayOfArrayOfSpeciesTag& abs_species) const {
695  auto v = mlineshapemodel.vmrs(vmrs, abs_species, mqid);
696  return GetPrepShapeParams(T, P, v);
697  }
698 
700  const Numeric& P,
701  const Vector& vmrs) const noexcept {
702  auto x = mlineshapemodel.GetTemperatureDerivs(T, mti0, P, vmrs);
703  if (not do_linemixing(P)) x.Y = x.G = x.DV = 0;
704  return x;
705  }
706 
709  const Numeric& T,
710  const Numeric& P,
711  const ConstVectorView vmrs,
712  const ArrayOfArrayOfSpeciesTag& abs_species) const {
713  auto v = mlineshapemodel.vmrs(vmrs, abs_species, mqid);
714  return GetPrepShapeParams_dT(T, P, v);
715  }
716 
719  const Numeric& P,
720  const QuantumIdentifier& vmr_qi) const
721  noexcept {
722  const bool self = vmr_qi.Species() == mqid.Species();
723  if (mlineshapemodel.Self() and self) {
724  auto x = mlineshapemodel.GetVMRDerivs(T, mti0, P, 0);
725 
726  if (mlineshapemodel.Bath())
728  x,
729  mlineshapemodel.GetVMRDerivs(
730  T, mti0, P, mlineshapemodel.nelem() - 1));
731 
732  if (not do_linemixing(P)) x.Y = x.G = x.DV = 0;
733 
734  return x;
735  } else if (mlineshapemodel.Bath() and self)
736  return {0, 0, 0, 0, 0, 0, 0, 0, 0};
737  else {
738  const auto pos = mlineshapemodel.this_species(vmr_qi);
739  auto x = mlineshapemodel.GetVMRDerivs(T, mti0, P, pos);
740 
741  if (mlineshapemodel.Bath())
743  x,
744  mlineshapemodel.GetVMRDerivs(
745  T, mti0, P, mlineshapemodel.nelem() - 1));
746 
747  if (not do_linemixing(P)) x.Y = x.G = x.DV = 0;
748  return x;
749  }
750  }
751 
753  void ZeemanModelInit() { mzeemanmodel = Zeeman::Model(mqid); }
754  void ZeemanModelInitZero() { mzeemanmodel = Zeeman::Model(); }
756  return mzeemanmodel.Strength(UpperQuantumNumber(QuantumNumberType::J),
757  LowerQuantumNumber(QuantumNumberType::J),
758  type,
759  i);
760  }
762  return mzeemanmodel.Splitting(UpperQuantumNumber(QuantumNumberType::J),
763  LowerQuantumNumber(QuantumNumberType::J),
764  type,
765  i);
766  }
768  return Zeeman::nelem(UpperQuantumNumber(QuantumNumberType::J),
769  LowerQuantumNumber(QuantumNumberType::J),
770  type);
771  }
772  Zeeman::Model ZeemanModel() const { return mzeemanmodel; }
773  Zeeman::Model& ZeemanModel() { return mzeemanmodel; }
774 
776  const Numeric& CutOff() const { return mcutoff; }
777  void SetCutOff(const Numeric& cutoff) { mcutoff = cutoff; }
778 
780  const Numeric& LineMixingLimit() const { return mlinemixing_limit; }
781  void SetLineMixingLimit(const Numeric& limit) { mlinemixing_limit = limit; }
782 
784  const MirroringType& GetMirroringType() const { return mmirroring; }
785  void SetMirroringType(const MirroringType in) { mmirroring = in; }
786  String GetMirroringTypeString() const;
787 
790  return mlinenorm;
791  }
793  mlinenorm = in;
794  }
795  String GetLineNormalizationTypeString() const;
796 
798  return mlineshapemodel.ModelType();
799  }
800 
803  return mpopulation;
804  }
805  void SetLinePopulationType(const LinePopulationType in) { mpopulation = in; }
806  String GetLinePopulationTypeString() const;
807 
808  bool IsNotSameSpecIso(const LineRecord& other) const {
809  return mqid.Species() not_eq other.mqid.Species() or
810  mqid.Isotopologue() not_eq other.mqid.Isotopologue();
811  }
812 
872  bool ReadFromHitran2001Stream(istream& is, const Verbosity& verbosity);
873 
879  bool ReadFromLBLRTMStream(istream& is, const Verbosity& verbosity);
880 
954  bool ReadFromHitran2004Stream(istream& is,
955  const Verbosity& verbosity,
956  const Numeric fmin = 0);
957 
1026  bool ReadFromMytran2Stream(istream& is, const Verbosity& verbosity);
1027 
1080  bool ReadFromJplStream(istream& is, const Verbosity& verbosity);
1081 
1103  bool ReadFromArtscat3Stream(istream& is, const Verbosity& verbosity);
1104 
1122  bool ReadFromArtscat4Stream(istream& is, const Verbosity& verbosity);
1123 
1141  bool ReadFromArtscat5Stream(istream& is, const Verbosity& verbosity);
1142 
1143  private:
1144  // Version number:
1146 
1147  // Identity of line
1149 
1150  // The line center frequency in Hz:
1152 
1153  // The line intensity in m^2/Hz:
1155 
1156  // Reference temperature for I0 in K:
1158 
1159  // Lower state energy in Joules:
1161 
1162  // Lower state vibrational energy in Joules:
1163  Numeric mevlow; // NOTE: Not stored in binary data
1164 
1165  // Lower state vibrational energy index:
1166  Index mnlte_lower_index; // NOTE: Not stored in binary data
1167 
1168  // Upper state vibrational energy in Joules:
1169  Numeric mevupp; // NOTE: Not stored in binary data
1170 
1171  // Upper state vibrational energy index:
1172  Index mnlte_upper_index; // NOTE: Not stored in binary data
1173 
1174  // Einstein A-coefficient in 1/s:
1176 
1177  // Upper state stat. weight:
1179 
1180  // Lower state stat. weight:
1182 
1188 
1191 
1194 
1197 
1200 
1203 
1206 
1209 };
1210 
1215 ostream& operator<<(ostream& os, const LineRecord& lr);
1216 
1217 //======================================================================
1218 // Typedefs for LineRecord Arrays
1219 //======================================================================
1220 
1224 
1229 
1231 
1233 
1235 
1236 #endif // linerecord_h
Numeric Ti0() const
Reference temperature for I0 in K:
Definition: linerecord.h:375
void SetSpecial()
Definition: linerecord.h:611
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
QuantumIdentifier mqid
Definition: linerecord.h:1148
Namespace containing several constants, physical and mathematical.
Definition: constants.h:61
const QuantumIdentifier & QuantumIdentity() const
Quantum identifier.
Definition: linerecord.h:475
void LineShapeModelOnlyAir()
Definition: linerecord.h:578
Numeric Evupp() const
Upper state vibrational energy in cm^-1:
Definition: linerecord.h:390
void var(VectorView var, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
Compute the variance of the ranged ys.
Definition: raw.cc:49
Numeric mgupper
Definition: linerecord.h:1178
bool mstandard
FIXME Richard, please explain.
Definition: linerecord.h:1190
MirroringType
Spectral line catalog data.
Definition: linerecord.h:201
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&#39;s main calculations.
SingleLineExternal ReadFromHitran2001Stream(istream &is)
Read from HITRAN before 2004.
Main Zeeman Model.
Definition: zeemandata.h:358
void Isotopologue(Index iso)
Set the Isotopologue.
Definition: quantum.h:487
Numeric reduced_rovibrational_dipole(Rational k=1) const
Definition: linerecord.h:422
Zeeman::Model mzeemanmodel
Zeeman effect model class.
Definition: linerecord.h:1193
LinePopulationType mpopulation
Line LTE/NLTE type.
Definition: linerecord.h:1208
SingleLineExternal ReadFromArtscat3Stream(istream &is)
Read from ARTSCAT-3.
Numeric mti0
Definition: linerecord.h:1157
Declarations having to do with the four output streams.
Main output of Model.
void SetQuantumNumberLower(const Index i, const Rational r)
Quantum numbers.
Definition: linerecord.h:455
LineNormalizationType
Definition: linerecord.h:210
Array< Array< LineRecord > > ArrayOfArrayOfLineRecord
Holds a lists of spectral line data for each tag group.
Definition: linerecord.h:1228
SingleLineExternal ReadFromMytran2Stream(istream &is)
Read from Mytran2 The MYTRAN2 format is as follows (directly taken from the abs_my.c documentation):
SingleLineExternal ReadFromArtscat4Stream(istream &is)
Read from ARTSCAT-4.
The Vector class.
Definition: matpackI.h:860
Numeric Agam() const
Air broadened width in Hz/Pa:
Definition: linerecord.h:398
const QuantumNumbers & LowerQuantumNumbers() const
Definition: linerecord.h:476
Model vector2modellm(Vector x, LegacyLineMixingData::TypeLM type)
LineShape::Model from legacy input vector.
Numeric electric_dipole_moment_squared() const
Definition: linerecord.h:412
Numeric mevlow
Definition: linerecord.h:1163
void SetNLTEUpperIndex(Index nlte_upper_index)
Definition: linerecord.h:393
Constants of physical expressions as constexpr.
void SetVersion5()
Definition: linerecord.h:305
Main line shape model class.
void SetLineNormalizationType(const LineNormalizationType in)
Definition: linerecord.h:792
LineShape::Output GetShapeParams(const Numeric &T, const Numeric &P, const ConstVectorView vmrs, const ArrayOfArrayOfSpeciesTag &abs_species) const
Definition: linerecord.h:690
Numeric & SingleModelParameter(ModelParameters &mp, const String &type)
Get a coefficient from ModelParameters by name.
void SetEvupp(Numeric evupp)
Definition: linerecord.h:391
ostream & operator<<(ostream &os, const LineRecord &lr)
Output operator for LineRecord.
Definition: linerecord.cc:2711
void ZeemanModelInit()
Zeeman Effect Data.
Definition: linerecord.h:753
LineNormalizationType LineNormalizationTypeFromString(const String &in)
Definition: linerecord.cc:2818
const LinePopulationType & GetLinePopulationType() const
Line population type.
Definition: linerecord.h:802
LineShape::Output GetShapeParams_dVMR(const Numeric &T, const Numeric &P, const QuantumIdentifier &vmr_qi) const noexcept
Definition: linerecord.h:718
Numeric Elow() const
Lower state energy in cm^-1:
Definition: linerecord.h:378
LineShape::Model & GetLineShapeModel()
Definition: linerecord.h:573
Numeric Psf() const
The pressure shift parameter in Hz/Pa.
Definition: linerecord.h:355
LineShape::Type GetLineShapeType() const noexcept
Definition: linerecord.h:797
void SetLineMixingParameters(Numeric &Y, Numeric &G, Numeric &DV, const Numeric &T, const Numeric &P, const ConstVectorView vmrs, const ArrayOfArrayOfSpeciesTag &abs_species) const
Definition: linerecord.h:504
Wigner symbol interactions.
Index nelem() const
Returns the number of elements.
Definition: matpackI.cc:51
QuantumNumberType
Enum for Quantum Numbers used for indexing.
Definition: quantum.h:48
SingleLineExternal ReadFromArtscat5Stream(istream &is)
Read from ARTSCAT-5.
LineRecord(Index species, Index isotopologue, Numeric f, Numeric psf, Numeric i0, Numeric ti0, Numeric elow, Numeric agam, Numeric sgam, Numeric nair, Numeric nself, Numeric, const ArrayOfNumeric &, Numeric, Numeric, Numeric, Numeric, Numeric, Numeric, Numeric)
Constructor that sets all data elements explicitly.
Definition: linerecord.h:259
Zeeman::Model & ZeemanModel()
Definition: linerecord.h:773
Deals with internal derivatives, Jacobian definition, and OEM calculations.
Definition: jacobian.h:120
This file contains the definition of Array.
Numeric G_upper() const
ARTSCAT-4/5 Upper state stat.
Definition: linerecord.h:449
Numeric PressureBroadeningAirBroadeningAgam() const
Definition: linerecord.h:639
Numeric Nself() const
SGAM temperature exponent (dimensionless):
Definition: linerecord.h:407
Index ZeemanModelLineCount(Zeeman::Polarization type) const
Definition: linerecord.h:767
LineShape::ModelParameters GetLineShapeModelParameters(const String &spec, const String &var) const
Definition: linerecord.h:606
void SetQuantumNumberLower(const String i, const Rational r)
Definition: linerecord.h:458
Index mnlte_upper_index
Definition: linerecord.h:1172
const QuantumNumbers & UpperQuantumNumbers() const
Definition: linerecord.h:479
void SetVersionToLatest()
Definition: linerecord.h:308
Numeric melow
Definition: linerecord.h:1160
void SetElow(Numeric new_melow)
Definition: linerecord.h:379
bool LineMixingByBand() const
Definition: linerecord.h:614
Index Version() const
Return the version number.
Definition: linerecord.h:304
void SetLineMixingLimit(const Numeric &limit)
Definition: linerecord.h:781
Numeric wigner6j(const Rational j1, const Rational j2, const Rational j3, const Rational l1, const Rational l2, const Rational l3)
Wigner 6J symbol.
void SetNLTELowerIndex(Index nlte_lower_index)
Definition: linerecord.h:385
Numeric mcutoff
Cutoff frequency.
Definition: linerecord.h:1196
bool LineShapeModelHasAir() const noexcept
Definition: linerecord.h:616
Numeric mevupp
Definition: linerecord.h:1169
void Species(Index sp)
Set the Species.
Definition: quantum.h:481
void SetAirPressureBroadening(Numeric &G0, Numeric &D0, const Numeric &T, const Numeric &P, const Numeric &self_vmr) const
Definition: linerecord.h:618
LineShape::Output GetShapeParams_dT(const Numeric &T, const Numeric &P, const ConstVectorView vmrs, const ArrayOfArrayOfSpeciesTag &abs_species) const
Definition: linerecord.h:708
void SetQuantumNumberUpper(const QuantumNumberType i, const Rational r)
Definition: linerecord.h:464
Implements rational numbers to work with other ARTS types.
Definition: rational.h:54
void SetEvlow(Numeric evlow)
Definition: linerecord.h:383
Numeric mi0
Definition: linerecord.h:1154
Contains the lookup data for one species.
Definition: absorption.h:144
Rational UpperQuantumNumber(QuantumNumberType X) const
Definition: linerecord.h:485
void SetQuantumNumberUpper(const Index i, const Rational r)
Definition: linerecord.h:470
SingleLineExternal ReadFromLBLRTMStream(istream &is)
Read from LBLRTM.
Index Isotopologue() const
The index of the isotopologue species that this line belongs to.
Definition: linerecord.h:317
Coefficients and temperature model for SingleSpeciesModel.
SingleLineExternal ReadFromJplStream(istream &is)
Read from JPL.
LineShape::Output GetPrepShapeParams_dT(const Numeric &T, const Numeric &P, const Vector &vmrs) const noexcept
Definition: linerecord.h:699
Class to identify and match lines by their quantum numbers.
Definition: quantum.h:390
void SetLineShapeModelParameters(const LineShape::ModelParameters &x, const String &spec, const String &var)
Definition: linerecord.h:591
void SetCutOff(const Numeric &cutoff)
Definition: linerecord.h:777
Zeeman::Model ZeemanModel() const
Definition: linerecord.h:772
bool IsNotSameSpecIso(const LineRecord &other) const
Definition: linerecord.h:808
Numeric A() const
ARTSCAT-4/5 Einstein A-coefficient in 1/s :
Definition: linerecord.h:410
bool do_linemixing(const Numeric &P) const noexcept
Do linemixing test.
Definition: linerecord.h:497
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
void SetQuantumNumberLower(const QuantumNumberType i, const Rational r)
Definition: linerecord.h:461
Contains the line shape namespace.
LinePopulationType LinePopulationTypeFromString(const String &in)
Definition: linerecord.cc:2848
constexpr T pow3(T x)
power of three
Definition: constants.h:70
Index mnlte_lower_index
Definition: linerecord.h:1166
Implementation of Matrix, Vector, and such stuff.
void ZeemanModelInitZero()
Definition: linerecord.h:754
void LineShapeModelRemoveSelf()
Definition: linerecord.h:587
LineNormalizationType mlinenorm
Line shape normalization type.
Definition: linerecord.h:1205
Container class for Quantum Numbers.
Definition: quantum.h:222
Headers and class definition of Zeeman modeling.
Numeric magnetic_quadrapole_moment_squared() const
Definition: linerecord.h:417
This can be used to make arrays out of anything.
Definition: array.h:40
Contains the lookup data for one isotopologue.
Definition: absorption.h:45
LinePopulationType
Definition: linerecord.h:220
void SetStandard()
Definition: linerecord.h:612
Numeric Sgam() const
Self broadened width in Hz/Pa:
Definition: linerecord.h:401
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
void SetMirroringType(const MirroringType in)
Definition: linerecord.h:785
LineRecord()
Default constructor.
Definition: linerecord.h:233
Polarization
Zeeman polarization selection.
Definition: zeemandata.h:43
Numeric mf
Definition: linerecord.h:1151
const LineShape::Model & GetLineShapeModel() const
Definition: linerecord.h:574
void SetQuantumNumberUpper(const String i, const Rational r)
Definition: linerecord.h:467
constexpr Output differenceOutput(Output y, Output x) noexcept
Diff of two output.
void SetLinePopulationType(const LinePopulationType in)
Definition: linerecord.h:805
void SetPressureBroadeningParametersTemperatureDerivative(Numeric &dG0, Numeric &dG2, Numeric &dETA, Numeric &dD0, Numeric &dD2, Numeric &dFVC, const Numeric &T, const Numeric &P, const ConstVectorView vmrs, const ArrayOfArrayOfSpeciesTag &abs_species) const
Definition: linerecord.h:541
const Numeric & LineMixingLimit() const
Line mixing pressure limit.
Definition: linerecord.h:780
Numeric ma
Definition: linerecord.h:1175
Numeric GetInternalDerivative(const Numeric &T, const Numeric &P, const ConstVectorView vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const RetrievalQuantity &derivative) const
Definition: linerecord.h:672
Numeric Evlow() const
Lower state vibrational energy in cm^-1:
Definition: linerecord.h:382
Numeric wigner3j(const Rational j1, const Rational j2, const Rational j3, const Rational m1, const Rational m2, const Rational m3)
Wigner 3J symbol.
bool UpperStateInQuantumID(const QuantumIdentifier &qid) const
Definition: linerecord.h:489
A constant view of a Vector.
Definition: matpackI.h:476
void SetLineShapeModelParameter(const Numeric &X, const String &spec, const String &var, const String &coeff)
Definition: linerecord.h:597
Numeric mlinemixing_limit
Line mixing pressure limit.
Definition: linerecord.h:1199
void SetLineMixing2SecondOrderData(ConstVectorView d)
Definition: linerecord.h:561
bool LowerStateInQuantumID(const QuantumIdentifier &qid) const
Definition: linerecord.h:492
Numeric PressureBroadeningAirBroadeningNair() const
Definition: linerecord.h:637
Numeric G_lower() const
ARTSCAT-4/5 Lower state stat.
Definition: linerecord.h:452
bool InQuantumID(const QuantumIdentifier &qid) const
Definition: linerecord.h:488
MirroringType MirroringTypeFromString(const String &in)
Definition: linerecord.cc:2788
void SetPressureBroadeningParameters(Numeric &G0, Numeric &G2, Numeric &ETA, Numeric &D0, Numeric &D2, Numeric &FVC, const Numeric &T, const Numeric &P, const ConstVectorView vmrs, const ArrayOfArrayOfSpeciesTag &abs_species) const
Definition: linerecord.h:521
Index NLTEUpperIndex() const
Definition: linerecord.h:392
Rational LowerQuantumNumber(QuantumNumberType X) const
Definition: linerecord.h:482
LineShape::Model mlineshapemodel
Line function data (pressure broadening and line mixing)
Definition: linerecord.h:1187
MirroringType mmirroring
Line shape mirroring effect type.
Definition: linerecord.h:1202
Index NLTELowerIndex() const
Definition: linerecord.h:384
Numeric PressureBroadeningAirBroadeningPsf() const
Definition: linerecord.h:638
Array< LineRecord > ArrayOfLineRecord
Holds a list of spectral line data.
Definition: linerecord.h:1223
void setF(Numeric new_mf)
Set the line center frequency in Hz.
Definition: linerecord.h:352
SingleLineExternal ReadFromHitran2004Stream(istream &is)
Read from newer HITRAN.
Numeric GetPrepInternalDerivative(const Numeric &T, const Numeric &P, const Vector &vmrs, const RetrievalQuantity &derivative) const noexcept
Definition: linerecord.h:641
Index Species() const
The index of the molecular species that this line belongs to.
Definition: linerecord.h:312
Numeric I0() const
The line intensity in m^2*Hz at the reference temperature Ti0.
Definition: linerecord.h:369
Numeric mglower
Definition: linerecord.h:1181
const LineNormalizationType & GetLineNormalizationType() const
Line shape normalization factor.
Definition: linerecord.h:789
void setI0(Numeric new_mi0)
Set Intensity.
Definition: linerecord.h:372
const Numeric & CutOff() const
Cutoff frequency.
Definition: linerecord.h:776
void SetLineShapeModel(const LineShape::Model &lsm)
Definition: linerecord.h:576
Numeric reduced_magnetic_quadrapole() const
Definition: linerecord.h:435
Numeric ZeemanModelSplitting(Zeeman::Polarization type, Index i) const
Definition: linerecord.h:761
Numeric F() const
The line center frequency in Hz.
Definition: linerecord.h:349
Numeric ZeemanModelStrength(Zeeman::Polarization type, Index i) const
Definition: linerecord.h:755
Index mversion
Definition: linerecord.h:1145
Variable string2variable(const String &type)
Turns predefined strings into a Variable type.
This file contains the definition of String, the ARTS string class.
LineShape::Output GetPrepShapeParams(const Numeric &T, const Numeric &P, const Vector &vmrs) const noexcept
Definition: linerecord.h:681
Numeric sqrt(const Rational r)
Square root.
Definition: rational.h:620
void SetLineMixing2AER(ConstVectorView d)
Definition: linerecord.h:568
const MirroringType & GetMirroringType() const
Line shape mirroring factor.
Definition: linerecord.h:784
Numeric Nair() const
AGAM temperature exponent (dimensionless):
Definition: linerecord.h:404