Function adas.xxdata_02

def xxdata_02(file=None)

Reads an adf02 ion impact cross section file and returns all of its contents in a dictionary.

Parameters

file : str
full name of ADAS adf02 file

Returns

fulldata : dict
contents of the adf02 file
    'filename' :  adf02 filename
    'nblock'   :  number of blocks present
    'nedim'    :  max number of collision energies allowed
    'cprimy'   :  primary species identification
                    string array(nblock)
    'csecdy'   :  secondary species identification
                    string array(nblock)
    'ctype'    :  cross-section type
                    string array(nblock)
    'ampa'     :  primary species atomic mass number
                     float array(nblock)
    'amsa'     :  secondary species atomic mass number
                     float array(nblock)
    'alpha'    :  high energy extrapolation parmameter
                     float array(nblock)
    'ethra'    :  energy threshold (eV)
                     float array(nblock)
    'iea'      :  number of collision energies in each block
                     float array(nblock)
    'teea'     :  collision energies (units: eV/amu)
                     float array(max(iea), nblock)
    'sia'      :  collision cross-section values (cm**2)
                     float array(max(iea), nblock)

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-07-2019
    • First version

Example

Comments in adf02 file show that entry 12 is the cross section for He+2 ionizing H0.

>>> import adas as adas
>>> file='/home/adas/adas/adf02/sia#h/sia#h_j99#h.dat'
>>> fulldata = adas.xxdata_02(file)
>>> fulldata['teea'][0:fulldata['iea'][11],11]
array([  1000.,   1500.,   2000.,   3000.,   5000.,   7000.,  10000.,
        15000.,  20000.,  30000.,  40000.,  50000.,  60000.,  70000.,
        80000., 100000., 150000., 200000., 300000., 500000., 700000.])
>>> fulldata['sia'][0:fulldata['iea'][11],11]
array([1.00e-20, 6.00e-20, 1.00e-19, 3.48e-19, 1.90e-18, 4.40e-18,
       1.15e-17, 3.50e-17, 7.50e-17, 2.10e-16, 3.32e-16, 4.00e-16,
       4.28e-16, 4.30e-16, 4.18e-16, 3.80e-16, 3.05e-16, 2.55e-16,
       1.88e-16, 1.28e-16, 9.80e-17])