54 const Index& manual_tag,
67 "Only for 3D *rtp_mag* or a manual magnetic field")
69 "*rtp_vmr* must match *abs_species*")
71 "*f_grid* must match *propmat_clearsky*")
73 "*propmat_clearsky* must have *stokes_dim* 4")
75 "*f_grid* must match *nlte_source*")
77 "*nlte_source* must have *stokes_dim* 4")
79 "*dpropmat_clearsky_dx* must match derived form of *jacobian_quantities*")
81 "*dpropmat_clearsky_dx* must have Stokes dim 4 and frequency dim same as *f_grid*")
83 "*dnlte_source_dx* must match derived form of *jacobian_quantities* when non-LTE is on")
85 "*dnlte_source_dx* must have Stokes dim 4 and frequency dim same as *f_grid* when non-LTE is on")
106 const auto polarization_scale_dtheta_data =
108 const auto polarization_scale_deta_data =
112 const Vector f_grid_sparse(0);
113 const Numeric sparse_limit = 0;
129 for (
Index ispecies = 0; ispecies <
ns; ispecies++) {
131 if (not abs_species[ispecies].
nelem() or not abs_species[ispecies].
Zeeman() or not abs_lines_per_species[ispecies].
nelem())
134 for (
auto& band : abs_lines_per_species[ispecies]) {
136 band, jacobian_quantities, rtp_nlte,
137 band.BroadeningSpeciesVMR(rtp_vmr, abs_species), abs_species[ispecies], rtp_vmr[ispecies],
138 isotopologue_ratios[band.Isotopologue()], rtp_pressure, rtp_temperature, X.H, sparse_limit,
139 polar, Options::LblSpeedup::None,
false);
148 for (
Index j=0; j<nq; j++) {
149 auto& deriv = jacobian_quantities[j];
151 if (not deriv.propmattype())
continue;
155 pol, dpol_dtheta, dpol_deta,
156 X.dH_du, X.dtheta_du, X.deta_du);
159 pol, dpol_dtheta, dpol_deta,
160 X.dH_dv, X.dtheta_dv, X.deta_dv);
163 pol, dpol_dtheta, dpol_deta,
164 X.dH_dw, X.dtheta_dw, X.deta_dw);
175 for (
Index j=0; j<nq; j++) {
176 auto& deriv = jacobian_quantities[j];
178 if (not deriv.propmattype())
continue;
182 pol, dpol_dtheta, dpol_deta,
183 X.dH_du, X.dtheta_du, X.deta_du,
false);
186 pol, dpol_dtheta, dpol_deta,
187 X.dH_dv, X.dtheta_dv, X.deta_dv,
false);
190 pol, dpol_dtheta, dpol_deta,
191 X.dH_dw, X.dtheta_dw, X.deta_dw,
false);
This can be used to make arrays out of anything.
Index nelem() const ARTS_NOEXCEPT
Number of elements.
Index nelem() const noexcept
Returns the number of elements.
Index NumberOfFrequencies() const
The number of frequencies of the propagation matrix.
Index StokesDimensions() const
The stokes dimension of the propagation matrix.
Stokes vector is as Propagation matrix but only has 4 possible values.
Constants of physical expressions as constexpr.
#define ARTS_USER_ERROR_IF(condition,...)
Constains various line scaling functions.
constexpr bool any_negative(const MatpackType &var) noexcept
Checks for negative values.
NUMERIC Numeric
The type to use for all floating point numbers.
INDEX Index
The type to use for all integer numbers and indices.
Index nelem(const Lines &l)
Number of lines.
constexpr auto deg2rad(T x) noexcept -> decltype(x *one_degree_in_radians)
Converts degrees to radians.
SpeciesIsotopologueRatios isotopologue_ratios()
void compute(ComputeData &com, ComputeData &sparse_com, const AbsorptionLines &band, const ArrayOfRetrievalQuantity &jacobian_quantities, const EnergyLevelMap &nlte, const Vector &vmrs, const ArrayOfSpeciesTag &self_tag, const Numeric &self_vmr, const Numeric &isot_ratio, const Numeric &P, const Numeric &T, const Numeric &H, const Numeric &sparse_lim, const Zeeman::Polarization zeeman_polarization, const Options::LblSpeedup speedup_type, const bool robust) ARTS_NOEXCEPT
Compute the absorption of an absorption band.
Implements Zeeman modeling.
const PolarizationVector & SelectPolarization(const AllPolarizationVectors &data, Polarization type) noexcept
Selects the polarization vector depending on polarization type.
constexpr Derived FromPreDerived(Numeric H, Numeric theta, Numeric eta) noexcept
Sets Derived from predefined Derived parameters.
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.
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.
AllPolarizationVectors AllPolarization(Numeric theta, Numeric eta) noexcept
Computes the polarization of each polarization type.
bool bad_propmat(const Array< T > &main, const Vector &f_grid, const Index sd=1) noexcept
Checks if a Propagation Matrix or something similar has good grids.
Some molecular constants.
Main computational data for the line shape and strength calculations.
void zeeman_on_the_fly(PropagationMatrix &propmat_clearsky, StokesVector &nlte_source, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, ArrayOfStokesVector &dnlte_source_dx, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const SpeciesIsotopologueRatios &isotopologue_ratios, const Vector &f_grid, const Vector &rtp_vmr, const EnergyLevelMap &rtp_nlte, const Vector &rtp_mag, const Vector &rtp_los, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Index &nlte_do, const Index &manual_tag, const Numeric &H0, const Numeric &theta0, const Numeric &eta0)
Main and only way to compute Zeeman effect.