Function adas.write_adf15
def write_adf15(file=None, fulldata=None, wave=None, comments=None)
-
Write an adf15 photon emissivity coefficient file from a user supplied fulldata dictionary.
Parameters
file
:str
- full name of adf15 file.
fulldata
:dict
- contents of the adf15 file
'esym' : element 'iz0' : atomic number 'iz' : ion charge 'iz1' : recombined ion charge 'ndens' : number of densities 'nte' : temperatures 'dens' : densities 'te' : temperatures 'ctype' : driving process 'cindm' : metastable 'wave' : wavelength (A) 'pec' : photon emissivity coeffs.
comments
:list
, optional- comments for the end of the file as a list of strings.
Notes
Placeholder using old-style adf15 which will be updated to match the adas208 style output.
References
ADAS manual description of adf15: http://www.adas.ac.uk/man/appxa-15.pdf
Version History
- Martin O'Mullane,
12-01-2022
- First version
Example
Round trip of Li+ file.
>>> import adas as adas >>> file='/home/adas/adas/adf15/pec96#li/pec96#li_pju#li1.dat' >>> fulldata=adas.xxdata_15(file) >>> my_comments=['C Testing write_adf15', 'C By me, today'] >>> my_file='/tmp/test_write_adf15.dat' >>> adas.write_adf15(file=my_file, fulldata=fulldata, comments=my_comments)