Function adas.xxdata_15
def xxdata_15(file=None)
-
Reads an adf15 photon emissivity coefficients (PEC) file and returns all of its contents in a dictionary.
Parameters
file
:str
- full name of ADAS adf15 file
Returns
fulldata
:dict
- contents of the adf15 file
'a15file' : adf15 filename 'a04file' : adf04 file name used to calculate adf15 data if available 'a18file' : adf18 file name used to calculate adf15 data if projection was used. 'esym' : emitting ion - element symbol (string) 'iz0' : emitting ion - nuclear charge 'iz' : emitting ion - charge (generalised to superstage label) 'iz1' : emitting ion - charge + 1 (generalised to superstage index= is + 1) '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 'icnctv' : connection vector of number of partitions of each superstage in resolved case including the bare nucleus 1st dim: connection vector index 'cptn' : text lines in partition block 1st dim: text line index 'lres' : True => partial file : False => not partial file 'lptn' : True => partition block present : False => partition block not present 'lsup' : True => ss use of filmem field : False => old use of filmem field 'cwavel' : wavelength string (angstroms) 1st dim: data-block index 'ctype' : data type string 1st dim: data-block index 'cindm' : metastable index string 1st dim: data-block index 'wavel' : wavelength (angstroms) 1st dimension: data-block index 'isppr' : parent index for each line block 1st dim: index of block in adf15 file 'ispbr' : base index for each line block 1st dim: index of block in adf15 file 'isstgr' : s1 for each resolved data block 1st dim: index of block in adf15 file 'iszr' : ion charge relating to each line 1st dim: index of block in adf15 file 'nte' : number of electron temperatures dimension: data-block index 'ndens' : number of electron densities 1st dim: data-block index 'te' : electron temperatures (units: ev) 1st dim: electron temperature index 2nd dim: data-block index 'dens' : electron densities (units: cm-3) 1st dim: electron density index 2nd dim: data-block index 'pec' : photon emissivity coeffts 1st dim: electron temperature index 2nd dim: electron density index 3rd dim: data-block index 'pec_max' : photon emissivity coefft. maximum as a function of Te at first Ne value 1st dim: data-block index 'tran_index' : transition index within adf04 file 'power_rank' : the rank by its contribution to the total power
Notes
As different dimensions per block are possible, the multi-dimension arrays use the max value for pixels, number of temperatures and number of densities.
Calls a fortran based shared object file - not pure python.
References
ADAS manual description of adf15: http://www.adas.ac.uk/man/appxa-15.pdf
Version History
-
Martin O'Mullane, 22-08-2018
- First version
-
Martin O'Mullane, 27-09-2018
- Add adf18 expansion file name to fulldata.
- Document all entries in fulldata.
-
Martin O'Mullane, 25-10-2019
- Set a default of None for adf04 and adf18 files.
Example
>>> import adas as adas >>> file = '/home/adas/adas/adf15/pec96#li/pec96#li_pju#li1.dat' >>> fulldata = adas.xxdata_15(file) >>> fulldata.keys() dict_keys(['a15file', 'a04file', 'a18file', 'esym', 'iz0', 'iz', 'iz1', 'nptn', 'iptna', 'nptnc', 'iptnca', 'iptnla', 'icnctv', 'ndens', 'nte', 'dens', 'te', 'ctype', 'cindm', 'cptn', 'wave', 'isppr', 'ispbr', 'isstgr', 'iszr', 'lres', 'lptn', 'lsup', 'pec', 'pec_max', 'tran_index', 'power_rank']) >>> fulldata['pec_max'][0:5] array([2.04e-09, 2.22e-15, 3.95e-10, 3.31e-15, 1.67e-10])