static_profile¶
- starkzee.static_profile.build_stark_matrix(n, Z, Fz, Fx)[source]¶
Build the (2n²) × (2n²) Stark electric-field perturbation matrix in eV.
The linear Stark interaction for an electron in an external electric field F = Fz ẑ + Fx x̂ is:
V_E = −e (z Fz + x Fx)
In the hydrogenic basis the matrix elements reduce to products of a radial element and an angular element. The within-shell (Δn = 0) radial element ⟨n, l | r | n, l±1⟩ is given analytically:
⟨n, l | r | n, l−1⟩ = (3n/2Z) √(n² − l²) [a₀]
The angular elements ⟨l, m_l | cos θ | l±1, m_l⟩ (for Fz) and the combinations for Fx are provided by
angular_dipole_element().The x-component is constructed as:
x/r = (T_{−1} + T_{+1}) / √2
where T_q are the spherical tensor components of r̂.
- Parameters:
- Returns:
Hermitian Stark perturbation matrix in eV.
- Return type:
ndarray,shape (2n²,2n²),dtype complex
Notes
This matrix operates within a single n-shell; the quadratic Stark effect (coupling to n ± 1, ±2 shells) is neglected, which is valid when the Stark shift ≪ the shell spacing Z² Ry (1/n² − 1/(n+1)²).
- starkzee.static_profile.solve_starkzee(n, Z, B, Fz, Fx, quadratic_zeeman=True, fine_structure=True, A=1)[source]¶
Diagonalize the combined Stark + Zeeman Hamiltonian for shell n.
Adds the Stark perturbation
build_stark_matrix()to the atomic/magnetic Hamiltonianbuild_hamiltonian()and diagonalizes the sum withnumpy.linalg.eigh:H = H_atom(B) + V_E(Fz, Fx)
This is the inner-loop solver called for every (microfield magnitude, microfield angle) quadrature point during profile integration.
- Parameters:
n (
int) – Principal quantum number.Z (
int) – Nuclear charge.B (
float) – Magnetic field [T].Fz (
float) – Electric field component along B [V m⁻¹].Fx (
float) – Electric field component perpendicular to B [V m⁻¹].quadratic_zeeman (
bool, optional) – Include the diamagnetic quadratic Zeeman term (default True).fine_structure (
bool, optional) – Include MV + Darwin corrections (default True).
- Returns:
eigenvalues (
ndarray,shape (2n²,)) – Energy eigenvalues in ascending order [eV].eigenvectors (
ndarray,shape (2n²,2n²)) – Orthonormal eigenstates as columns, in the canonical|n, l, m_l, m_s⟩basis.
- starkzee.static_profile.calculate_static_profile(n_u, n_l, Z, B, Ne_m3, Te_ev, energies_ev, num_f=20, num_mu=6, use_screening=True, quadratic_zeeman=True, fine_structure=True, frequency_dependent_width=True, A=1, Ti_ev=None, species='H')[source]¶
Compute the static-ion Stark-Zeeman line profile for n_u → n_l.
Integrates the Stark-Zeeman Hamiltonian over the plasma microfield distribution using Gauss-Legendre quadrature for both the field magnitude and the angle μ = cos θ between the microfield and B. For each quadrature point the combined Hamiltonian H = H_atom(B) + V_E(Fz, Fx) is diagonalized and the transition intensities accumulated into three polarization components.
- Parameters:
n_u (
int) – Upper and lower principal quantum numbers.n_l (
int) – Upper and lower principal quantum numbers.Z (
int) – Nuclear charge (1 for hydrogen).B (
float) – Magnetic field [T].B=0is fully supported; at zero field the π/σ decomposition is physically meaningless (no preferred axis) and all three returned components are equal by spherical symmetry.Ne_m3 (
float) – Electron density [m⁻³].Te_ev (
float) – Electron temperature [eV].energies_ev (
array-like) – Photon energies at which to evaluate the profile [eV].num_f (
int, optional) – Number of microfield quadrature points (default 20).num_mu (
int, optional) – Number of Gauss-Legendre angle points (default 6).use_screening (
bool, optional) – Use Hooper screened microfield distribution (default True).quadratic_zeeman (
bool, optional) – Include diamagnetic (quadratic) Zeeman term (default True).fine_structure (
bool, optional) – Include mass-velocity and Darwin corrections (Dirac fine structure) so that 2s_{1/2} = 2p_{1/2} (default True).frequency_dependent_width (
bool, optional) – When True (default), evaluate the GBK electron-impact width once per discrete transition at its detuning from the gross-structure line centerdE_i − E0. This is the physically correct interpretation: each Stark-Zeeman component sitting far from line center (e.g. a σ± component shifted by strong Zeeman) receives a reduced width, consistent with the breakdown of the impact approximation in the far wings. When False, use the single on-resonance valuew(0)for every transition (faster; valid when Zeeman splitting ≪ ω_c).Ti_ev (
float, optional) – Ion temperature [eV]. When supplied, Doppler broadening is folded into the Lorentzian accumulation as a Voigt profile, eliminating the need for a separate post-processing convolution. Default isNone(bare Lorentzian, no Doppler).species (
str, optional) – Emitting species ('H','D', or'T'); used to determine the ion mass for the Doppler width. Only relevant when Ti_ev is set. Default is'H'.approximations (Notes on)
-----------------------
**sigma_D** (
the Doppler width is computed as)mean(energies_ev). (σ_D = E_mean × sqrt(Ti / mc²) where E_mean =)
Strictly
σ_D(dE_i) (each transition at energy dE_i should use)
but
H-alpha (the fractional error is ΔE/E ≈ Δ_Zeeman/E0 — about 0.03 % for)
practice. (at 10 T — and is negligible in)
step** (**Lorentzian FFT)
both (convolution uses w_resonance (the on-resonance GBK width) for)
of (frequency_dependent_width settings. The per-transition variation)
σ_D. (w is ~4 % across the line and is negligible relative to)
- Returns:
profile_pi (
ndarray) – π (Δm = 0) polarization component.profile_sig_plus (
ndarray) – σ+ (Δm = +1) polarization component.profile_sig_minus (
ndarray) – σ− (Δm = −1) polarization component.
Notes
Observable intensity at angle θ to B:
I(θ) = I_π sin²θ + ½(I_σ+ + I_σ−)(1 + cos²θ)
Transverse (θ = 90°): I_π + ½(I_σ+ + I_σ−). Along B (θ = 0°): I_σ+ + I_σ−. Angle-averaged: ⅔ I_π + ⅓(I_σ+ + I_σ−).
- starkzee.static_profile.discrete_transitions(n_u, n_l, Z, B, Fz=0.0, Fx=0.0, quadratic_zeeman=True, fine_structure=True, min_strength=0.0, A=1)[source]¶
Return all discrete Stark-Zeeman dipole transitions at a single field configuration.
Diagonalizes the Stark-Zeeman Hamiltonian for both shells and enumerates every (upper eigenstate i, lower eigenstate j, polarization q) triplet with non-zero dipole matrix element squared.
- Parameters:
n_u (
int) – Upper and lower principal quantum numbers.n_l (
int) – Upper and lower principal quantum numbers.Z (
int) – Nuclear charge.B (
float) – Magnetic field [T].Fz (
float, optional) – Electric field component along B [V m⁻¹] (default 0).Fx (
float, optional) – Electric field component perpendicular to B [V m⁻¹] (default 0).quadratic_zeeman (
bool, optional) – Include diamagnetic Zeeman term (default True).fine_structure (
bool, optional) – Include mass-velocity + Darwin corrections (default True).min_strength (
float, optional) – Discard transitions with dipole strength abs(d_q)² < min_strength [a₀²] (default 0).A (
int, optional) – Atomic mass number of the emitter (1 = H, 2 = D, 3 = T). Sets the reduced-mass Rydberg used for the absolute level energies (default 1).
- Returns:
dict with five equal-length arrays sorted by transition energyenergy_ev– Transition energy E_upper_i − E_lower_j [eV].q– Polarization integer: 0 = π, −1 = σ−, +1 = σ+.strength– abs(d_q(i→j))² [a₀²]. Summed over all transitions equalsline_strength()(unitary invariance).upper_idx– Upper eigenstate index (0 … 2n_u²−1).lower_idx– Lower eigenstate index (0 … 2n_l²−1).