forked from chianti-atomic/ChiantiPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
96 lines (71 loc) · 3.1 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
ChiantiPy
=========
| |Build Status|
| |Documentation Status|
ChiantiPy is the Python interface to the `CHIANTI atomic
database <http://www.chiantidatabase.org>`__ for astrophysical
spectroscopy. It provides the capability to calculate the emission line
and continuum spectrum of an optically thin plasma based on the data in
the CHIANTI database.
What is CHIANTI?
----------------
CHIANTI provides a database of atomic data that can be used to interpret
the emission of spectral lines and continuua emitted from
high-temperature, optically-thin astrophysical sources. The CHIANTI
project provides a suite of routines written in Interactive Data
Language (IDL) to access the database and calculate various quantities
for use in interpreting observed spectra or producing synthetic spectra.
Installation
------------
The following dependencies are required to run ChiantiPy,
- `Python <https://www.python.org/>`__ (2.7,3)
- `Numpy <http://www.numpy.org/>`__
- `Scipy <https://www.scipy.org/>`__
- `Matplotlib <http://matplotlib.org/>`__
- `ipyparallel <https://github.com/ipython/ipyparallel>`__
The following two are extremely useful for running Python programs
- `IPython <http://ipython.org>`__
- `Jupyter <http://jupyter.org/>`__
Optionally, if you'd like to use the GUI interfaces,
- `PyQt4 <https://riverbankcomputing.com/software/pyqt/intro>`__ and/or
- `wxPython <http://www.wxpython.org/>`__
If you are not familiar with installing Python and the needed
dependencies, we recommend the `Anaconda
platform <https://www.continuum.io/downloads>`__. Next, download the
`CHIANTI
database <http://www.chiantidatabase.org/chianti_download.html>`__.
Assuming you've placed the CHIANTI tree in ``$HOME``, set the
environment variable in your ``.bashrc`` file,
.. code:: shell
export XUVTOP=$HOME/chianti/dbase
Finally, clone and install the source from GitHub,
.. code:: shell
$ git clone --recursive https://github.com/chianti-atomic/ChiantiPy.git
$ cd ChiantiPy
$ python setup.py install
Usage
-----
As a quick example, we'll calculate the populations of the top 10 levels
of Fe XIV as a function of temperature at constant density and plot
them:
.. code:: python
>>> import ChiantiPy.core as ch
>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> temperature = np.logspace(5.8,6.8,21)
>>> fe14 = ch.ion('fe_14',temperature=temperature,eDensity=1.e+9,em=1.e+27)
>>> fe14.popPlot()
>>> plt.show()
Help
----
For more information about installing and using either ChiantiPy or the
CHIANTI atomic database, check out the following links:
- `ChiantiPy
Documentation <http://chiantipy.readthedocs.io/en/latest/>`__
- `Chianti Google Mailing
List <https://groups.google.com/forum/#!forum/chianti>`__
- `CHIANTI Atomic Database Webpage <http://www.chiantidatabase.org/>`__
.. |Build Status| image:: https://travis-ci.org/chianti-atomic/ChiantiPy.svg?branch=master
:target: https://travis-ci.org/chianti-atomic/ChiantiPy
.. |Documentation Status| image:: http://readthedocs.org/projects/chiantipy/badge/?version=latest
:target: http://chiantipy.readthedocs.io/en/latest/?badge=latest