Function adas.adf06_bundle_levels

def adf06_bundle_levels(file=None, level_list=None)

Bundles levels in an adf06 file according to a input map and returns an adf06 fulldata dictionary.

Parameters

file : str
full name of ADAS adf06 file
level_list : int, list or array
The map of levels to be bundled.

Returns

fulldata : dict
adf06 dictionary.

Notes

Pure python code but calls routines which are dependent on fortran.

Only excitation and ionisation data is retained. Also assume just one parent for ionisation. The recombination processes for R-lines are unlikely for ion driven mechanism but CX (H-lines) may be added later.

Note that the configuration and transition indices start at 1, as in the adf06 definition, and not at 0 (python-like).

Version History

  • Martin O'Mullane, 07-07-2022

    • First version
  • Martin O'Mullane, 25-08-2023

    • Indexing error with A-values split over energies.
    • Different check for presence of S-lines.

Example

Produce an n-resolved Li0 dataset.

>>> import adas as adas
>>> file='/home/adas/adas/adf06/lilike/lilike_aug99#li0_t1.dat'
>>> level_list=[1, 1,2, 2, 2, 3, 3, 3]
>>> fd = adas.adf06_bundle_levels(file, level_list)
>>> fd['wa']