69 auto nom = (lB + lD * (
J *
J +
J + 1) + lH *
pow2(
J *
J +
J + 1)) * (2 *
sqrt(
J *
J +
J) / (2 *
J + 1));
73 (gB + gD *
J * (
J - 1) + gH *
pow2(
J * (
J - 1))) * (
J - 1) +
74 (lB + lD *
J * (
J - 1) + lH *
pow2(
J * (
J - 1))) *
75 (2. / 3. - 2 *
J / (2 *
J + 1)) -
76 (B * (
J + 2) * (
J + 1) - D *
pow2((
J + 2) * (
J + 1)) +
77 H *
pow3((
J + 2) * (
J + 1)) -
78 (gB + gD * (
J + 2) * (
J + 1) + gH *
pow2((
J + 2) * (
J + 1))) * (
J + 2) +
79 (lB + lD * (
J + 2) * (
J + 1) + lH *
pow2((
J + 2) * (
J + 1))) *
80 (2. / 3. - 2 * (
J + 1) / (2 *
J + 1)));
82 auto phi = atan2(2 * nom, denom) / 2;
85 return (GS + GR) / (
J * (
J + 1)) - GR;
87 return (GS + GR) * (
pow2(cos(phi)) /
J -
pow2(sin(phi)) / (
J + 1)) +
88 2 * GLE * cos(2 * phi) / (2 *
J + 1) - GR;
90 return (GS + GR) * (
pow2(sin(phi)) /
J -
pow2(cos(phi)) / (
J + 1)) -
91 2 * GLE * cos(2 * phi) / (2 *
J + 1) - GR;
102 return gperp + (gperp + gpara) *
Numeric(k*k / (j*(j+1)));
106 if (qid.SpeciesName() ==
"O2") {
126 JU, NU, GS, GR, GLE, B, D, H, gB, gD, gH, lB, lD, lH);
130 JL, NL, GS, GR, GLE, B, D, H, gB, gD, gH, lB, lD, lH);
152 JU, NU, GS, GR, GLE, B, D, H, gB, gD, gH, lB, lD, lH);
156 JL, NL, GS, GR, GLE, B, D, H, gB, gD, gH, lB, lD, lH);
160 }
else if (qid.SpeciesName() ==
"CO") {
162 Numeric gperp = -0.2689 / Constant::mass_ratio_electrons_per_proton;
164 return Model({gperp, gperp});
166 }
else if (qid.SpeciesName() ==
"OCS") {
168 Numeric gperp = -.02889 / Constant::mass_ratio_electrons_per_proton;
169 Numeric gpara = 0 / Constant::mass_ratio_electrons_per_proton;
179 Numeric gperp = -.0285 / Constant::mass_ratio_electrons_per_proton;
180 Numeric gpara = -.061 / Constant::mass_ratio_electrons_per_proton;
190 }
else if (qid.SpeciesName() ==
"CO2") {
192 Numeric gperp = -.05508 / Constant::mass_ratio_electrons_per_proton;
193 Numeric gpara = 0 / Constant::mass_ratio_electrons_per_proton;
208 return Model({upperzero ? 0 : NAN, lowerzero ? 0 : NAN});
219 return Eigen::Vector3d(v, u, w).normalized();
226 return Eigen::Vector3d(cos(a)*sin(z), sin(a)*sin(z), cos(z));
233 return Eigen::Vector3d(cos(a)*cos(z), sin(a)*cos(z), -sin(z));
246 output.
H = std::hypot(std::hypot(u, v),
w);
251 output.
dH_dv = nH[0];
252 output.
dH_du = nH[1];
253 output.
dH_dw = nH[2];
256 const Numeric cos_theta = n.dot(nH);
258 output.
theta = std::acos(cos_theta);
259 if (sin_theta not_eq 0) {
260 const Eigen::Vector3d dtheta = (nH * cos_theta - n) / (output.
H * sin_theta);
271 const Eigen::Vector3d inplane = nH - nH.dot(n) * n;
272 const Numeric y = ev.cross(inplane).dot(n);
273 const Numeric x = ev.dot(inplane);
274 output.
eta = std::atan2(y, x);
275 if (x not_eq 0 or y not_eq 0) {
Numeric get_lande_spin_constant(const Index species) noexcept
Get the Lande spin constant.
constexpr Model(SplittingData gs={NAN, NAN}) noexcept
Default copy/init of Model from its only private variable.
Model GetAdvancedModel(const QuantumIdentifier &qid) noexcept
Returns an advanced Zeeman model.
cmplx FADDEEVA() w(cmplx z, double relerr)
Some molecular constants.
Eigen::Vector3d los_xyz_by_za_local(Numeric z, Numeric a)
constexpr T pow2(T x)
power of two
Model GetSimpleModel(const QuantumIdentifier &qid) noexcept
Returns a simple Zeeman model.
Eigen::Vector3d ev_xyz_by_za_local(Numeric z, Numeric a)
Implements rational numbers to work with other ARTS types.
A tag group can consist of the sum of several of these.
Class to identify and match lines by their quantum numbers.
Contains derived values useful for Zeeman calculations.
Numeric case_b_g_coefficient_o2(Rational j, Rational n, Numeric GS, Numeric GR, Numeric GLE, Numeric B, Numeric D, Numeric H, Numeric gB, Numeric gD, Numeric gH, Numeric lB, Numeric lD, Numeric lH)
NUMERIC Numeric
The type to use for all floating point numbers.
constexpr Derived FromPreDerived(Numeric H, Numeric theta, Numeric eta) noexcept
Sets Derived from predefined Derived parameters.
constexpr T pow3(T x)
power of three
constexpr Numeric toNumeric() const
Converts this to a Numeric.
Headers and class definition of Zeeman modeling.
constexpr Numeric closed_shell_trilinear(Rational k, Rational j, Numeric gperp, Numeric gpara)
constexpr bool isUndefined() const
Is the object not defined.
Eigen::Vector3d los_xyz_by_uvw_local(Numeric u, Numeric v, Numeric w)
Derived FromGrids(Numeric u, Numeric v, Numeric w, Numeric z, Numeric a) noexcept
Computes the derived plane from ARTS grids.
bool empty() const noexcept
Returns true if the Model represents no Zeeman effect.
constexpr Numeric SimpleG(const QuantumNumbers &qns, const Numeric &GS, const Numeric &GL) noexcept
Computes the Zeeman splitting coefficient.
Index Isotopologue() const
Isotopologue species index.
Numeric get_lande_lambda_constant() noexcept
Get the Lande Lambda constant.
Numeric sqrt(const Rational r)
Square root.