Function adas.xxdata_01

def xxdata_01(file=None)

Reads an adf01 charge exchange cross-section (QCX) file and returns all of its contents in a dictionary.

Parameters

file : str
full name of ADAS adf01 file

Returns

fulldata : dict
contents of the adf01 file
    'filename' :  adf01 filename
    'symbr'    :  receiver ion element symbol.
    'symbd'    :  donor ion element symbol.
    'izr'      :  ion charge of receiver.
    'izd'      :  ion charge of donor.
    'indd'     :  donor state index.
    'nenrgy'   :  number of energies in file.
    'nmin'     :  lowest n-shell for which data read.
    'nmax'     :  highest n-shell for which data read.
    'lparms'   :  flag if l-splitting parameters present.
                      True  => l-splitting parameters present.
                      False => l-splitting parameters absent.
    'lsetl'    :  flag if l-resolved data present.
                      True  => l-resolved data present.
                      False => l-resolved data absent.
    'enrgya'   :  collision energies (eV/amu).
                      dimension: energy index
    'alphaa'   :  extrapolation parameter alpha.
                      dimension: energy index
    'lforma'   :  parameters for calculating l-res x-sec.
                      dimension: energy index
    'xlcuta'   :  parameters for calculating l-res x-sec.
                      dimension: energy index
    'pl2a'     :  parameters for calculating l-res x-sec.
                      dimension: energy index
    'pl3a'     :  parameters for calculating l-res x-sec.
                      dimension: energy index
    'sigta'    :  total charge exchange cross-section (cm2).
                      dimension: energy index
    'signa'    :  n-resolved charge exchange cross-sections (cm2).
                      1st dimension: energy index
                      2nd dimension: n-shell
    'sigla'    :  l-resolved charge exchange cross-sections (cm2).
                      1st dimension: energy index
                      2nd dimension: indexed by i4idfl(n,l)

Notes

The n and nl partial cross sections are returned up to the maximum n in the dataset. However the lower n is always 1, not nmin. The appropriate cross section index for partial nl cross sections can be found using the indexing function i4idfl.py.

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, 01-04-2019
    • First version

Example

Total and partial cross sections of n=8 and n=6, l=3.

>>> import adas as adas
>>> file='/home/adas/adas/adf01/qcx#h0/qcx#h0_old#c6.dat'
>>> fulldata = adas.xxdata_01(file)
>>> fulldata['sigta']
array([4.20e-15, 4.50e-15, 4.80e-15, 5.00e-15, 5.00e-15, 5.00e-15,
       4.70e-15, 4.30e-15, 3.90e-15, 3.10e-15, 2.50e-15, 2.05e-15,
       1.65e-15, 1.35e-15, 1.09e-15, 7.00e-16, 2.40e-16, 9.50e-17,
       2.30e-17, 2.70e-18, 7.05e-19])
>>> fulldata['signa'][:,7]  # index 0 => n=1
array([1.02e-18, 1.28e-18, 1.46e-18, 1.62e-18, 2.41e-18, 3.96e-18,
       6.60e-18, 1.24e-17, 2.31e-17, 5.76e-17, 1.01e-16, 1.11e-16,
       9.97e-17, 8.53e-17, 7.08e-17, 4.42e-17, 1.39e-17, 5.23e-18,
       1.11e-18, 1.02e-19, 2.22e-20])
>>> fulldata['sigla'][:,adas.i4idfl(6,3)-1]  # 0 indexing in python
array([5.38e-18, 6.78e-18, 8.35e-18, 1.00e-17, 1.27e-17, 1.41e-17,
       1.69e-17, 2.76e-17, 5.00e-17, 6.46e-17, 5.52e-17, 4.46e-17,
       3.67e-17, 2.99e-17, 2.39e-17, 1.45e-17, 5.86e-18, 2.57e-18,
       7.60e-19, 6.56e-20, 8.18e-21])