18#include "propagationmatrix.h"
46 return std::numeric_limits<Index>::max();
79 return std::numeric_limits<Index>::max();
112 return std::numeric_limits<Index>::max();
126 return (
end(Ju, Jl, type) -
start(Ju, Jl, type)).toIndex() + 1;
142constexpr Rational
Mu(Rational Ju,
146 return start(Ju, Jl, type) + n;
163constexpr Rational
Ml(Rational Ju,
167 return Mu(Ju, Jl, type, n) +
dM(type);
192 return std::numeric_limits<Numeric>::max();
214 Numeric GL)
noexcept {
215 auto JJ = J * (J + 1);
216 auto NN = N * (N + 1);
217 auto SS = S * (S + 1);
218 auto LL = Lambda * Lambda;
223 auto T1 = ((JJ + SS - NN) / JJ / 2).toNumeric();
224 auto T2 = ((JJ - SS + NN) * LL / NN / JJ / 2).toNumeric();
225 return GS * T1 + GL * T2;
227 auto T1 = ((JJ + SS - NN) / JJ / 2).toNumeric();
250 Numeric GL)
noexcept {
251 auto JJ = J * (J + 1);
253 if (JJ == Rational(0))
255 auto DIV = Omega / JJ;
256 auto T1 = (Sigma * DIV).toNumeric();
257 auto T2 = (Lambda * DIV).toNumeric();
258 return GS * T1 + GL * T2;
303 [[nodiscard]]
bool empty() const noexcept {
320 [[nodiscard]]
constexpr Numeric
gu() const noexcept {
return mdata.
gu; }
323 [[nodiscard]]
constexpr Numeric
gl() const noexcept {
return mdata.
gl; }
357 constexpr Numeric C = bohr_magneton / h;
359 return C * (
Ml(Ju, Jl, type, n) *
gl() -
Mu(Ju, Jl, type, n) *
gu());
406 std::array<Numeric, 4>
att{0, 0, 0, 0};
407 std::array<Numeric, 3>
dis{0, 0, 0};
416 Numeric
w = 0) noexcept
437 Numeric eta)
noexcept;
447 Numeric theta,
const Numeric eta)
noexcept;
457 Numeric eta)
noexcept;
487void dsum(PropagationMatrix& dpm,
488 const ComplexVectorView& abs,
489 const ComplexVectorView& dabs,
494 const Numeric dtheta,
506 Numeric H, theta, eta,
dH_du, dH_dv, dH_dw, dtheta_du, dtheta_dv, dtheta_dw,
553 Numeric eta)
noexcept {
554 return {H, theta, eta, 0, 0, 0, 0, 0, 0, 0, 0, 0};
base min(const Array< base > &x)
Min function.
constexpr Numeric & gl() noexcept
Returns the lower state g.
constexpr Model(Numeric gu, Numeric gl) noexcept
Default copy/init of Model from its only private variable.
constexpr Numeric & gu() noexcept
Returns the upper state g.
Numeric Strength(Rational Ju, Rational Jl, Polarization type, Index n) const ARTS_NOEXCEPT
Gives the strength of one subline of a given polarization.
friend std::istream & operator>>(std::istream &is, Model &m)
Input operator for Zeeman::Model.
friend std::ostream & operator<<(std::ostream &os, const Model &m)
Output operator for Zeeman::Model.
constexpr Numeric Splitting(Rational Ju, Rational Jl, Polarization type, Index n) const noexcept
Gives the splitting of one subline of a given polarization.
constexpr Numeric gl() const noexcept
Returns the lower state g.
bool empty() const noexcept
Returns true if the Model represents no Zeeman effect.
constexpr void gl(Numeric x) noexcept
Sets the lower state g.
constexpr Model(SplittingData gs={NAN, NAN}) noexcept
Default copy/init of Model from its only private variable.
constexpr void gu(Numeric x) noexcept
Sets the upper state g.
constexpr Numeric gu() const noexcept
Returns the upper state g.
Binary output file stream class.
Binary output file stream class.
This file contains basic functions to handle ASCII files.
This file contains the definition of String, the ARTS string class.
constexpr Numeric bohr_magneton
Bohr magneton [J/T].
constexpr Numeric h
Planck constant convenience name [J s].
Implements Zeeman modeling.
constexpr Index dM(Polarization type) noexcept
Gives the change of M given a polarization type.
constexpr Numeric SimpleGCaseB(Rational N, Rational J, Rational Lambda, Rational S, Numeric GS, Numeric GL) noexcept
Computes the Zeeman splitting coefficient.
const PolarizationVector & SelectPolarization(const AllPolarizationVectors &data, Polarization type) noexcept
Selects the polarization vector depending on polarization type.
constexpr Rational start(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the lowest M for a polarization type of this transition.
constexpr Index nelem(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the number of elements of the polarization type of this transition.
constexpr Derived FromPreDerived(Numeric H, Numeric theta, Numeric eta) noexcept
Sets Derived from predefined Derived parameters.
constexpr Numeric SimpleGCaseA(Rational Omega, Rational J, Rational Lambda, Rational Sigma, Numeric GS, Numeric GL) noexcept
Computes the Zeeman splitting coefficient.
constexpr Numeric PolarizationFactor(Polarization type) noexcept
The renormalization factor of a polarization type.
Derived FromGrids(Numeric u, Numeric v, Numeric w, Numeric z, Numeric a) noexcept
Computes the derived plane from ARTS grids.
AllPolarizationVectors AllPolarization_deta(Numeric theta, Numeric eta) noexcept
The derivative of AllPolarization wrt eta.
AllPolarizationVectors AllPolarization_dtheta(Numeric theta, const Numeric eta) noexcept
The derivative of AllPolarization wrt theta.
Polarization
Zeeman polarization selection.
Model GetAdvancedModel(const QuantumIdentifier &qid) ARTS_NOEXCEPT
Returns an advanced Zeeman model.
void dsum(PropagationMatrix &pm, const ComplexVectorView &abs, const ComplexVectorView &dabs, const PolarizationVector &polvec, const PolarizationVector &dpolvec_dtheta, const PolarizationVector &dpolvec_deta, const Numeric dH, const Numeric dt, const Numeric de, const bool do_phase) ARTS_NOEXCEPT
Sums the Zeeman components derivatives into a propagation matrix.
void sum(PropagationMatrix &pm, const ComplexVectorView &abs, const PolarizationVector &polvec, const bool do_phase) ARTS_NOEXCEPT
Sums the Zeeman components into a propagation matrix.
Model GetSimpleModel(const QuantumIdentifier &qid) ARTS_NOEXCEPT
Returns a simple Zeeman model.
constexpr Rational Ml(Rational Ju, Rational Jl, Polarization type, Index n) noexcept
Gives the lower state M value at an index.
AllPolarizationVectors AllPolarization(Numeric theta, Numeric eta) noexcept
Computes the polarization of each polarization type.
constexpr Rational Mu(Rational Ju, Rational Jl, Polarization type, Index n) noexcept
Gives the upper state M value at an index.
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
A logical struct for global quantum numbers with species identifiers.
PolarizationVector for each Polarization.
Contains derived values useful for Zeeman calculations.
Polarization vector for Zeeman Propagation Matrix.
std::array< Numeric, 4 > att
std::array< Numeric, 3 > dis
PolarizationVector(Numeric a=1, Numeric b=0, Numeric c=0, Numeric d=0, Numeric u=0, Numeric v=0, Numeric w=0) noexcept
Default init of class.
Main storage for Zeeman splitting coefficients.