Function adas.xxdata_24

def xxdata_24(file=None)

Reads an adf24 charge exchange cross section (CXS) file and returns all of its contents in a dictionary.

Parameters

file : str
full name of ADAS adf24 file

Returns

fulldata : dict
contents of the adf24 file
    'file'    :  adf24 filename
    'esym'    :  element symbol
    'iz0'     :  nuclear charge
    'iz'      :  recombined ion charge
    'iz1'     :  recombining ion charge
    'nbsel'   :  number of blocks
    'isela'   :  data-set data-block entry indices
                   dimension : blocks
    'cdonor'  :  donor name
                   dimension : blocks
    'crecvr'  :  receiver name
                   dimension : blocks
    'cfstat'  :  final state
                   dimension : blocks
    'ctype'   :  type of cross section
                   dimension : blocks
    'alph0'   :  low energy extrapolation parameter
                   dimension : blocks
    'neng'    :  number of energies
                   dimension : blocks
    'eea'     :  energies (eV/amu)
                   dimension : blocks
    'scx'     :  CX cross section (cm2)
                     dimension : energy
                     dimension : blocks

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, 03-01-2020

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

    • Increase nedim to 35 for larger adf24 datasets.

Example

Comments in the adf24 file show that entry 6 is the cross section for of H0 + N5+(4p).

>>> import adas as adas
>>> file='/home/adas/adas/adf24/scx#h0/scx#h0_liu12#n5.dat'
>>> fulldata = adas.xxdata_24(file)
>>> fulldata['scx'][0:fulldata['neng'][5], 5]
array([5.162e-16, 5.399e-16, 5.656e-16, 5.633e-16, 5.264e-16, 5.081e-16,
       4.720e-16, 4.103e-16, 3.659e-16, 3.369e-16, 3.028e-16, 2.553e-16,
       2.013e-16, 1.673e-16, 1.496e-16, 1.261e-16, 9.618e-17, 6.653e-17,
       4.299e-17, 2.482e-17, 1.408e-17, 8.482e-18, 5.229e-18, 3.139e-18])