Function adas.write_adf01

def write_adf01(file=None, fulldata=None, comments=None)

Write an adf01 charge transfer cross section file from a user supplied fulldata dictionary.

Parameters

file : str
full name of adf01 file.
fulldata : dict
contents of the adf01 file
    '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)
comments : list, optional
comments for the end of the file as a list of strings.

Notes

References

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

Version History

  • Martin O'Mullane, 03-06-2021

    • First version
  • Martin O'Mullane, 28-11-2021

    • Adjust format statements due to change in array2strlist.

Example

Round trip of C6+ charge exchange file.

>>> import adas as adas
>>> file='/home/adas/adas/adf01/qcx#h0/qcx#h0_old#c6.dat'
>>> fulldata=adas.xxdata_01(file)
>>> my_comments=['C Testing write_adf01', 'C By me, today']
>>> my_file='/tmp/c6.pass'
>>> adas.write_adf01(file=my_file, fulldata=fulldata,
...                  comments=my_comments)

In the new file the scientific format is E rather than D, eg 4.71E-18 rather than 4.71D-18.