Calculation Workflow and Package Map

The public entry point is the LineProfile class. A typical calculation builds a wavelength, frequency, or energy grid, calls LineProfile.compute_profile(grid, grid_type), and then reads the total and polarization-resolved profiles from the resulting object. Internally, that high-level call delegates the work through a small number of focused modules:

  1. line_profile.py manages spectral grids, unit conversions, profile normalization, optional Doppler/slit convolutions, and user-facing result attributes.

  2. static_profile.py performs the quasi-static microfield average. It creates the field-strength grid, the Gauss-Legendre orientation grid, and accumulates \(P_\pi\), \(P_{\sigma^+}\), and \(P_{\sigma^-}\).

  3. radiator.py constructs the field-free plus magnetic radiator Hamiltonian \(H_A\) and the transition dipole matrices in the uncoupled \(|n,l,m_l,s,m_s\rangle\) basis.

  4. solve_starkzee() forms the complete Hamiltonian \(H = H_A + V_E\) at each microfield point and diagonalizes it as one matrix. The Stark term is not added perturbatively.

  5. broadening.py evaluates electron-impact widths, including the frequency-dependent Griem-Baranger-Kolb (GBK) model and the ZEST-inspired variant.

  6. ffm.py optionally replaces the static profile by a dynamic-ion profile using the Frequency Fluctuation Model.

  7. microfield.py supplies Hooper, Holtsmark, Potekhin, and custom tabulated microfield distributions.

  8. models/ contains comparison models: voigt, lomanowski, stehle_param, stehle, and rosato.

The numerical calculation has one central loop: for each sampled microfield magnitude \(F\) and orientation \(\mu=\cos\theta\), StarkZee builds \(V_E(F,\mu)\), diagonalizes upper and lower manifolds, rotates the transition dipoles into the dressed-state bases, evaluates electron-broadened component profiles, and adds the weighted contribution to the three polarization channels. This is the organizing idea behind the equations that follow.