Function adas.xxdata_10

def xxdata_10(file=None, variant=None)

Reads all three variants of adf10 files and returns the contents in a dictionary.

Parameters

file : str
full name of the adf10 file.
variant : str (optional)
'iso' : iso-electronic collection as found in central ADAS 'p208' : version produced by adas208 'p204' : version produced by adas204

Returns

fulldata : dict
for an iso-electronic adf10 file the contents are
    'iz1'       :  ion charge
    'class'     :  type of adf10 file
    'info'      :  dictionary
                     'index_1' :  see below for different adf10 types
                     'term_1'  :  term for index_1
                     'spn_1'   :  spin for index_1
                     'nc'      :  n-shell cutoff
                     'index_2' :  see below for different adf10 types
                     'spn_2'   :  spin for index_2
                     'ssyswt'  :  spin system fractional weighting factor
    'nblock'    :  number of ion stages in file
    'te'        :  temperature (reduced units)
    'dens'      :  density (reduced units)
    'data'      :  coefficient
                     1st dim: temperature
                     2nd    : density
                     3rd    : iz1
    'dates'     :  array of production dates of blocks
    'file'      :  name of adf10 file
    'ionpot'    :  ionization potentials (eV) but
                   only for scd files

    for plt and met adf10 file data is

    'data'      :  coefficient (ergs cm3 /s)
                     1st dim: temperature
                     2nd    : density
                     3nd    : metastable
                     4th    : iz1

    'info'      :  dictionary
                     'order' : order of listing for metastables
                     'desig' : configurations of metastables
                     'index' : adf04 index referencing for metastables

   for an adas208 adf10 file the contents are

    'iz0'       :  nuclear charge
    'iz1'       :  ion charge
    'class'     :  type of adf10 file
    'nmet'      :  number of metastables for met and plt
    'name_ind1' :  names of first index
    'index_1'   :  values of first index
    'name_ind2' :  names of second index
    'index_2'   :  values of second index
    'te'        :  temperature (eV)
    'dens'      :  density (cm**-3)
    'data'      :  coefficient (W cm3)
                    1st dim: metastable or iprt/igrd pair
                    2nd    : temperature
                    3rd    : density
    'comments'  :  comments in adf10 file
    'file'      :  name of adf10 file

   for an adas204 adf10 file the contents are

    'iz0'       :  nuclear charge
    'iz1'       :  ion charge
    'class'     :  type of adf10 file
    'nprt'      :  number of parents
    'ngrd'      :  number ground states
    'iprt'      :  index of parents (array)
    'trmprt'    :  term of parents, eg '2P' (array)
    'spnprt'    :  spin of parents (array)
    'igrd'      :  index of ground states (array)
    'spngrd'    :  spin of ground states (array)
    'ssyswt'    :  spin system weight fraction (array)
    'te'        :  temperature (eV)
    'dens'      :  density (cm**-3)
    'data'      :  coefficient
                     1st dim: temperature
                     2nd    : density
                     3rd    : index
    'file'      :  name of adf10 file

Notes

This is a pure python routine.

The iso-electronic and adas208 are similar since the adas208 partial files are intended to be assembled into iso-electronic files. However the adas208 partial files contain multiple parent/level data which are separated in the iso-electronic files.

For iso-electronic files the indexing is embedded in the file name

        class    (indices 1 and 2)  units
        ----       ----     ----    -----
        acd        iprt     igrd    cm3/s
        scd        iprt     igrd    cm3/s
        ccd        iprt     igrd    cm3/s
        qcd        igrd     jgrd    cm3/s
        xcd        iprt     jprt    cm3/s
        prb        iprt             ergs/s cm3
        prc        iprt             ergs/s cm3
        plt        igrd             ergs/s cm3

For adas208 the name of the index depends on the type of adf10 file,

        class    (indices 1 and 2)  units
        ----       ----     ----    -----
        acd        iprt     igrd    cm3/s
        scd        iprt     igrd    cm3/s
        ccd        iprt     igrd    cm3/s
        qcd        igrd     jgrd    cm3/s
        xcd        iprt     jprt    cm3/s
        prb        iprt             W cm3
        prc        iprt             W cm3
        plt        igrd             W cm3
        met        igrd               -

For adas204 the useful adf10-style files are,

        class    (indices 1 and 2)  units
        ----       ----     ----    -----
        acd        iprt     igrd    cm3/s
        scd        iprt     igrd    cm3/s
        prb        iprt     igrd    W cm3
        pcasbin    iprt     igrd    W cm3

and pcasbin is not currently an iso-electronic adf10 class.

For adas204 files is not possible to determine from the file structure or contents the difference between acd and ccd files or prb and prc files so the 'class' is set as 'acd/ccd' or 'prb/prc'.

Note the different units for temperature, density and power between the variants.

Version History

  • Martin O'Mullane, 26-03-2021

    • First version
  • Martin O'Mullane, 28-03-2022

    • Add information dictionary and list of production dates to the iso-electronic variant.
    • Ad an example.

Example

Get the data for the ionization data from the He-like metastable and print the elements in the file (iz1 is the recombining stage) and the dates when each element was generated.

>>> import adas as adas
>>> file='/home/adas/adas/adf10/scd96/pj#scd96_he12.dat'
>>> fulldata=adas.xxdata_10(file)
>>> fulldata['iz1'], fulldata['dates']
(array([ 1.,  2.,  3.,  5.,  6.,  7.,  9., 13.]),
 ['01.11.99',
  '30/10/02',
  '20/02/06',
  '02.11.99',
  '03.11.99',
  '25.07.01',
  '20.12.00',
  '13/03/13'])

Note that the routine prints 'iso-electronic variant' to the screen.