Function adas.xxcftr

def xxcftr(config, transform=1)

Converts a configuration character string, such as occurs in a specific ion file level list, between Eissner and standard forms.

Parameters

config : str
configuration string in Eissner or ADAS standard form.
transform : int
selection flag to determine type of conversion
        1 => standard form in, standard form out
        2 => standard form in, Eissner  form out
        3 => Eissner  form in, standard form out
        4 => Eissner  form in, Eissner  form out

Returns

str
configuration in requested form

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, 03-06-2020

    • Remove trailing blanks from returned configuration.
    • Increase maximum configuration length to 98.

Example

>>> import adas as adas
>>> adas.xxcftr('1s2 2s2 2p4', transform=2)
'521522543'
>>> adas.xxcftr('43', transform=3)
'2p4'
>>> adas.xxcftr('64A52G', transform=3)
'4fE 6s2'