atomic_data
NIST atomic energy-level database and loader. Field-free level energies
for each element are stored in starkzee/data/atomic_levels.json as
cm-1 values above the ground state (NIST vacuum convention).
The loader is called by starkzee.radiator.build_hamiltonian()
when use_empirical_data=True.
Use python scripts/update_nist_levels.py H --spectrum "H I" to refresh the bundled JSON from the NIST ASD levels query. The downloader is intentionally a development tool; runtime profile calculations only read the committed JSON file.
- class starkzee.atomic_data.AtomicState(energy, n, l=None, j=None, spin=None)[source]
Bases:
objectExplicitly represents an atomic quantum state.
- starkzee.atomic_data.get_data_path()[source]
Returns the absolute path to the data directory.
- Return type:
- starkzee.atomic_data.load_levels(atom, fine_structure)[source]
Load atomic states from the JSON database.
- Parameters:
- Returns:
Atomic states ordered as stored in the JSON file, with energies in cm-1 above the ground state.
- Return type:
listofAtomicState- Raises:
ValueError – If atom or the requested fine-structure section is absent from the database.
- starkzee.atomic_data.calculate_wavenumber(upper_state, lower_state, lambda_shift=0.0)[source]
Compute the transition wavenumber between two atomic states.
- Parameters:
upper_state (
AtomicState) – Upper energy level.lower_state (
AtomicState) – Lower energy level.lambda_shift (
float, optional) – Additional shift added to the computed wavenumber (default 0.0).
- Returns:
Transition wavenumber \(E_u - E_l + \lambda_\mathrm{shift}\) in cm-1.
- Return type:
- Raises:
ValueError – If upper_state has lower energy than lower_state.