Function adas.write_adf35

def write_adf35(file=None, fulldata=None, comments=None, fmt='{:10.3f}', ncol=8)

Write an adf35 energy filter from a user supplied fulldata dictionary.

Parameters

file : str
full name of adf35 file.
fulldata : dict
contents of the adf35 file
    'edge'    :  energies of possible discontinuities (eV)
                    array(nedge)
    'energy'  :  energy points of tabulation (eV)
                    array(nenergy)
    'trans'   :  log10 of the transmission fraction
                    array(nenergy)
comments : list
comments for the end of the file as a list of strings.
fmt : str
format for outputting the numerical data, defaults to floating point with 3 decimal places, '{:10.3f}'.
ncol : int
number of columns for numerical data

Notes

The 'edge' array can be empty if there are no discontinuous. 0.0 or None are acceptable values in this case.

If increase precision is needed, adjust the format and/or the number of columns.

Version History

  • Martin O'Mullane, 10-08-2023
    • First version

Example

Simple box filter.

>>> import adas as adas
>>> import numpy as np
>>> energy=[0.1, 100, 200, 300]
>>> trans=np.log10(np.asarray([1.0e-36, 1.0, 1.0, 1.0e-36]))
>>> fulldata={'edge' : 0.0, 'energy' : energy, 'trans' : trans}
>>> my_file='/tmp/test_write_adf35.dat'
>>> adas.write_adf35(file=my_file, fulldata=fulldata,
... comments=['C  Testing write_adf35', 'C  By me, today'])