Function adas.write_adf21
def write_adf21(file=None, fulldata=None, project=None, comments=None)
-
Write an adf21 beam stopping coefficient file from a user supplied fulldata dictionary.
Parameters
file
:str
- full name of adf21 file.
fulldata
:dict
- contents of the adf21 file
'itz' : target ion charge. 'tsym' : target ion element symbol. 'beref' : reference beam energy (eV/amu). 'tdref' : reference target density (cm-3). 'ttref' : reference target temperature (eV). 'svref' : stopping coefficient at reference beam energy, target density and temperature (cm3 s-1). 'be' : beam energies(eV/amu). 'tdens' : target densities(cm-3). 'ttemp' : target temperatures (eV). 'svt' : stopping coefficient at reference beam energy and target density (cm3 s-1) 'sved' : stopping coefficient at reference target temperature (cm3 s-1). 1st dimension : beam energy 2nd dimension : density
comments
:list
- comments for the end of the file as a list of strings.
project
:str
- project name. Default is 'Unknown'
Notes
Version History
-
Martin O'Mullane, 12-08-2020
- First version
-
Martin O'Mullane, 28-11-2021
- Adjust format statements due to change in array2strlist.
Example
Round trip of nitrogen beam stopping coefficient.
>>> import adas as adas >>> file='/home/adas/adas/adf21/bms93#h/bms93#h_n7.dat' >>> fulldata=adas.xxdata_21(file) >>> my_comments=['C Testing write_adf21', 'C By me, today'] >>> my_project='A test project' >>> my_file='/tmp/test_write_adf21.dat' >>> adas.write_adf21(file=my_file, fulldata=fulldata, ... comments=my_comments, project='my_project')