Function adas.read_adf01
def read_adf01(file=None, energy=[0.0], n=None, l=None)
-
Interpolate/extrapolate charge exchange cross section data for total, or partial (n or nl) in adf01 files.
Parameters
file
:str
- full name of ADAS adf01 file
energy
:float, array
- energies requested (eV/amu)
n
:int
, optional- partial cross section for this n shell
l
:int
, optional- partial cross section for this nl shell. n must also be specified for this option.
Returns
sigma
:float, array
- cross sections (cm2)
Notes
Calls a fortran based shared object file - not pure python.
References
ADAS manual description of adf01: http://www.adas.ac.uk/man/appxa-01.pdf
Version History
- Martin O'Mullane, 22-04-2020
- First version
Examples
Extract the total, n=4 and 5p cross section from C6+ CX.
>>> import adas as adas >>> import numpy as np >>> file='/home/adas/adas/adf01/qcx#h0/qcx#h0_old#c6.dat' >>> energy=np.geomspace(2.0e3, 100.0e3, 4) >>> adas.read_adf01(file=file, energy=energy) array([4.80000000e-15, 4.97421191e-15, 3.31174015e-15, 7.00000000e-16]) >>> adas.read_adf01(file=file, energy=energy, n=4) array([3.86000000e-15, 3.16182359e-15, 1.37996058e-15, 1.09000000e-16]) >>> adas.read_adf01(file=file, energy=energy, n=5, l=1) array([6.90000000e-17, 1.29125485e-16, 7.06543772e-17, 6.85000000e-18])