Function adas.adf15_transition
def adf15_transition(comments)
-
Interrogates the comment section of an adas208 generated adf15 file and returns details of the wavelengths, types and transitions details of the PECs. Indices of the upper and lower configuration, the configuration and quantumn numbers of levels in the adf04 file and, where possible, the power ranking and transition index in the adf04 file.
Parameters
comments
:str, list
- the comment section of the adf15 file
Returns
info
:dict
- information extracted
config : configurations in adf04 source file qm_s : 2S+1 qm_l : orbital momentumn (S, P, D etc) qm_stat : (statistical weight - 1) / 2 wave : wavelengths (A) tran_type : transition type - EXCIT, RECOM, CXEXC or None lower : index of config/quantunm nos. of lower level upper : upper tr_index : index of transition in adf04 file pr_index : power rank (of excitation PEC)
Notes
Pure python code.
This routine parses the comment section of adf15 files. The comments are not defined but this routine should work with adf15 files produced by adas208 but there is no guarantee that it will work on any particular adf15 file.
Note that the configuration and transition indices start at 1, as in the adf04 definition, and not at 0 (python-like).
Version History
- Martin O'Mullane, 16-12-2021
- First version
Example
Print the transition information for the PECs of neutral lithium.
>>> import adas as adas >>> file='/home/adas/adas/adf15/pec96#li/pec96#li_pju#li0.dat' >>> comments = adas.xxcomments(file) >>> info = adas.adf15_transition(comments) >>> for u,l,t in zip(info['upper'], info['lower'], info['tran_type']): print(u, '->', l,t) 2 -> 1 EXCIT 4 -> 1 EXCIT 7 -> 1 EXCIT