Function adas.read_adf24
def read_adf24(file=None, block=1, energy=[0.0], return_info=False)-
Interpolate/extrapolate charge exchange cross section data from adf24 files.
Parameters
file:str- full names of ADAS adf24 file
block:int- selected block
energy:float, array- energies requested (eV/amu)
return_info:bool- If True also return a dictionary of information on the peocess. The default is False.
Returns
sigma:float, array- cross section (cm**2).
info:dict- information from header line of the selected block in adf24 file
'donor' : donor species 'receiver' : receiver species
Notes
Calls a fortran based shared object file - not pure python.
References
ADAS manual description of adf24: http://www.adas.ac.uk/man/appxa-24.pdf
Version History
-
Martin O'Mullane, 11-05-2020
- First version
-
Martin O'Mullane, 24-03-2023
- Make returning the info dictionary optional.
Examples
H+0(gnd) + N5+(4p)
>>> import numpy as np >>> import adas as adas >>> file='/home/adas/adas/adf24/scx#h0/scx#h0_liu12#n5.dat' >>> energy=np.geomspace(1e3, 100.0e3, 4) >>> sigma = adas.read_adf24(file=file,energy=energy,block=6) >>> sigma array([5.68759619e-16, 3.47913358e-16, 1.38480592e-16, 1.12036548e-17]) >>> sigma, info = adas.read_adf24(file=file,energy=energy,block=6, return_info=True) >>> info {'donor': 'H + 0 (1)', 'receiver': 'N + 5 (1)'}