Function adas.xxdtes

def xxdtes(config)

Attempts to determine whether a configuration string is in standard or Eissner form.

Parameters

config : str
configuration string in Eissner or ADAS standard form.

Returns

is_eissner : bool
True if config is in Eissner format.
is_standard : bool
True if config is in standard format.
is_bundle : bool
True if config is in bundle format (a '*' is found).
is_parent : bool
True if config is in parent format (a '[…]' is found).
info : dict
extra information about the configuration
'cfg_top' : leading part of config. string in Eissner
            format (no leading blank, trailing blanks)
'cfg_tail': trailing part of config. string in Eissner
            format (no leading blank, trailing blanks)
'nvlce'   : outer electron n-shell if recognisable
             -1 otherwise
'lvlce'   : outer electron l-shell if recognisable
             -1 otherwise

Notes

The maximum length of the configuration string is 98 characters.

Not pure python - calls a fortran shared object.

References

Eissner notation is a compact representation of the configuration and the appendix in the documentation of adas701 gives details: http://www.adas.ac.uk/man/chap7-01.pdf

Version History

  • Martin O'Mullane, 06-07-2018

    • First version
  • Martin O'Mullane, 10-07-2018

    • Set the return values to boolean rather than rely on interpreting the int value returned from fortran.

Example

>>> import adas as adas
>>> is_eissner,is_stan,_,_,_ = adas.xxdtes('1s2 2p2')
>>> print(is_eissner,is_stan)
False True
>>> is_eissner,is_stan,_,_,_ = adas.xxdtes('22533514')
>>> print(is_eissner,is_stan)
True False