You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/notes.rst
+40-35Lines changed: 40 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -5,65 +5,70 @@ Notes
5
5
Setting default values
6
6
----------------------
7
7
8
-
Several parameter values can be set to define the way ChiantiPy behaves. The following parameter values can be set in your ~username/.chianti/chiantirc file. These are:
9
-
8
+
Several parameter values can be set to define the way ChiantiPy behaves. The following parameter values can be set in your chiantirc file. A chiantirc file is available in the downloaded package but it will only be read if it is located in either ~HOME/.config (probably the best place) or ~HOME/.chianti or ~PROFILEHOME/.config or ~PROFILEHOME/.chianti. It is then possible to modifiy the file to select the default value you wish to use:
9
+
10
+
These are:
11
+
10
12
11
13
wavelength
12
-
this parameter has not been fully implemented. The default is angstrom. In the future, nanometers (nm) and kilo volts (kev) will be implemented.
14
+
15
+
The default value is angstrom. Other possible values are *nm* for nanometers, *ev* for electron volts or *kev* for kilo-electron volts. However, the continuum classes can only be used with the wavelengths in angstroms
16
+
13
17
14
18
flux
15
-
acceptable values are *energy* and *photon* and these govern emissivities and intensities. the default value is *energy*.
19
+
The default value is energy. Acceptable values are *energy* and *photon* and these govern emissivities and intensities. If set to energy, emission units are in erg.
16
20
17
21
abundfile
18
-
the name of the abundance file. Acceptable values are any of the file names in XUVTOP/abundance, such as *cosmic_1973_allen*. The default value is *sun_photospheric_1998_grevesse* which includes the abundances of Grevesse and Sauval, 1998, Space Science Reviews, 85, 161.
22
+
23
+
The name of the abundance file. Acceptable values are any of the file names in XUVTOP/abundance, such as *cosmic_1973_allen*. The default value is *sun_photospheric_2015_scott* which includes the abundances of Scott et al., 2015, A&A, 573, A25.
19
24
20
25
ioneqfile
21
-
the name of the ionization equilibrium file. Acceptable values are any of the file names in XUVTOP/ioneq such as *arnaud_raymond*, *arnaud_rothenflug*, or *chianti*. The default value is *chianti* which includes the ionization equilibrium calculations of Dere, et al., 2009, Astronomy and Astrophysics, 498, 915 and are considered to be based on the best ionization and recombination rates currently available.
26
+
the name of the ionization equilibrium file. Acceptable values are any of the file names in XUVTOP/ioneq such as *arnaud_raymond*, *arnaud_rothenflug*, or *chianti*. The default value is *chianti* which includes the ionization equilibrium calculations of K.P. Dere, G. Del Zanna, P.R. Young, E. Landi, R Sutherland, 2019, ApJ, 241, 2 and are considered to be based on the best ionization and recombination rates currently available.
22
27
23
28
24
29
25
30
Setting *minAbund* in spectrum calculations
26
31
-------------------------------------------
27
32
28
-
When calculation spectra with *spectrum* or *mspectrum*, it is often useful to set the "minAbund" keyword which governs the minimum abundance of any element included in the calculation. Below is a list of elemental abundances for the elements through zinc and the elements that will be included by several value of "minAbund".
29
-
33
+
When calculation spectra with *spectrum* or *mspectrum*, it is often useful to set the "minAbund" keyword which governs the minimum abundance of any element included in the calculation. Below is a list of elemental abundances for the elements through zinc and the elements that will be included by several value of "minAbund". These are for photospheric abundances, some of which may have changed since this table was made.
34
+
30
35
======= ========= ======== ======= ======
31
36
32
-
37
+
33
38
Element Abundance minAbund
34
39
------- --------- -------------------------
35
40
.. .. 1.e-6 1.e-5 1.e-4
36
41
======= ========= ======== ======= ======
37
-
H 1.00e+00 + + +
38
-
He 8.51e-02 + + +
42
+
H 1.00e+00 + + +
43
+
He 8.51e-02 + + +
39
44
Li 1.26e-11
40
45
Be 2.51e-11
41
46
B 3.55e-10
42
-
C 3.31e-04 + + +
47
+
C 3.31e-04 + + +
43
48
N 8.32e-05 + +
44
-
O 6.76e-04 + + +
45
-
F 3.63e-08
46
-
Ne 1.20e-04 + + +
47
-
Na 2.14e-06 +
48
-
Mg 3.80e-05 + +
49
-
Al 2.95e-06 +
50
-
Si 3.55e-05 + +
51
-
P 2.82e-07
52
-
S 2.14e-05 + +
53
-
Cl 3.16e-07
54
-
Ar 2.51e-06 +
55
-
K 1.32e-07
56
-
Ca 2.29e-06 +
57
-
Sc 1.48e-09
58
-
Ti 1.05e-07
59
-
V 1.00e-08
60
-
Cr 4.68e-07
61
-
Mn 2.45e-07
62
-
Fe 3.16e-05 + +
63
-
Co 8.32e-08
64
-
Ni 1.78e-06 +
65
-
Cu 1.62e-08
66
-
Zn 3.98e-08
49
+
O 6.76e-04 + + +
50
+
F 3.63e-08
51
+
Ne 1.20e-04 + + +
52
+
Na 2.14e-06 +
53
+
Mg 3.80e-05 + +
54
+
Al 2.95e-06 +
55
+
Si 3.55e-05 + +
56
+
P 2.82e-07
57
+
S 2.14e-05 + +
58
+
Cl 3.16e-07
59
+
Ar 2.51e-06 +
60
+
K 1.32e-07
61
+
Ca 2.29e-06 +
62
+
Sc 1.48e-09
63
+
Ti 1.05e-07
64
+
V 1.00e-08
65
+
Cr 4.68e-07
66
+
Mn 2.45e-07
67
+
Fe 3.16e-05 + +
68
+
Co 8.32e-08
69
+
Ni 1.78e-06 +
70
+
Cu 1.62e-08
71
+
Zn 3.98e-08
67
72
======= ========= ======== ======= ======
68
73
69
74
It shoud be noted that CHIANTI does not include a complete set of data for every ion of every element in this list.
Copy file name to clipboardExpand all lines: docs/source/quick_start.rst
+97-7Lines changed: 97 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,107 @@ Quick Start
4
4
5
5
This short tutorial will demonstrate some of the capabilities of ChiantiPy and the CHIANTI database. It assumes that you know what the CHIANTI database provides and why you want to use it. It is useful to begin by exploring the properties of the **ion class**, as much of ChiantiPy is based on it. An ion such as Fe XIV is specified by the string 'fe_14', in the usual CHIANTI notation.
6
6
7
-
Perhaps the easiest way is to use a jupyter-notebook or a jupyter3-notebook to load the quick start notebook file QuickStart.ipynb in the directory jupyter_notebooks. Then, just run each cell step by step. If you are not familiar with notebooks, then you can cut and paste the following code into a Python/IPython session.
7
+
Perhaps the easiest way is to use a jupyter-notebook is to load the quick start notebook file QuickStart.ipynb in the directory jupyter_notebooks. Then, just run each cell step by step. If you are not familiar with notebooks, then you can cut and paste the following code into a Python/IPython session.
8
8
9
9
N.B.: in the time some of the plots and data were produced, there have been some changes to ChiantiPy and CHIANTI. It is possible that you might find differences (hopefully small).
10
10
11
11
Bring up a Python session (using > Python -i ), or better yet, an IPython session
12
12
13
13
::
14
14
15
+
import os
16
+
17
+
18
+
the following will show the XUVTOP directory
19
+
20
+
::
21
+
22
+
os.environ['XUVTOP']
23
+
24
+
25
+
::
26
+
27
+
import ChiantiPy
15
28
import ChiantiPy.core as ch
29
+
import ChiantiPy.tools.filters as chfilters
30
+
import ChiantiPy.tools.io as chio
16
31
import numpy as np
17
32
import matplotlib.pyplot as plt
18
33
19
-
What we will really be interested in are various properties of the Fe XIV emissivities as a function of temperature and density. So, let's define a numpy array of temperatures
34
+
::
35
+
36
+
matplotlib qt
37
+
38
+
::
39
+
40
+
autoreload 2
41
+
42
+
to see the ChiantiPy version
43
+
44
+
::
45
+
46
+
ChiantiPy.__version__
47
+
48
+
49
+
to see the Ipython version
50
+
51
+
::
52
+
53
+
import IPython
54
+
print(' IPython version = %i.%i.%i'%(IPython.version_info[0],IPython.version_info[1],IPython.version_info[2]))
55
+
56
+
It is useful to open a qtconsole where are the calculations can be easily examined
57
+
58
+
::
59
+
60
+
qtconsole
61
+
62
+
to see the version of the CHIANTI database
63
+
64
+
::
65
+
66
+
chianti_version = chio.versionRead()
67
+
68
+
::
69
+
70
+
chianti_version
71
+
72
+
Setting default values
73
+
----------------------
74
+
75
+
ChiantiPy determines a number of default setting on instantiation. To use the default values list below, it is not necssary to do anything.
to use any of the other possible values, check out the notes/setting_default_values in the documentation
89
+
90
+
the defaults can be checked
91
+
92
+
::
93
+
94
+
chdata.Defaults.keys()
95
+
96
+
97
+
::
98
+
99
+
chdata.Defaults['wavelength']
100
+
101
+
102
+
103
+
Level populations
104
+
-----------------
105
+
106
+
107
+
As a start, we will examine the various properties of the Fe XIV emissivities as a function of temperature and density. So, let's define a numpy array of temperatures
20
108
21
109
::
22
110
@@ -31,8 +119,6 @@ In ChiantiPy, temperatures are currently given in degrees Kelvin and densities a
31
119
note that eDensity is the new keyword for electron density
32
120
33
121
34
-
Level populations
35
-
-----------------
36
122
37
123
::
38
124
@@ -1241,9 +1327,9 @@ these calculations can take some time so it is a good idea to save them
1241
1327
::
1242
1328
1243
1329
plt.figure()
1244
-
rl.radLossPlot()
1330
+
mrl.radLossPlot()
1245
1331
1246
-
produces, in 446 s:
1332
+
produces, produces after 250s on a 3.5 GHz 4 core processor:
1247
1333
1248
1334
.. image:: _static/rl_phot_1m5.png
1249
1335
:align:center
@@ -1277,6 +1363,10 @@ to select photospheric abundances
1277
1363
1278
1364
myAbund = abundList[4]
1279
1365
1366
+
::
1367
+
1368
+
myAbund
1369
+
1280
1370
1281
1371
::
1282
1372
@@ -1292,7 +1382,7 @@ to select photospheric abundances
1292
1382
plt.figure()
1293
1383
mrl2.radLossPlot()
1294
1384
1295
-
produces after 1550s on a rather slow 6 core processor
0 commit comments