Function adas.xxdata_09

def xxdata_09(file=None)

Reads all variants of the adf09 dielectronic recombination rate files and returns all of its contents in a dictionary.

Parameters

file : str
full name of ADAS adf09 file

Returns

fulldata : dict
contents of the adf09 file
    'iz'        :  recombined ion charge
    'iz0'       :  nuclear charge
    'iz1'       :  recombining ion charge
    'sym'       :  recombined ion seq
    'ctype'     :  resolution type (ls/ic/ca)
    'iform'     :  data set organisational form
                     1 : LS 1993 Badnell data form
                     2 : LS 2000 Badnell data form
                     3 : IC 2000 Badnell data form
                     4 : CA 2000 Badnell data form
                     5 : hybrid LS 2015 Badnell data form
                     6 : hybrid IC 2015 Badnell data form
                     7 : hybrid CA 2015 Badnell data form
                     8 : unassigned
                     9 : LS 2016 ADAS standard data form
                    10 : IC 2016 ADAS standard data form
                    11 : CA 2016 ADAS standard data form
    'itype'     :  data type
                     3 : Maxwell average rates
                     5 : Cross sections
    'nprnt'     :  total number of parents
    'nprnti'    :  number of parents which are initial parents
    'nprntf'    :  number of parents which are final parents
    'bwnp'      :  binding wave no. of ground parent (cm-1)
    'ipa'       :  parent energy level index number
                      array of : parent lvl/trm/cfg index
    'cstrpa'    :  nomencl./config. for parent level 'ipa()'
                      array of dim : parent lvl/trm/cfg index
    'ispa'      :  multiplicity for parent level 'ipa()'
                   note: (ispa-1)/2 = quantum number (sp)
                      array of dim : parent lvl/trm/cfg index
    'ilpa'      :  quantum number (lp) for parent level 'ipa()'
                      array of dim : parent lvl/trm/cfg index
    'xjpa'      :  quantum number (jp) for parent level 'ipa()'
                   note: (2*xjpa)+1 = statistical weight
                      array of dim : parent lvl/trm/cfg index
    'wpa'       :  energy relative to parent level 1 (cm-1)
                   for parent level 'ipa()'
                      array of dim : parent lvl/trm/cfg index
    'nlvl'      :  number of energy levels (lvl/trm/cfg) of
                   recombined ion - replaced ncfg for hybrid forms
    'bwnr'      :  ionisation potential (cm-1) of lowest level
                   of recombined ion
    'ia'        :  recombined ion energy level index number
                      array of dim : lvl/trm/cfg index
    'ip'        :  associated parent of recombined level
                      array of dim : lvl/trm/cfg index
    'cstrga'    :  nomencl./config. for recombined ion level 'ia()'
                      array of dim : lvl/trm/cfg index
    'isa'       :  multiplicity for recombined level 'ia()'
                   note: (isa-1)/2 = quantum number (s)
                      array of dim : lvl/trm/cfg index
    'ila'       :  quantum number (l) for recombined level 'ia()'
                      array of dim : lvl/trm/cfg index
    'xja'       :  quantum number (j) for recombined level 'ia()'
                   note: (2*xja)+1 = statistical weight
                      array of dim : lvl/trm/cfg index
    'wa'        :  energy relative to recombined level 1 (cm-1)
                   for recombined level 'ia()'
                      array of dim : lvl/trm/cfg index
    'auga_res'  :  specific auger rates for resolved levels
                      array of dim : lvl/trm/cfg index
                                   : parent pair index
    'lauga_res' :  1 (true)  => auger rate present for lvl/trm/cfg
                   0 (false) => auger rate not present
                      array of dim : lvl/trm/cfg index
                                   : parent pair index
    'nlrep'     :  number of representative nl-shells
    'iaprs_nl'  :  number of nl-shell auger rate initial
                   and final parent pairs
    'caprs_nl'  :  nl-shell auger rate parent pair string
                      array of dim : parent pair index
    'ipaug_nl'  :  initial and final parents index
                   for nl-shell auger breakups
                      array of dim : parent pair index
                                   : 2 (for initial and final parent)
    'irepa_nl'  :  representative nl-shell index number
                      array of dim : representative nl-shell index
    'nlrepa_n'  :  n value for representative nl-shell
                      array of dim : representative nl-shell index
    'nlrepa_l'  :  l value for representative nl-shell
                      array of dim : representative nl-shell index
    'auga_nl'   :  auger rates (sec-1)
                      array of dim : representative nl-shell index
                                   : parent pair index
    'lauga_nl'  :  1 (true)  => auger rate present for nl-shell
                   0 (false) => auger rate not present
                      array of dim : representative n-shell index
                                   : parent pair index
    'nrep'      :  number of representative n-shells
    'iaprs_n'   :  number of n-shell auger rate initial
                   and final parent pairs
    'caprs_n'   :  auger rate parent pair string
                      array of dim : parent pair index
    'ipaug_n'   :  initial and final parents index
                   for n-shell auger breakups
                      array of dim : parent pair index
                                   : 2 (for initial and final parent)
    'irepa_n'   :  representative n-shell index number
                      array of dim : representative n-shell index
    'nrepa'     :  n value for representative n-shell
                      array of dim : representative n-shell index
    'auga_n'    :  auger rates (sec-1)
                      array of dim : representative n-shell index
                                   : parent pair index
    'lauga_n'   :  1 (true)  => auger rate present for n-shell
                   0 (false) => auger rate not present
                      array of dim : representative n-shell index
                                   : parent pair index
    'iprti'     :  initial parent index from block header
                       array of dim : initial parent index number
    'diel_res'  :  lvl/trm/cfg resol. diel. coeffts.(cm3 s-1)
                      array of dim : level index
                                   : initial parent index
                                   : temperature index
    'ldiel_res' :  1 (true)  => diel. present for lvl/trm/cfg index
                   0 (false) => diel. not present for
                                      lvl/trm/cfg index
                      array of dim : level index
                                   : initial parent index
    'iprtf'     :  final parent index from block header
                      array of dim : initial parent index number
                                   : final parent index number
    'nsysf'     :  no. of spin systems built on final parent
                   defaults to 1 for /ic/ca/
                      array of dim : initial parent index number
                                   : final parent index number
    'isys'      :  n-shell spin system index for final parent
                   defaults to 1 for /ic/ca/
                      array of dim : initial parent index number
                                   : final parent index number
                                   : spin system index number
    'ispsys'    :  n-shell spin system for final parent
                   applicable to /ls/ only
                      array of dim : initial parent index number
                                   : final parent index number
                                   : spin system index number
    'cspsys'    :  characterising string for final parent
                   system - universal for /ls/ic/ca/
                      array of dim : initial parent index number
                                   : final parent index number
                                   : spin system index number
    'diel_nl'   :  nl-shell dielec. coeffts.(cm3 s-1)
                      array of dim : repr. nl-shell index
                                   : initial parent index
                                   : final parent index
                                   : spin system index
                                   : temperature index
    'ldiel_nl'  :  1 (true)  => diel. present for repr. nl-shell
                   0 (false) => diel. not present for  nl-shell
                      array of dim : repr. nl-shell index
                                   : initial parent index
                                   : final parent index
                                   : spin system index
    'diel_n'    :  n-shell dielec. coeffts.(cm3 s-1)
                      array of dim : repr. n-shell index
                                   : initial parent index
                                   : final parent index
                                   : spin system index
                                   : temperature index
    'ldiel_n'   :  1 (true)  => diel. present for repr. n-shell
                   0 (false) => diel. not present for  n-shell
                      array of dim : repr. n-shell index
                                   : initial parent index
                                   : final parent index
                                   : spin system index
    'diel_sum'  :  sum of n-shell dielec. coeffts.(cm3 s-1)
                      array of dim : initial parent index
                                   : final parent index
                                   : spin system index
                                   : temperature index
    'ldiel_sum' :  1 (true)  => diel. sum present
                   0 (false) => diel. sum not present
                      array of dim : initial parent index
                                   : final parent index
                                   : spin system index
    'diel_tot'  :  total diel coefficients (cm3 s-1) tabulated
                   in dataset
                      array of dim : initial parent index
                                   : electron temperature index
    'ldiel_tot' :  1 (true)  => diel. total present in dataset
                   0 (false) => diel. total not present
                      array of dim : initial parent index
    'nte'       :  no. of electron temperatures for itype=3
    'tea'       :  electron temperatures (K) for itype=3
                           array of dim : electron temperature index
    'nenergy'   :  no. of energy bins for itype=5
    'elow'      :  lower energy of bin (Rydberg) for itype=5
                           array of dim : energy bin index
    'ehigh'     :  upper energy of bin (Rydberg) for itype=5
                           array of dim : energy bin index

    Additional entries for hybrid forms of adf09 files:

    'ncfg'      : number of averaged energy levels (lvl/trm/cfg)
                  of recombined ion for hybrid adf09
    'iscp'      : parent of IP straddling nl-level
                      array of dim : cfg index
    'iscn'      : n quantum number of IP straddling  nl-level
                      array of dim : cfg index
    'iscl'      : l quantum number of IP straddling  nl-level
                      array of dim : cfg index
    'fsc'       : fractional statistical weight of the levels
                 of a config which lie below and above the IP
                      array of dim : index
                                  : 1 -> below, 2-> above
    'wsc'       : the statistical average energies of the levels
                 of a config which lie below and above the IP
                      array of dim : index
                                   : 2 (1 => below, 2=> above)
    'ipca'      : parent config averaged index number          
                       array of dim : parent cfg index                    
    'cstrpca'   : nomencl./config. for parent config 'ipca()'
                       array of dim : parent cfg index                    
    'xjpca'     : quantum number (jp) for parent level 'ipca()'
                  note: (2*xjpa)+1 = statistical weight        
                       array of dim : parent cfg index                    
    'wpca'      : energy relative to parent level 1 (cm-1)     
                  for parent level 'ipca()'     
                       array of dim : parent cfg index

Notes

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

References

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

Version History

  • Martin O'Mullane, 10-07-2019

    • First version
  • Martin O'Mullane, 13-05-2022

    • elow/ehigh stuff
    • increase ndprt to account for W Project hybrid data.

Example

Simplest entry is total DR rate for ground metastable.

>>> import adas as adas
>>> file='/home/adas/adas/adf09/nrb00#ne/nrb00#ne_ar8ic23.dat'
>>> fulldata = adas.xxdata_09(file)
>>> fulldata['tea']
array([6.40e+02, 1.28e+03, 3.20e+03, 6.40e+03, 1.28e+04, 3.20e+04,
       6.40e+04, 1.28e+05, 3.20e+05, 6.40e+05, 1.28e+06, 3.20e+06,
       6.40e+06, 1.28e+07, 3.20e+07, 6.40e+07, 1.28e+08, 3.20e+08,
       6.40e+08])
>>> fulldata['diel_tot'][0,:]
array([0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 1.50e-28,
       1.81e-20, 2.46e-16, 2.87e-13, 4.06e-12, 1.18e-11, 1.16e-11,
       6.48e-12, 2.89e-12, 8.43e-13, 3.12e-13, 1.13e-13, 2.90e-14,
       1.03e-14])