241 mnlte_lower_index(-1),
243 mnlte_upper_index(-1),
249 mlinemixing_limit(-1.0),
286 mnlte_lower_index(-1),
288 mnlte_upper_index(-1),
292 mlineshapemodel(sgam, nself, agam, nair, psf),
295 mlinemixing_limit(-1.0),
301 String VersionString()
const;
355 Numeric Psf()
const {
return mlineshapemodel.Data().back().D0().X0; }
386 mnlte_lower_index = nlte_lower_index;
394 mnlte_upper_index = nlte_upper_index;
398 Numeric Agam()
const {
return mlineshapemodel.Data().back().G0().X0; }
401 Numeric Sgam()
const {
return mlineshapemodel.Data().front().G0().X0; }
404 Numeric Nair()
const {
return mlineshapemodel.Data().back().G0().X1; }
407 Numeric Nself()
const {
return mlineshapemodel.Data().front().G0().X1; }
414 return 3 * h * epsilon_0 / (16 * pi) * ma *
pow3(c / mf);
419 return 3 * h / (16 * pi * mu_0) * ma *
pow3(c / mf);
428 sqrt(2 * Jf + 1) *
wigner3j(Jf, k, Ji, li, lf - li, -lf);
429 if ((Jf + lf + 1) % 2)
440 const Numeric val =
sqrt(6 * (2 * Jf + 1) * (2 * Ji + 1)) *
456 mqid.LowerQuantumNumbers().Set(i, r);
459 mqid.LowerQuantumNumbers().Set(i, r);
462 mqid.LowerQuantumNumbers().Set(i, r);
465 mqid.UpperQuantumNumbers().Set(i, r);
468 mqid.UpperQuantumNumbers().Set(i, r);
471 mqid.UpperQuantumNumbers().Set(i, r);
477 return mqid.LowerQuantumNumbers();
480 return mqid.UpperQuantumNumbers();
483 return mqid.LowerQuantumNumber(X);
486 return mqid.UpperQuantumNumber(X);
490 return mqid.InUpper(qid);
493 return mqid.InLower(qid);
498 if (mlinemixing_limit < 0)
501 return mlinemixing_limit > P;
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);
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);
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);
562 mlineshapemodel.SetLineMixingModel(
569 for (
auto& sm : mlineshapemodel.Data())
579 if (mlineshapemodel.Bath())
581 mlineshapemodel.ModelType());
583 throw std::runtime_error(
584 "Cannot keep only pure air since no air broadening exists");
588 if (mlineshapemodel.Self()) mlineshapemodel.Remove(0);
601 auto x = GetLineShapeModelParameters(spec, var);
603 SetLineShapeModelParameters(x, spec, var);
622 const Numeric& self_vmr)
const {
623 G0 = P * (mlineshapemodel.Data().front().compute(
626 mlineshapemodel.Data().back().compute(
629 D0 = P * (mlineshapemodel.Data().front().compute(
632 mlineshapemodel.Data().back().compute(
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());
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,
659 mlineshapemodel.nelem() - 1,
661 derivative.PropMatType());
666 mlineshapemodel.this_species(derivative.QuantumIdentity());
667 return mlineshapemodel.GetInternalDeriv(
668 T, mti0, P, pos,
vmrs, derivative.PropMatType());
677 auto v = mlineshapemodel.vmrs(vmrs, abs_species, mqid);
678 return GetPrepInternalDerivative(T, P, v, derivative);
684 auto x = mlineshapemodel.GetParams(T, mti0, P,
vmrs);
685 if (not do_linemixing(P)) x.
Y = x.G = x.DV = 0;
695 auto v = mlineshapemodel.vmrs(vmrs, abs_species, mqid);
696 return GetPrepShapeParams(T, P, v);
702 auto x = mlineshapemodel.GetTemperatureDerivs(T, mti0, P,
vmrs);
703 if (not do_linemixing(P)) x.
Y = x.G = x.DV = 0;
713 auto v = mlineshapemodel.vmrs(vmrs, abs_species, mqid);
714 return GetPrepShapeParams_dT(T, P, v);
722 const bool self = vmr_qi.Species() == mqid.Species();
723 if (mlineshapemodel.Self() and
self) {
724 auto x = mlineshapemodel.GetVMRDerivs(T, mti0, P, 0);
726 if (mlineshapemodel.Bath())
729 mlineshapemodel.GetVMRDerivs(
730 T, mti0, P, mlineshapemodel.nelem() - 1));
732 if (not do_linemixing(P)) x.
Y = x.G = x.DV = 0;
735 }
else if (mlineshapemodel.Bath() and
self)
736 return {0, 0, 0, 0, 0, 0, 0, 0, 0};
738 const auto pos = mlineshapemodel.this_species(vmr_qi);
739 auto x = mlineshapemodel.GetVMRDerivs(T, mti0, P, pos);
741 if (mlineshapemodel.Bath())
744 mlineshapemodel.GetVMRDerivs(
745 T, mti0, P, mlineshapemodel.nelem() - 1));
747 if (not do_linemixing(P)) x.
Y = x.G = x.DV = 0;
786 String GetMirroringTypeString()
const;
795 String GetLineNormalizationTypeString()
const;
798 return mlineshapemodel.ModelType();
806 String GetLinePopulationTypeString()
const;
809 return mqid.Species() not_eq other.
mqid.
Species() or
1236 #endif // linerecord_h Numeric Ti0() const
Reference temperature for I0 in K:
INDEX Index
The type to use for all integer numbers and indices.
Namespace containing several constants, physical and mathematical.
const QuantumIdentifier & QuantumIdentity() const
Quantum identifier.
void LineShapeModelOnlyAir()
Numeric Evupp() const
Upper state vibrational energy in cm^-1:
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.
bool mstandard
FIXME Richard, please explain.
MirroringType
Spectral line catalog data.
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.
SingleLineExternal ReadFromHitran2001Stream(istream &is)
Read from HITRAN before 2004.
void Isotopologue(Index iso)
Set the Isotopologue.
Numeric reduced_rovibrational_dipole(Rational k=1) const
Zeeman::Model mzeemanmodel
Zeeman effect model class.
LinePopulationType mpopulation
Line LTE/NLTE type.
SingleLineExternal ReadFromArtscat3Stream(istream &is)
Read from ARTSCAT-3.
Declarations having to do with the four output streams.
void SetQuantumNumberLower(const Index i, const Rational r)
Quantum numbers.
Array< Array< LineRecord > > ArrayOfArrayOfLineRecord
Holds a lists of spectral line data for each tag group.
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.
Numeric Agam() const
Air broadened width in Hz/Pa:
const QuantumNumbers & LowerQuantumNumbers() const
Model vector2modellm(Vector x, LegacyLineMixingData::TypeLM type)
LineShape::Model from legacy input vector.
Numeric electric_dipole_moment_squared() const
void SetNLTEUpperIndex(Index nlte_upper_index)
Constants of physical expressions as constexpr.
Main line shape model class.
void SetLineNormalizationType(const LineNormalizationType in)
LineShape::Output GetShapeParams(const Numeric &T, const Numeric &P, const ConstVectorView vmrs, const ArrayOfArrayOfSpeciesTag &abs_species) const
Numeric & SingleModelParameter(ModelParameters &mp, const String &type)
Get a coefficient from ModelParameters by name.
void SetEvupp(Numeric evupp)
ostream & operator<<(ostream &os, const LineRecord &lr)
Output operator for LineRecord.
void ZeemanModelInit()
Zeeman Effect Data.
LineNormalizationType LineNormalizationTypeFromString(const String &in)
const LinePopulationType & GetLinePopulationType() const
Line population type.
LineShape::Output GetShapeParams_dVMR(const Numeric &T, const Numeric &P, const QuantumIdentifier &vmr_qi) const noexcept
Numeric Elow() const
Lower state energy in cm^-1:
LineShape::Model & GetLineShapeModel()
Numeric Psf() const
The pressure shift parameter in Hz/Pa.
LineShape::Type GetLineShapeType() const noexcept
void SetLineMixingParameters(Numeric &Y, Numeric &G, Numeric &DV, const Numeric &T, const Numeric &P, const ConstVectorView vmrs, const ArrayOfArrayOfSpeciesTag &abs_species) const
Wigner symbol interactions.
Index nelem() const
Returns the number of elements.
QuantumNumberType
Enum for Quantum Numbers used for indexing.
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.
Zeeman::Model & ZeemanModel()
Deals with internal derivatives, Jacobian definition, and OEM calculations.
This file contains the definition of Array.
Numeric G_upper() const
ARTSCAT-4/5 Upper state stat.
Numeric PressureBroadeningAirBroadeningAgam() const
Numeric Nself() const
SGAM temperature exponent (dimensionless):
Index ZeemanModelLineCount(Zeeman::Polarization type) const
LineShape::ModelParameters GetLineShapeModelParameters(const String &spec, const String &var) const
void SetQuantumNumberLower(const String i, const Rational r)
const QuantumNumbers & UpperQuantumNumbers() const
void SetVersionToLatest()
void SetElow(Numeric new_melow)
bool LineMixingByBand() const
Index Version() const
Return the version number.
void SetLineMixingLimit(const Numeric &limit)
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)
Numeric mcutoff
Cutoff frequency.
bool LineShapeModelHasAir() const noexcept
void Species(Index sp)
Set the Species.
void SetAirPressureBroadening(Numeric &G0, Numeric &D0, const Numeric &T, const Numeric &P, const Numeric &self_vmr) const
LineShape::Output GetShapeParams_dT(const Numeric &T, const Numeric &P, const ConstVectorView vmrs, const ArrayOfArrayOfSpeciesTag &abs_species) const
void SetQuantumNumberUpper(const QuantumNumberType i, const Rational r)
Implements rational numbers to work with other ARTS types.
void SetEvlow(Numeric evlow)
Contains the lookup data for one species.
Rational UpperQuantumNumber(QuantumNumberType X) const
void SetQuantumNumberUpper(const Index i, const Rational r)
SingleLineExternal ReadFromLBLRTMStream(istream &is)
Read from LBLRTM.
Index Isotopologue() const
The index of the isotopologue species that this line belongs to.
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
Class to identify and match lines by their quantum numbers.
void SetLineShapeModelParameters(const LineShape::ModelParameters &x, const String &spec, const String &var)
void SetCutOff(const Numeric &cutoff)
Zeeman::Model ZeemanModel() const
bool IsNotSameSpecIso(const LineRecord &other) const
Numeric A() const
ARTSCAT-4/5 Einstein A-coefficient in 1/s :
bool do_linemixing(const Numeric &P) const noexcept
Do linemixing test.
NUMERIC Numeric
The type to use for all floating point numbers.
void SetQuantumNumberLower(const QuantumNumberType i, const Rational r)
Contains the line shape namespace.
LinePopulationType LinePopulationTypeFromString(const String &in)
constexpr T pow3(T x)
power of three
Implementation of Matrix, Vector, and such stuff.
void ZeemanModelInitZero()
void LineShapeModelRemoveSelf()
LineNormalizationType mlinenorm
Line shape normalization type.
Container class for Quantum Numbers.
Headers and class definition of Zeeman modeling.
Numeric magnetic_quadrapole_moment_squared() const
This can be used to make arrays out of anything.
Contains the lookup data for one isotopologue.
Numeric Sgam() const
Self broadened width in Hz/Pa:
constexpr Index nelem(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the number of elements of the polarization type of this transition.
void SetMirroringType(const MirroringType in)
LineRecord()
Default constructor.
Polarization
Zeeman polarization selection.
const LineShape::Model & GetLineShapeModel() const
void SetQuantumNumberUpper(const String i, const Rational r)
constexpr Output differenceOutput(Output y, Output x) noexcept
Diff of two output.
void SetLinePopulationType(const LinePopulationType in)
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
const Numeric & LineMixingLimit() const
Line mixing pressure limit.
Numeric GetInternalDerivative(const Numeric &T, const Numeric &P, const ConstVectorView vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const RetrievalQuantity &derivative) const
Numeric Evlow() const
Lower state vibrational energy in cm^-1:
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
A constant view of a Vector.
void SetLineShapeModelParameter(const Numeric &X, const String &spec, const String &var, const String &coeff)
Numeric mlinemixing_limit
Line mixing pressure limit.
void SetLineMixing2SecondOrderData(ConstVectorView d)
bool LowerStateInQuantumID(const QuantumIdentifier &qid) const
Numeric PressureBroadeningAirBroadeningNair() const
Numeric G_lower() const
ARTSCAT-4/5 Lower state stat.
bool InQuantumID(const QuantumIdentifier &qid) const
MirroringType MirroringTypeFromString(const String &in)
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
Index NLTEUpperIndex() const
Rational LowerQuantumNumber(QuantumNumberType X) const
LineShape::Model mlineshapemodel
Line function data (pressure broadening and line mixing)
MirroringType mmirroring
Line shape mirroring effect type.
Index NLTELowerIndex() const
Numeric PressureBroadeningAirBroadeningPsf() const
Array< LineRecord > ArrayOfLineRecord
Holds a list of spectral line data.
void setF(Numeric new_mf)
Set the line center frequency in Hz.
SingleLineExternal ReadFromHitran2004Stream(istream &is)
Read from newer HITRAN.
Numeric GetPrepInternalDerivative(const Numeric &T, const Numeric &P, const Vector &vmrs, const RetrievalQuantity &derivative) const noexcept
Index Species() const
The index of the molecular species that this line belongs to.
Numeric I0() const
The line intensity in m^2*Hz at the reference temperature Ti0.
const LineNormalizationType & GetLineNormalizationType() const
Line shape normalization factor.
void setI0(Numeric new_mi0)
Set Intensity.
const Numeric & CutOff() const
Cutoff frequency.
void SetLineShapeModel(const LineShape::Model &lsm)
Numeric reduced_magnetic_quadrapole() const
Numeric ZeemanModelSplitting(Zeeman::Polarization type, Index i) const
Numeric F() const
The line center frequency in Hz.
Numeric ZeemanModelStrength(Zeeman::Polarization type, Index i) const
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
Numeric sqrt(const Rational r)
Square root.
void SetLineMixing2AER(ConstVectorView d)
const MirroringType & GetMirroringType() const
Line shape mirroring factor.
Numeric Nair() const
AGAM temperature exponent (dimensionless):