Function adas.xxdata_48
def xxdata_48(file=None)
-
Reads all variants of the adf48 radiative recombination rate files and returns all of its contents in a dictionary.
Parameters
file
:str
- full name of ADAS adf48 file
Returns
fulldata
:dict
- contents of the adf48 file
'iz' : recombined ion charge 'iz0' : nuclear charge 'iz1' : recombining ion charge 'sym' : recombined ion seq 'ctype' : resolution type (ls/ic/ca) 'iform' : data set organisational form 1: LS 2005 Badnell data form 2: IC 2005 Badnell data form 3: unassigned 4: hybrid LS 2015 Badnell data form 5: hybrid IC 2015 Badnell data form 6: hybrid CA 2015 Badnell data form 'nprnt' : total number of parents 'nprnti' : number of parents which are initial parents 'nprntf' : number of parents which are final parents 'bwnp' : binding wave no. of ground parent (cm-1) 'ipa' : parent energy level index number array of : parent lvl/trm/cfg index 'cstrpa' : nomencl./config. for parent level 'ipa()' array of dim : parent lvl/trm/cfg index 'ispa' : multiplicity for parent level 'ipa()' note: (ispa-1)/2 = quantum number (sp) array of dim : parent lvl/trm/cfg index 'ilpa' : quantum number (lp) for parent level 'ipa()' array of dim : parent lvl/trm/cfg index 'xjpa' : quantum number (jp) for parent level 'ipa()' note: (2*xjpa)+1 = statistical weight array of dim : parent lvl/trm/cfg index 'wpa' : energy relative to parent level 1 (cm-1) for parent level 'ipa()' array of dim : parent lvl/trm/cfg index 'nlvl' : number of energy levels (lvl/trm/cfg) of recombined ion - replaced ncfg for hybrid forms 'bwnr' : ionisation potential (cm-1) of lowest level of recombined ion 'ia' : recombined ion energy level index number array of dim : lvl/trm/cfg index 'ip' : associated parent of recombined level array of dim : lvl/trm/cfg index 'cstrga' : nomencl./config. for recombined ion level 'ia()' array of dim : lvl/trm/cfg index 'isa' : multiplicity for recombined level 'ia()' note: (isa-1)/2 = quantum number (s) array of dim : lvl/trm/cfg index 'ila' : quantum number (l) for recombined level 'ia()' array of dim : lvl/trm/cfg index 'xja' : quantum number (j) for recombined level 'ia()' note: (2*xja)+1 = statistical weight array of dim : lvl/trm/cfg index 'wa' : energy relative to recombined level 1 (cm-1) for recombined level 'ia()' array of dim : lvl/trm/cfg index 'nlrep' : number of representative nl-shells 'irepa_nl' : representative nl-shell index number array of dim : representative nl-shell index 'nlrepa_n' : n value for representative nl-shell array of dim : representative nl-shell index 'nlrepa_l' : l value for representative nl-shell array of dim : representative nl-shell index 'nrep' : number of representative n-shells 'irepa_n' : representative n-shell index number array of dim : representative n-shell index 'nrepa' : n value for representative n-shell array of dim : representative n-shell index 'iprti' : initial parent index from block header array of dim : initial parent index number 'rrec_res' : lvl/trm/cfg resol. rrec. coeffts.(cm3 s-1) array of dim : level index : initial parent index : temperature index 'lrrec_res' : 1 (true) => rrec. present for lvl/trm/cfg index 0 (false) => rrec. not present for lvl/trm/cfg index array of dim : level index : initial parent index 'iprtf' : final parent index from block header array of dim : initial parent index number : final parent index number 'nsysf' : no. of spin systems built on final parent defaults to 1 for /ic/ca/ array of dim : initial parent index number : final parent index number 'isys' : n-shell spin system index for final parent defaults to 1 for /ic/ca/ array of dim : initial parent index number : final parent index number : spin system index number 'ispsys' : n-shell spin system for final parent applicable to /ls/ only array of dim : initial parent index number : final parent index number : spin system index number 'cspsys' : characterising string for final parent system - universal for /ls/ic/ca/ array of dim : initial parent index number : final parent index number : spin system index number 'rrec_nl' : nl-shell rrecec. coeffts.(cm3 s-1) array of dim : repr. nl-shell index : initial parent index : final parent index : spin system index : temperature index 'lrrec_nl' : 1 (true) => rrec. present for repr. nl-shell 0 (false) => rrec. not present for nl-shell array of dim : repr. nl-shell index : initial parent index : final parent index : spin system index 'rrec_n' : n-shell rrecec. coeffts.(cm3 s-1) array of dim : repr. n-shell index : initial parent index : final parent index : spin system index : temperature index 'lrrec_n' : 1 (true) => rrec. present for repr. n-shell 0 (false) => rrec. not present for n-shell array of dim : repr. n-shell index : initial parent index : final parent index : spin system index 'rrec_sum' : sum of n-shell rrecec. coeffts.(cm3 s-1) array of dim : initial parent index : final parent index : spin system index : temperature index 'lrrec_sum' : 1 (true) => rrec. sum present 0 (false) => rrec. sum not present array of dim : initial parent index : final parent index : spin system index 'rrec_tot' : total rrec coefficients (cm3 s-1) tabulated in dataset array of dim : initial parent index : electron temperature index 'lrrec_tot' : 1 (true) => rrec. total present in dataset 0 (false) => rrec. total not present array of dim : initial parent index 'nte' : no. of electron temperatures for itype=3 'tea' : electron temperatures (K) for itype=3 array of dim : electron temperature index
Notes
Calls a fortran based shared object file - not pure python.
References
ADAS manual description of adf48: http://www.adas.ac.uk/man/appxa-48.pdf
Version History
-
Martin O'Mullane, 28-07-2021
- First version
-
Martin O'Mullane, 23-05-2022
- Incorrect adf48 file given in the example.
- Extend ndprt to 50.
-
Martin O'Mullane, 04-04-2024
- Simplify conversion of integer arrays to strings for cstrga, cstrpa and cspsys.
Example
Simplest entry is total RR rate for ground metastable.
>>> import adas as adas >>> file='/home/adas/adas/adf48/nrb05#ne/nrb05#ne_ar8ic.dat' >>> fulldata = adas.xxdata_48(file) >>> fulldata['tea'] array([6.40e+02, 1.28e+03, 3.20e+03, 6.40e+03, 1.28e+04, 3.20e+04, 6.40e+04, 1.28e+05, 3.20e+05, 6.40e+05, 1.28e+06, 3.20e+06, 6.40e+06, 1.28e+07, 3.20e+07, 6.40e+07, 1.28e+08, 3.20e+08, 6.40e+08]) >>> fulldata['rrec_tot'][0,:] array([2.21e-10, 1.46e-10, 8.20e-11, 5.31e-11, 3.27e-11, 1.71e-11, 1.04e-11, 6.22e-12, 3.08e-12, 1.78e-12, 1.02e-12, 4.81e-13, 2.66e-13, 1.43e-13, 5.87e-14, 2.84e-14, 1.32e-14, 4.46e-15, 1.88e-15])