ARTS  2.5.0 (git: 260355e1)
Zeeman Namespace Reference

Implements Zeeman modeling. More...

Classes

struct  SplittingData
 Main storage for Zeeman splitting coefficients. More...
 
class  Model
 Main Zeeman Model. More...
 
class  PolarizationVector
 Polarization vector for Zeeman Propagation Matrix. More...
 
struct  AllPolarizationVectors
 PolarizationVector for each Polarization. More...
 
struct  Derived
 Contains derived values useful for Zeeman calculations. More...
 

Enumerations

enum class  Polarization : char { SigmaMinus , Pi , SigmaPlus }
 Zeeman polarization selection. More...
 

Functions

std::ostream & operator<< (std::ostream &os, const Model &m)
 
std::istream & operator>> (std::istream &is, Model &m)
 
std::ostream & operator<< (bofstream &bof, const Model &m)
 
std::istream & operator>> (bifstream &bif, Model &m)
 
AllPolarizationVectors AllPolarization (Numeric theta, Numeric eta) noexcept
 Computes the polarization of each polarization type. More...
 
AllPolarizationVectors AllPolarization_dtheta (Numeric theta, const Numeric eta) noexcept
 The derivative of AllPolarization wrt theta. More...
 
AllPolarizationVectors AllPolarization_deta (Numeric theta, Numeric eta) noexcept
 The derivative of AllPolarization wrt eta. More...
 
const PolarizationVectorSelectPolarization (const AllPolarizationVectors &data, Polarization type) noexcept
 Selects the polarization vector depending on polarization type. More...
 
void sum (PropagationMatrix &pm, const ComplexVectorView &abs, const PolarizationVector &polvec, const bool do_phase=true) ARTS_NOEXCEPT
 Sums the Zeeman components into a propagation matrix. More...
 
void dsum (PropagationMatrix &dpm, const ComplexVectorView &abs, const ComplexVectorView &dabs, const PolarizationVector &polvec, const PolarizationVector &dpolvec_dtheta, const PolarizationVector &dpolvec_deta, const Numeric dH, const Numeric dtheta, const Numeric deta, const bool do_phase=true) ARTS_NOEXCEPT
 Sums the Zeeman components derivatives into a propagation matrix. More...
 
constexpr Index dM (Polarization type) noexcept
 Gives the change of M given a polarization type. More...
 
constexpr Rational start (Rational Ju, Rational Jl, Polarization type) noexcept
 Gives the lowest M for a polarization type of this transition. More...
 
constexpr Rational end (Rational Ju, Rational Jl, Polarization type) noexcept
 Gives the largest M for a polarization type of this transition. More...
 
constexpr Index nelem (Rational Ju, Rational Jl, Polarization type) noexcept
 Gives the number of elements of the polarization type of this transition. More...
 
constexpr Rational Mu (Rational Ju, Rational Jl, Polarization type, Index n) noexcept
 Gives the upper state M value at an index. More...
 
constexpr Rational Ml (Rational Ju, Rational Jl, Polarization type, Index n) noexcept
 Gives the lower state M value at an index. More...
 
constexpr Numeric PolarizationFactor (Polarization type) noexcept
 The renormalization factor of a polarization type. More...
 
constexpr bool GoodHundData (const QuantumNumbers &qns) noexcept
 Checks if the quantum numbers are good for this transition. More...
 
constexpr Numeric SimpleGCaseB (Rational N, Rational J, Rational Lambda, Rational S, Numeric GS, Numeric GL) noexcept
 Computes the Zeeman splitting coefficient. More...
 
constexpr Numeric SimpleGCaseA (Rational Omega, Rational J, Rational Lambda, Rational Sigma, Numeric GS, Numeric GL) noexcept
 Computes the Zeeman splitting coefficient. More...
 
constexpr Numeric SimpleG (const QuantumNumbers &qns, const Numeric &GS, const Numeric &GL) noexcept
 Computes the Zeeman splitting coefficient. More...
 
Model GetSimpleModel (const QuantumIdentifier &qid) ARTS_NOEXCEPT
 Returns a simple Zeeman model. More...
 
Model GetAdvancedModel (const QuantumIdentifier &qid) ARTS_NOEXCEPT
 Returns an advanced Zeeman model. More...
 
Derived FromGrids (Numeric u, Numeric v, Numeric w, Numeric z, Numeric a) noexcept
 Computes the derived plane from ARTS grids. More...
 
constexpr Derived FromPreDerived (Numeric H, Numeric theta, Numeric eta) noexcept
 Sets Derived from predefined Derived parameters. More...
 

Detailed Description

Implements Zeeman modeling.

Enumeration Type Documentation

◆ Polarization

enum Zeeman::Polarization : char
strong

Zeeman polarization selection.

Enumerator
SigmaMinus 
Pi 
SigmaPlus 

Definition at line 44 of file zeemandata.h.

Function Documentation

◆ AllPolarization()

AllPolarizationVectors Zeeman::AllPolarization ( Numeric  theta,
Numeric  eta 
)
noexcept

Computes the polarization of each polarization type.

Parameters
[in]thetaThe angle along the magnetic field
[in]etaThe angle counter-clockwise in the magnetic field plane
Returns
The polarization vectors of all Zeeman polarization

Definition at line 313 of file zeemandata.cc.

References Zeeman::AllPolarizationVectors::pi, Zeeman::AllPolarizationVectors::sm, and Zeeman::AllPolarizationVectors::sp.

Referenced by propmat_clearskyAddOnTheFlyLineMixingWithZeeman(), and zeeman_on_the_fly().

◆ AllPolarization_deta()

AllPolarizationVectors Zeeman::AllPolarization_deta ( Numeric  theta,
Numeric  eta 
)
noexcept

The derivative of AllPolarization wrt eta.

Parameters
[in]thetaThe angle along the magnetic field
[in]etaThe angle counter-clockwise in the magnetic field plane
Returns
The derivative of AllPolarization wrt eta

Definition at line 346 of file zeemandata.cc.

References Zeeman::AllPolarizationVectors::pi, Zeeman::AllPolarizationVectors::sm, and Zeeman::AllPolarizationVectors::sp.

Referenced by propmat_clearskyAddOnTheFlyLineMixingWithZeeman(), and zeeman_on_the_fly().

◆ AllPolarization_dtheta()

AllPolarizationVectors Zeeman::AllPolarization_dtheta ( Numeric  theta,
const Numeric  eta 
)
noexcept

The derivative of AllPolarization wrt theta.

Parameters
[in]thetaThe angle along the magnetic field
[in]etaThe angle counter-clockwise in the magnetic field plane
Returns
The derivative of AllPolarization wrt theta

Definition at line 329 of file zeemandata.cc.

References Zeeman::AllPolarizationVectors::pi, Zeeman::AllPolarizationVectors::sm, and Zeeman::AllPolarizationVectors::sp.

Referenced by propmat_clearskyAddOnTheFlyLineMixingWithZeeman(), and zeeman_on_the_fly().

◆ dM()

constexpr Index Zeeman::dM ( Polarization  type)
constexprnoexcept

Gives the change of M given a polarization type.

Parameters
[in]typeThe polarization type
Returns
The change in M

Definition at line 52 of file zeemandata.h.

References max, Pi, SigmaMinus, SigmaPlus, and Hitran::type.

Referenced by Ml(), and Zeeman::Model::Strength().

◆ dsum()

void Zeeman::dsum ( PropagationMatrix dpm,
const ComplexVectorView abs,
const ComplexVectorView dabs,
const PolarizationVector polvec,
const PolarizationVector dpolvec_dtheta,
const PolarizationVector dpolvec_deta,
const Numeric  dH,
const Numeric  dtheta,
const Numeric  deta,
const bool  do_phase = true 
)

Sums the Zeeman components derivatives into a propagation matrix.

Parameters
[in,out]pmThe propagation matrix derivative
[in]absThe complex absorption vector
[in]dabsThe complex absorption vector derivative w.r.t. H
[in]polvecThe polarization vector
[in]dpolvec_dthetaThe polarization vector derivative w.r.t. theta
[in]dpolvec_detaThe polarization vector derivative w.r.t. eta
[in]dHThe derivative w.r.t. H
[in]dthetaThe derivative w.r.t. theta
[in]detaThe derivative w.r.t. eta

Definition at line 391 of file zeemandata.cc.

References abs, ARTS_ASSERT, dabs, joker, and MapToEigen().

Referenced by propmat_clearskyAddOnTheFlyLineMixingWithZeeman(), and zeeman_on_the_fly().

◆ end()

constexpr Rational Zeeman::end ( Rational  Ju,
Rational  Jl,
Polarization  type 
)
constexprnoexcept

Gives the largest M for a polarization type of this transition.

Since the polarization determines the change in M, this function gives the last M of interest in the range of M possible for a given transition

The user has to ensure that Ju and Jl is a valid transition

Parameters
[in]JuJ of the upper state
[in]JlJ of the upper state
[in]typeThe polarization type
Returns
The largest M value

Definition at line 109 of file zeemandata.h.

References max, min, Pi, SigmaMinus, SigmaPlus, and Hitran::type.

Referenced by abs_lines_per_speciesChangeBaseParameterForSpecies(), abs_lines_per_speciesSetBaseParameterForSpecies(), abs_lines_per_speciesSetCutoffForSpecies(), abs_lines_per_speciesSetLinemixingLimitForSpecies(), abs_lines_per_speciesSetLineShapeTypeForSpecies(), abs_lines_per_speciesSetMirroringForSpecies(), abs_lines_per_speciesSetNormalizationForSpecies(), abs_lines_per_speciesSetPopulationForSpecies(), abs_lines_per_speciesSetT0ForSpecies(), AgRecord::AgRecord(), Array< base >::Array(), Raw::Average::avg(), copy(), Raw::Average::cov(), ARTS::Method::Duration(), ARTS::Agenda::Method::Duration(), gen_dir(), get_wsv_id(), InteractiveWorkspace::InteractiveWorkspace(), lookup_workspace_variable(), md_sanity_checks(), Raw::Average::nanavg(), Raw::Average::nanvar(), nelem(), MatrixView::operator*=(), MatrixView::operator+=(), MatrixView::operator-=(), MatrixView::operator/=(), operator<<(), Array< base >::operator=(), ArrayOfSpeciesTag::operator=(), Absorption::LineMixing::MapOfErrorCorrectedSuddenData::operator[](), option_describe(), option_input(), option_methods(), ArtsParser::parse_generic_input(), ArtsParser::parse_generic_output(), ArtsParser::parse_method_args(), ArtsParser::parse_specific_input(), ArtsParser::parse_specific_output(), ArtsParser::read_name_or_value(), bifstream::seek(), bofstream::seek(), test_sinc_likes_0limit(), my_basic_string< charT >::tolower(), my_basic_string< charT >::toupper(), and Raw::Average::var().

◆ FromGrids()

Zeeman::Derived Zeeman::FromGrids ( Numeric  u,
Numeric  v,
Numeric  w,
Numeric  z,
Numeric  a 
)
noexcept

Computes the derived plane from ARTS grids.

When done and if everything is well-defined:

\[ H = \sqrt{u^2 + v^2 + w^2}, \]

\[ \theta = \arccos \left( \vec{n} \cdot \vec{n}_H \right), \]

\[ \eta = \arctan\left( \frac{y}{x} \right), \]

\[ \frac{\partial H}{\partial \vec{H}} = \vec{n}_H, \]

\[ \frac{\partial \theta}{\partial \vec{H}} = \frac{\vec{n}_H \cos{\theta} - \vec{n}}{H\sin\theta}, \]

\[ \frac{\partial \eta}{\partial \vec{H}} = \frac{\vec{n}\times\vec{n}_H}{H\left(x^2 + y^2\right)} \]

With these helpers (some defined, others not):

\[ \vec{H} = \left[\begin{array}{l} v \\ u \\ w \end{array}\right], \]

\[ \vec{n}_H = \frac{\vec{H}}{H} , \]

\[ \vec{n} = \left[\begin{array}{r} \cos a \sin z \\ \sin a\sin z \\ \cos z \end{array}\right], \]

\[ \vec{e}_v = \left[\begin{array}{r} \cos a \cos z \\ \sin a\cos z \\ -\sin z \end{array}\right], \]

\[ y = \left\{\vec{e}_v \times \left[\vec{n}_H - \left(\vec{n}_H\cdot\vec{n}\right)\vec{n}\right]\right\} \cdot \vec{n}, \]

\[ x = \vec{e}_v \cdot \left[\vec{n}_H - \left(\vec{n}_H\cdot\vec{n}\right)\vec{n}\right] \]

Note that all other values are zero if \( H \) is zero, that \( \frac{\partial \theta}{\partial \vec{H}} \) is zero if \( \sin{\theta} \) is zero, that \( \frac{\partial \eta}{\partial \vec{H}} \) is zero if \( x \) and \( y \) are zero, and that the atan2(y, x) function is used for \( \eta \) to compensate for when \( x \) is zero.

Parameters
[in]uMagnetic field u-parameter
[in]vMagnetic field b-parameter
[in]wMagnetic field w-parameter
[in]zZenith angle
[in]aAzimuth angle
Returns
The derived plane

Definition at line 229 of file zeemandata.cc.

References a, Zeeman::Derived::deta_du, Zeeman::Derived::deta_dv, Zeeman::Derived::deta_dw, Zeeman::Derived::dH_du, Zeeman::Derived::dH_dv, Zeeman::Derived::dH_dw, Zeeman::Derived::dtheta_du, Zeeman::Derived::dtheta_dv, Zeeman::Derived::dtheta_dw, Zeeman::Derived::eta, ev_xyz_by_za_local(), FromPreDerived(), Zeeman::Derived::H, los_xyz_by_uvw_local(), los_xyz_by_za_local(), Constant::pow2(), sqrt(), Zeeman::Derived::theta, u, v, w(), ARTS::Var::x(), and ARTS::Var::y().

Referenced by propmat_clearskyAddOnTheFlyLineMixingWithZeeman(), and zeeman_on_the_fly().

◆ FromPreDerived()

constexpr Derived Zeeman::FromPreDerived ( Numeric  H,
Numeric  theta,
Numeric  eta 
)
constexprnoexcept

Sets Derived from predefined Derived parameters.

Parameters
[in]HDerived magnetic field strength
[in]thetaDerived magnetic field theta angle
[in]etaDerived magnetic field eta angle
Returns
The pre-derived plane

Definition at line 678 of file zeemandata.h.

Referenced by FromGrids(), and zeeman_on_the_fly().

◆ GetAdvancedModel()

Zeeman::Model Zeeman::GetAdvancedModel ( const QuantumIdentifier qid)

Returns an advanced Zeeman model.

Will look at available Quantum numbers and use best approximation for the model to use. If no good approximation is available, it returns Model({0, 0}).

Parameters
[in]qidTransition type quantum id
Returns
Zeeman model

Definition at line 105 of file zeemandata.cc.

References ARTS_ASSERT.

Referenced by Zeeman::Model::Model(), ReadArrayOfARTSCAT(), ReadARTSCAT(), ReadHITRAN(), ReadJPL(), ReadLBLRTM(), and test_zeeman().

◆ GetSimpleModel()

Zeeman::Model Zeeman::GetSimpleModel ( const QuantumIdentifier qid)

Returns a simple Zeeman model.

Will use the simple Hund case provided by input. Throws if the input is bad

Parameters
[in]qidTransition type quantum id
Returns
Zeeman model

Definition at line 32 of file zeemandata.cc.

References get_lande_lambda_constant(), get_lande_spin_constant(), gu, and SimpleG().

Referenced by Zeeman::Model::Model(), and test_zeeman().

◆ GoodHundData()

constexpr bool Zeeman::GoodHundData ( const QuantumNumbers qns)
constexprnoexcept

Checks if the quantum numbers are good for this transition.

Given some Hund state, various quantum numbers must be defined to allow the Zeeman calculations to work

Parameters
[in]qnsQuantum numbers of a level
Returns
If the numbers can be used to compute simple Zeeman effect

Definition at line 213 of file zeemandata.h.

References CaseA, CaseB, and N.

Referenced by SimpleG().

◆ Ml()

constexpr Rational Zeeman::Ml ( Rational  Ju,
Rational  Jl,
Polarization  type,
Index  n 
)
constexprnoexcept

Gives the lower state M value at an index.

The user has to ensure that Ju and Jl is a valid transition

The user has to ensure n is less than the number of elements

Parameters
[in]JuJ of the upper state
[in]JlJ of the upper state
[in]typeThe polarization type
[in]nThe position
Returns
The lower state M

Definition at line 174 of file zeemandata.h.

References dM(), Mu(), and Hitran::type.

Referenced by Zeeman::Model::Strength().

◆ Mu()

constexpr Rational Zeeman::Mu ( Rational  Ju,
Rational  Jl,
Polarization  type,
Index  n 
)
constexprnoexcept

Gives the upper state M value at an index.

The user has to ensure that Ju and Jl is a valid transition

The user has to ensure n is less than the number of elements

Parameters
[in]JuJ of the upper state
[in]JlJ of the upper state
[in]typeThe polarization type
[in]nThe position
Returns
The upper state M

Definition at line 153 of file zeemandata.h.

References start(), and Hitran::type.

Referenced by Ml(), and Zeeman::Model::Strength().

◆ nelem()

constexpr Index Zeeman::nelem ( Rational  Ju,
Rational  Jl,
Polarization  type 
)
constexprnoexcept

Gives the number of elements of the polarization type of this transition.

The user has to ensure that Ju and Jl is a valid transition

Parameters
[in]JuJ of the upper state
[in]JlJ of the upper state
[in]typeThe polarization type
Returns
The number of elements

Definition at line 136 of file zeemandata.h.

References end(), start(), and Hitran::type.

◆ operator<<() [1/2]

std::ostream & Zeeman::operator<< ( bofstream bof,
const Model m 
)

Definition at line 303 of file zeemandata.cc.

◆ operator<<() [2/2]

std::ostream & Zeeman::operator<< ( std::ostream &  os,
const Model m 
)

Definition at line 293 of file zeemandata.cc.

◆ operator>>() [1/2]

std::istream & Zeeman::operator>> ( bifstream bif,
Model m 
)

Definition at line 308 of file zeemandata.cc.

◆ operator>>() [2/2]

std::istream & Zeeman::operator>> ( std::istream &  is,
Model m 
)

Definition at line 298 of file zeemandata.cc.

◆ PolarizationFactor()

constexpr Numeric Zeeman::PolarizationFactor ( Polarization  type)
constexprnoexcept

The renormalization factor of a polarization type.

The polarization comes from some geometry. This function returns the factor we need to compute that geometry and to turn it into something that normalizes every possible M for this type into some strength that sums to unity

Parameters
[in]typeThe polarization type
Returns
Rescale factor

Definition at line 192 of file zeemandata.h.

References max, Pi, SigmaMinus, SigmaPlus, and Hitran::type.

Referenced by Zeeman::Model::Strength().

◆ SelectPolarization()

const PolarizationVector & Zeeman::SelectPolarization ( const AllPolarizationVectors data,
Polarization  type 
)
noexcept

Selects the polarization vector depending on polarization type.

Parameters
[in]dataThe pre-computed polarization vectors
[in]typeThe type of polarization to select

Definition at line 364 of file zeemandata.cc.

References data, Pi, SigmaMinus, SigmaPlus, and Hitran::type.

Referenced by propmat_clearskyAddOnTheFlyLineMixingWithZeeman(), and zeeman_on_the_fly().

◆ SimpleG()

constexpr Numeric Zeeman::SimpleG ( const QuantumNumbers qns,
const Numeric GS,
const Numeric GL 
)
constexprnoexcept

Computes the Zeeman splitting coefficient.

The level should be Hund case a or b type and all the quantum numbers have to be defined

Parameters
[in]qnsQuantum numbers of a level
[in]GSThe spin Landé coefficient of the molecule
[in]GSThe Landé coefficient of the molecule
Returns
If the numbers can be used to compute simple Zeeman effect

Definition at line 316 of file zeemandata.h.

References CaseA, CaseB, GoodHundData(), N, SimpleGCaseA(), and SimpleGCaseB().

Referenced by GetSimpleModel().

◆ SimpleGCaseA()

constexpr Numeric Zeeman::SimpleGCaseA ( Rational  Omega,
Rational  J,
Rational  Lambda,
Rational  Sigma,
Numeric  GS,
Numeric  GL 
)
constexprnoexcept

Computes the Zeeman splitting coefficient.

The level should be Hund case a type and all the values have to be defined

Parameters
[in]OmegaThe Omega quantum number of the level
[in]JThe J quantum number of the level
[in]LambdaThe Lambda quantum number of the level
[in]SigmaThe Sigma quantum number of the level
[in]GSThe spin Landé coefficient of the molecule
[in]GLThe Landé coefficient of the molecule
Returns
Zeeman splitting coefficient of the level

Definition at line 287 of file zeemandata.h.

Referenced by SimpleG().

◆ SimpleGCaseB()

constexpr Numeric Zeeman::SimpleGCaseB ( Rational  N,
Rational  J,
Rational  Lambda,
Rational  S,
Numeric  GS,
Numeric  GL 
)
constexprnoexcept

Computes the Zeeman splitting coefficient.

The level should be Hund case b type and all the values have to be defined

Parameters
[in]NThe N quantum number of the level
[in]JThe J quantum number of the level
[in]LambdaThe Lambda quantum number of the level
[in]SThe S quantum number of the level
[in]GSThe spin Landé coefficient of the molecule
[in]GLThe Landé coefficient of the molecule
Returns
Zeeman splitting coefficient of the level

Definition at line 250 of file zeemandata.h.

References N.

Referenced by SimpleG().

◆ start()

constexpr Rational Zeeman::start ( Rational  Ju,
Rational  Jl,
Polarization  type 
)
constexprnoexcept

Gives the lowest M for a polarization type of this transition.

Since the polarization determines the change in M, this function gives the first M of interest in the range of M possible for a given transition

The user has to ensure that Ju and Jl is a valid transition

Parameters
[in]JuJ of the upper state
[in]JlJ of the upper state
[in]typeThe polarization type
Returns
The lowest M value

Definition at line 78 of file zeemandata.h.

References max, min, Pi, SigmaMinus, SigmaPlus, and Hitran::type.

Referenced by add_scalar_variance(), ArrayOfIndexLinSpace(), ARTS::Method::ArrayOfIndexLinSpace(), ARTS::Agenda::Method::ArrayOfIndexLinSpace(), ArrayOfTimeNLinSpace(), ARTS::Method::ArrayOfTimeNLinSpace(), ARTS::Agenda::Method::ArrayOfTimeNLinSpace(), Raw::Average::avg(), Raw::Calibration::caha(), check_and_add_block(), ComplexVector::ComplexVector(), Raw::Average::cov(), covmat_seAddBlock(), ARTS::Method::Duration(), ARTS::Agenda::Method::Duration(), fill_tensor4(), fill_tensor5(), ForLoop(), ARTS::Method::ForLoop(), ARTS::Agenda::Method::ForLoop(), linspace(), Mu(), Raw::Average::nanstd(), nca_get_dataa_double(), nelem(), nlinspace(), nlogspace(), Linefunctions::set_cross_section_of_band(), setRange(), Raw::Average::std(), test_AngIntegrate_trapezoid_opti(), test_ls(), test_sinc_likes_0limit(), test_x(), test_x_fixedstep(), test_xy(), test_xy_fixedstep(), test_xy_fixedstep_opt(), test_xy_fixedstep_opt2(), test_xy_opt(), Raw::Average::var(), Vector::Vector(), VectorLinSpace(), ARTS::Method::VectorLinSpace(), ARTS::Agenda::Method::VectorLinSpace(), VectorLogSpace(), ARTS::Method::VectorLogSpace(), ARTS::Agenda::Method::VectorLogSpace(), VectorNLinSpace(), ARTS::Method::VectorNLinSpace(), ARTS::Agenda::Method::VectorNLinSpace(), ARTS::Method::VectorNLogSpace(), and ARTS::Agenda::Method::VectorNLogSpace().

◆ sum()

void Zeeman::sum ( PropagationMatrix pm,
const ComplexVectorView abs,
const PolarizationVector polvec,
const bool  do_phase = true 
)

Sums the Zeeman components into a propagation matrix.

Parameters
[in,out]pmThe propagation matrix
[in]absThe complex absorption vector
[in]polvecThe polarization vector

Definition at line 377 of file zeemandata.cc.

References abs, ARTS_ASSERT, joker, and MapToEigen().

Referenced by convolve(), fac(), interp(), pndFromPsd(), propmat_clearskyAddOnTheFlyLineMixingWithZeeman(), PWR98H2OAbsModel(), Linefunctions::set_cross_section_of_band(), xsec_species(), and zeeman_on_the_fly().