Function adas.read_adf02

def read_adf02(file=None, block=1, energy=[0.0], return_info=False)

Interpolate/extrapolate cross section data, arising from by ion impact, from adf02 files.

Parameters

file : str
full name of ADAS adf02 file
block : int
selected block
energy : float, array
energies requested (eV)
return_info : bool
If True also return a dictionary of information on the peocess. The default is False.

Returns

sigma : float, array
cross sections (cm2)
info : dict (optional)
information from header line of the selected block in adf02 file
'primary'    : primary species
'secondary'  : secondary species
'type'       : type of process
'mass_p'     : primary species atomic mass number
'mass_s'     : secondary species atomic mass number
'alpha'      : high energy extrapolation parmameter
'ethresh'    : energy threshold (eV)

Notes

Calls a fortran based shared object file - not pure python.

References

ADAS manual description of adf02: http://www.adas.ac.uk/man/appxa-02.pdf

Version History

  • Martin O'Mullane, 10-02-2019

    • First version
  • Martin O'Mullane, 24-03-2023

    • Make returning the info dictionary optional.

Examples

>>> import adas as adas
>>> file = '/home/adas/adas/adf02/sia#h/sia#h_j99#h.dat'
>>> coeff = adas.read_adf02(file=file, block=3, energy=[1200, 2500.0])
>>> coeff
array([8.32419437e-16, 1.29861853e-15])
>>> coeff, info = adas.read_adf02(file=file, block=3, energy=[1200, 2500.0], return_info=True)
>>> coeff
array([8.32419437e-16, 1.29861853e-15])
>>> info
{'primary': 'H + 0',
 'secondary': 'LI+ 3',
 'type': 'CX',
 'mass_p': 1.0,
 'mass_s': 7.0,
 'alpha': 4.594,
 'ethresh': 0.0}