Function adas.xxcomments
def xxcomments(file=None)
-
Returns the comments in an adf file as a list of strings.
Parameters
file
:str
- name of file to be opened.
Returns
lines
:list, str
- Comments in file.
Notes
Pure python code. Comments are identified by a leading 'C' or 'c'. Files shorter than 3 lines are ignored. The first line of some adf files for carbon ions (eg, adf15) can start with 'C' as the element identifier so the first line is ignored.
Version History
- Martin O'Mullane, 15-12-2021
- First version
Example
Show the comments in the C2+ PEC file.
>>> import adas as adas >>> adas.xxcomments('/home/adas/adas/adf15/pec96#c/pec96#c_vsu#c2.dat') ['C-----------------------------------------------------------------------', 'C', 'C PHOTON EMISSIVITY COEFFICIENTS:', 'C', 'C ', 'C INFORMATION', 'C -----------',
etc.