Skip to content

Commit 30afd2f

Browse files
authored
Merge pull request #417 from kdere/master
doc updates for v0.15.0
2 parents 06184aa + 4371553 commit 30afd2f

File tree

3 files changed

+271
-410
lines changed

3 files changed

+271
-410
lines changed

docs/source/notes.rst

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,65 +5,70 @@ Notes
55
Setting default values
66
----------------------
77

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+
1012

1113
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+
1317

1418
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.
1620

1721
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.
1924

2025
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.
2227

2328

2429

2530
Setting *minAbund* in spectrum calculations
2631
-------------------------------------------
2732

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+
3035
======= ========= ======== ======= ======
3136

32-
37+
3338
Element Abundance minAbund
3439
------- --------- -------------------------
3540
.. .. 1.e-6 1.e-5 1.e-4
3641
======= ========= ======== ======= ======
37-
H 1.00e+00 + + +
38-
He 8.51e-02 + + +
42+
H 1.00e+00 + + +
43+
He 8.51e-02 + + +
3944
Li 1.26e-11
4045
Be 2.51e-11
4146
B 3.55e-10
42-
C 3.31e-04 + + +
47+
C 3.31e-04 + + +
4348
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
6772
======= ========= ======== ======= ======
6873

6974
It shoud be noted that CHIANTI does not include a complete set of data for every ion of every element in this list.

docs/source/quick_start.rst

Lines changed: 97 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,107 @@ Quick Start
44

55
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.
66

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.
88

99
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).
1010

1111
Bring up a Python session (using > Python -i ), or better yet, an IPython session
1212

1313
::
1414

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
1528
import ChiantiPy.core as ch
29+
import ChiantiPy.tools.filters as chfilters
30+
import ChiantiPy.tools.io as chio
1631
import numpy as np
1732
import matplotlib.pyplot as plt
1833

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.
76+
77+
78+
========== =========================== =====================
79+
setting default possible values
80+
========== =========================== =====================
81+
wavelength angstrom angstrom, nm, ev, kev
82+
flux energy energy, photon
83+
abundfile sun_photospheric_2015_scott any.abund
84+
ioneqfile chianti any.ioneq
85+
========== =========================== =====================
86+
87+
88+
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
20108

21109
::
22110

@@ -31,8 +119,6 @@ In ChiantiPy, temperatures are currently given in degrees Kelvin and densities a
31119
note that eDensity is the new keyword for electron density
32120

33121

34-
Level populations
35-
-----------------
36122

37123
::
38124

@@ -1241,9 +1327,9 @@ these calculations can take some time so it is a good idea to save them
12411327
::
12421328

12431329
plt.figure()
1244-
rl.radLossPlot()
1330+
mrl.radLossPlot()
12451331

1246-
produces, in 446 s:
1332+
produces, produces after 250s on a 3.5 GHz 4 core processor:
12471333

12481334
.. image:: _static/rl_phot_1m5.png
12491335
:align: center
@@ -1277,6 +1363,10 @@ to select photospheric abundances
12771363

12781364
myAbund = abundList[4]
12791365

1366+
::
1367+
1368+
myAbund
1369+
12801370

12811371
::
12821372

@@ -1292,7 +1382,7 @@ to select photospheric abundances
12921382
plt.figure()
12931383
mrl2.radLossPlot()
12941384

1295-
produces after 1550s on a rather slow 6 core processor
1385+
produces after 250s on a 3.5 GHz 4 core processor
12961386

12971387

12981388
.. image:: _static/rl_coronal_1m5.png

0 commit comments

Comments
 (0)