Function adas.xxdata_11

def xxdata_11(file=None, adf11type='xxx')

Reads an adf11 iso-nuclear master file and returns all of its contents in a dictionary.

Parameters

file : str
full name of adf11 file.
adf11type : str
the kind of adf11 file, choose one of:
acd : recombination coefficients
scd : ionisation coefficients
ccd : CX recombination coefficients
prb : recombination/bremsstrahlung power coefficients
prc : CX power coefficients
qcd : base metastable coupling coefficients
xcd : parent metastable coupling coefficients
plt : low level line power coefficients
pls : representative line power coefficient
zcd : effective charge
ycd : effective squared charge
ecd : effective ionisation potential

Returns

fulldata : dict
contents of the adf11 file
    'iz0'       : nuclear charge
    'class'     : One of 'acd','scd','ccd','prb','prc',
                         'qcd','xcd','plt','pls','zcd',
                         'ycd','ecd'
    'iclass'    : 1..12 corresponding to above list.
    'is1min'    : minimum ion charge + 1
                  (generalised to connection vector index)
    'is1max'    : maximum ion charge + 1
                  (note excludes the bare nucleus)
                  (generalised to connection vector index
                   and excludes last one which always remains
                   the bare nucleus)
    'nptnl'     : number of partition levels in block
    'nptn'      : number of partitions in partition level
                  1st dim: partition level
    'nptnc'     : number of components in partition
                  1st dim: partition level
                  2nd dim: member partition in partition level
    'iptnla'    : partition level label (0=resolved root,1=
                                           unresolved root)
                  1st dim: partition level index
    'iptna'     : partition member label (labelling starts at 0)
                  1st dim: partition level index
                  2nd dim: member partition index in partition
                  level
    'iptnca'    : component label (labelling starts at 0)
                  1st dim: partition level index
                  2nd dim: member partition index in partition
                  level
                  3rd dim: component index of member partition
    'ncnct'     : number of elements in connection vector
    'icnctv'    : connection vector of number of partitions
                  of each superstage in resolved case
                  including the bare nucleus
                  1st dim: connection vector index
    'iblmx'     : number of (sstage, parent, base)
                  blocks in isonuclear master file
    'ismax'     : number of charge states
                  in isonuclear master file
                  (generalises to number of elements in
                   connection vector)
    'dnr_elem'  : donor element name (for ccd and prc)
    'dnr_ams'   : donor element mass (for ccd and prc)
    'isppr'     : 1st (parent) index for each partition block
                  1st dim: index of (sstage, parent, base)
                           block in isonuclear master file
    'ispbr'     : 2nd (base) index for each partition block
                  1st dim: index of (sstage, parent, base)
                           block in isonuclear master file
    'isstgr'    : s1 for each resolved data block
                  (generalises to connection vector index)
                  1st dim: index of (sstage, parent, base)
                           block in isonuclear master file
    'idmax'     : number of density values in isonuclear master file
    'itmax'     : number of temperature  values in isonuclear master file
    'ddens'     : log10(electron density(cm-3)) from adf11
    'dtev'      : log10(electron temperature (eV) from adf11
    'drcof'     : if(iclass <=9):
                    log10(coll.-rad. coefft.) from isonuclear master file
                  if(iclass >=10):
                    coll.-rad. coefft. from isonuclear master file
                  1st dim: index of (sstage, parent, base)
                            block in isonuclear master file
                  2nd dim: electron temperature index
                  3rd dim: electron density index
    'lres'      : True  => partial file
                  False => not partial file
    'lstan'     : True  => standard file
                  False => not standard file
    'lptn'      : True  => partition block present
                  False => partition block not present

Notes

Calls a fortran based shared object file - not pure python.

The 'pls' adf11 file is deprecated and is not present for many of the later calculations.

The temperature, density and most coefficients are stored as log10 values in the file and are returned as such in the dictionary.

References

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

Version History

  • Martin O'Mullane, 21-10-2013

    • First version
  • Martin O'Mullane, 25-10-2019

    • Arrays in fulldata were too short by one element.
  • Martin O'Mullane, 15-11-2019

    • Ensure that boolean entries in fulldata are cast to bool after return from call to fortran code.
  • Martin O'Mullane, 19-04-2021

    • Increase isdimd to accommodate ic-resolved Fe.

Example

>>> import adas as adas
>>> file='/home/adas/adas/adf11/acd96/acd96_c.dat'
>>> fulldata = adas.xxdata_11(file, adf11type='acd')
>>> 10.0**fulldata['dtev'][0:fulldata['itmax']:5]
array([2.00092127e-01, 1.50068658e+00, 1.00046062e+01, 7.00325597e+01,
       5.00230307e+02, 3.00137320e+03])