Function adas.xxdata_22
def xxdata_22(file=None)
-
Reads an adf22 beam emission (BME) or fractional population (BMP) file and returns all of its contents in a dictionary.
Parameters
file
:str
- full name of ADAS adf22 file
Returns
fulldata
:dict
- contents of the adf22 file
'file' : filename 'itz' : target ion charge. 'tsym' : target ion element symbol. 'beref' : reference beam energy (eV/amu). 'tdref' : reference target density (cm-3). 'ttref' : reference target temperature (eV). 'svref' : bme or bmp coefficient at reference beam energy, target density and temperature (cm3 s-1). 'be' : beam energies(eV/amu). 'tdens' : target densities(cm-3). 'ttemp' : target temperatures (eV). 'svt' : bme or bmp coefficient at reference beam energy and target density (cm3 s-1) 'sved' : bme or bmp coefficient at reference target temperature (cm3 s-1). 1st dimension : beam energy 2nd dimension : density
Notes
Calls a fortran based shared object file - not pure python.
Because the adf22 files have the same format as the adf21 beam stopping coefficients the xxdata_21 shared object is used to read the data.
References
ADAS manual description of adf22: http://www.adas.ac.uk/man/appxa-22.pdf
Version History
- Martin O'Mullane, 17-01-2020
- First version
Example
Fractional population of n=3 level in the beam due to collisions with C6+ plasma impurity.
>>> import adas as adas >>> file='/home/adas/adas/adf22/bmp97#h/bmp97#h_3_c6.dat' >>> fulldata = adas.xxdata_22(file) >>> fulldata['be'] array([ 5000., 10000., 15000., 20000., 25000., 30000., 35000., 40000., 45000., 50000., 55000., 60000., 65000., 70000., 75000., 80000., 85000., 90000., 95000., 100000., 105000., 110000., 115000., 120000., 125000.]) >>> fulldata['tdens'][8] 10000000000000.0 >>> fulldata['sved'][:, 8] array([0.0001733, 0.0001651, 0.0001826, 0.0001991, 0.0002175, 0.0002387, 0.0002644, 0.0002944, 0.0003261, 0.0003582, 0.00039 , 0.0004212, 0.0004527, 0.000485 , 0.0005179, 0.0005508, 0.0005833, 0.0006142, 0.0006428, 0.0006699, 0.0006968, 0.0007236, 0.0007505, 0.0007773, 0.000804 ])