1 '''
2 module for collecting various top-level Chianti data
3 for the keyword arguments below
4 temperature = temperature in Kelvin
5 eDensity is the electron density per cubic cm
6 hDensity is the hydrogen density per cubic cm
7 pDensity is the proton density per cubic cm
8 radTemperature is the radiation temperature of central source
9 rStar is the distance of the plasma from the source in units of the sources radius
10 distance is the distance from the central source
11 '''
12 import os
13
14 import chianti.io as chio
15
16
17 xuvtop = os.environ['XUVTOP']
18
19 Defaults = chio.defaultsRead()
20 Ip = chio.ipRead()
21 MasterList = chio.masterListRead()
22 IoneqAll = chio.ioneqRead(ioneqname = Defaults['ioneqfile'])
23
24
25 ChiantiVersion = chio.versionRead()
26 keywordArgs = ['temperature','eDensity','hDensity', 'pDensity','radTemperature', 'rStar', 'distance']
27
28 AbundanceDefault = chio.abundanceRead(abundancename = Defaults['abundfile'])
29 abunddir = os.path.join(xuvtop,'abundance')
30 filelist = os.listdir(abunddir)
31
32 AbundanceList = []
33 for one in filelist:
34 fname = os.path.join(abunddir,one)
35 if os.path.isfile(fname):
36 AbundanceList.append(os.path.splitext(one)[0])
37
38
39 Abundance = {AbundanceList[0]:chio.abundanceRead(abundancename = AbundanceList[0])}
40 for one in AbundanceList[1:]:
41 Abundance[one] = chio.abundanceRead(abundancename = one)
42