Function adas.adf11_nmeta

def adf11_nmeta(file)

Returns the number of metastables (including the fully stripped stage) from the first line in unresolved and bundled adf11 files and from the partition line(s) in a resolved adf11 file.

Parameters

file : str
full name of ADAS adf11 file

Returns

num : int
number of metastable in adf11 file.

Notes

Pure python code.

References

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

Version History

  • Martin O'Mullane, 07-11-2018

    • First version
  • Martin O'Mullane, 08-04-2019

    • Increase the number of dashes when searching for the separation line in the partition.
  • Martin O'Mullane, 10-04-2019

    • Check whether it is a bundled adf11 file.
  • Martin O'Mullane, 23-09-2019

    • Account for files where the comments start with a dashed line and not 'C. These are mostly from the 93 GCR production and v2bndl/tcmprss3 code output.

Example

For silicon (Z=14) there are 15 metastable in the unresolved data and 33 in the resolved file.

>>> import adas as adas
>>> file='/home/adas/adas/adf11/scd96/scd96_si.dat'
15
>>> file='/home/adas/adas/adf11/scd96r/scd96r_si.dat'
33