-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetting_started.html
More file actions
212 lines (200 loc) · 13.3 KB
/
getting_started.html
File metadata and controls
212 lines (200 loc) · 13.3 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8" />
<title>Getting started with ChiantiPy — ChiantiPy 0.15.1 documentation</title>
<link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Quick Start" href="quick_start.html" />
<link rel="prev" title="ChiantiPy Documentation" href="index.html" />
</head><body>
<div style="padding: 20px 10px 10px 40px; background-color: #fff8d3; text-align: left;">
<a href="">
<img border="0" alt="chiantipy" src="_static/chiantipy_logo.png"/>
</a>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="quick_start.html" title="Quick Start"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="ChiantiPy Documentation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">ChiantiPy 0.15.1 documentation</a> »</li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">ChiantiPy Documentation</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="quick_start.html"
title="next chapter">Quick Start</a></p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="getting-started-with-chiantipy">
<h1>Getting started with ChiantiPy<a class="headerlink" href="#getting-started-with-chiantipy" title="Permalink to this headline">¶</a></h1>
<div class="section" id="prerequisites">
<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p><a class="reference external" href="http://www.chiantidatabase.org/">CHIANTI</a>, the atomic database for astrophysical spectroscopy (Version 10 or later)</p></li>
</ul>
<ul class="simple">
<li><p><a class="reference external" href="http://www.python.org">Python3</a> (3.8 is the current development version)</p></li>
</ul>
<ul class="simple">
<li><p><a class="reference external" href="http://www.scipy.org/">Numpy</a> (currently developed with 1.20)</p></li>
</ul>
<ul class="simple">
<li><p><a class="reference external" href="http://www.scipy.org/">Scipy</a> (currently developed with 1.6)</p></li>
</ul>
<ul class="simple">
<li><p><a class="reference external" href="http://matplotlib.sourceforge.net/">Matplotlib</a> (currently developed with 3.3.4)</p></li>
</ul>
<ul>
<li><p>Matplotlib requires a GUI library</p>
<p><a class="reference external" href="http://www.riverbankcomputing.co.uk/">PyQt5</a></p>
<p>Once one of these is installed, it must be set as the backend in your matplotlibrc file, e.g., backend: Qt5Agg</p>
</li>
</ul>
<ul class="simple">
<li><p>ipyparallel (required for multiprocessing with ipymspectrum)</p></li>
<li><p>(not really a prerequisite but <strong>extremely</strong> useful) <a class="reference external" href="http://ipython.org">IPython</a> version 7.21 and <a class="reference external" href="http://jupyter.readthedocs.io/en/latest/">Jupyter</a></p></li>
</ul>
</div>
<div class="section" id="install-the-chianti-database">
<h2>Install the CHIANTI database<a class="headerlink" href="#install-the-chianti-database" title="Permalink to this headline">¶</a></h2>
<p>The gzipped <em>data</em> tar ball can be downloaded from the CHIANTI <a class="reference external" href="http://www.chiantidatabase.org/chianti_download.html">website</a></p>
<ul class="simple">
<li><p>put the file in a convenient directory, cd to the directory and untar the file</p></li>
<li><p>ChiantiPy uses the environment variable <em>XUVTOP</em> to find the database. Set XUVTOP to the name of the directory where the CHIANTI data tarball was placed. For example</p></li>
</ul>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">setenv</span> <span class="n">XUVTOP</span> <span class="o">/</span><span class="n">data1</span><span class="o">/</span><span class="n">directory</span><span class="o">.</span><span class="n">where</span><span class="o">.</span><span class="n">the</span><span class="o">.</span><span class="n">tarball</span><span class="o">.</span><span class="n">was</span><span class="o">.</span><span class="n">placed</span>
</pre></div>
</div>
<p>or on Windows: To set the environment variable, go to Control Panel -> System -> Advanced System Properties -> Environment Variables.</p>
<p>Some sites have the CHIANTI database maintained as part of a SolarSoft distribution. In that case, simply set XUVTOP to the directory were it resides, usually something like $SSW/packages/chianti/dbase</p>
</div>
<div class="section" id="install-the-prerequisites">
<h2>Install the Prerequisites<a class="headerlink" href="#install-the-prerequisites" title="Permalink to this headline">¶</a></h2>
<p>On <strong>Linux</strong> systems this can usually be done with your package manager.</p>
<p>On <strong>Windows</strong>, <strong>Linux</strong> and <strong>Mac</strong> systems, it is possible to use</p>
<ul class="simple">
<li><p>the <a class="reference external" href="http://continuum.io/downloads">Anaconda</a> distribution from from Continuum, or,</p></li>
</ul>
<ul class="simple">
<li><p>the <a class="reference external" href="https://store.enthought.com/downloads/#default">Canopy</a> distribution from Enthought.</p></li>
</ul>
<p>On <strong>Windows</strong>, it is also possible to use:</p>
<ul class="simple">
<li><p><a class="reference external" href="http://winpython.github.io/">WinPython</a></p></li>
</ul>
<p>All of these packages are free, at least for noncommercial use (I believe) and have a considerable amount of documentation. <strong>You shoud check the version of IPython that is provided</strong>.</p>
</div>
<div class="section" id="install-the-chiantipy-package">
<h2>Install the ChiantiPy package<a class="headerlink" href="#install-the-chiantipy-package" title="Permalink to this headline">¶</a></h2>
<p>In order to be compatible with the latest version (10) of the CHIANTI atomic database, it is necessary to install the latest version (0.10.0) of ChiantiPy</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">ChiantiPy</span>
</pre></div>
</div>
<p>or</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="n">ChiantiPy</span>
</pre></div>
</div>
<p>I have not tried this with ChiantiPy, myself.</p>
<p>The ChiantiPy package can be downloaded from the <a class="reference external" href="http://sourceforge.net/projects/chiantipy/">ChiantiPy</a> project page at Sourceforge, untar it, cd to the directory where it was unpacked, and then, as root</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span>
</pre></div>
</div>
<p>If you do not have root privileges, simply put the ChiantiPy directory in your PYTHONPATH</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span> <span class="o">--</span><span class="n">prefix</span><span class="o">=</span><span class="n">somewhere_in_my_PYTHONPATH</span>
</pre></div>
</div>
<p>or on a Mac, with the Anaconda package</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span> <span class="o">--</span><span class="n">prefix</span><span class="o">=/</span><span class="n">Users</span><span class="o">/</span><span class="n">your_user_name</span><span class="o">/</span><span class="n">anaconda</span><span class="o">/</span>
</pre></div>
</div>
<p><strong>Thanks to Peter Young (GMU) for providing the instructions for installation on Mac and Windows</strong></p>
</div>
<div class="section" id="note-chiantipy-interactions-with-various-gui-backends">
<h2>Note - ChiantiPy interactions with various GUI backends<a class="headerlink" href="#note-chiantipy-interactions-with-various-gui-backends" title="Permalink to this headline">¶</a></h2>
<p>First, Matplotlib requires a GUI backend and can be specified by the user in the matplotlibrc file. Matplotlib expects to find this file in $HOME/.config/matplotlib, although it might require that you copy it to that directory.</p>
<p>ChiantiPy also uses a GUI dialog widget set. Selections can also be made via the command line. The user choice is specified in the chiantirc file. One is included with the distribution. On Linux, if it is copied into either the $HOME/.config or $HOME/.chianti directory, it will automatically be picked up. It is a text file and can be edited. On Windows, it should be copied to $PROFILEHOME/.config or $PROFILEHOME/.chianti where it will also be picked up. Otherwise, the default GUI is to use the command line. A default chiantirc file is included with the distribution.</p>
<p>In order for the ChiantiPy dialog widget to be used, a backend for them must be initiated. If you choose the same backend for matplotlib (PyQt5 is best) as for the ChiantiPy widgets, then running %matplotlib in an IPython or Jupyter session will do the trick. In an interactive Python session, invoking a matplotlib or matplotlib qt command first should also do the trick.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">matplotlib</span> <span class="n">inline</span>
</pre></div>
</div>
<p>or</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">matplotlib</span> <span class="n">qt</span>
</pre></div>
</div>
<p>if you are using Qt5</p>
<p>If you choose to use a GUI backend other than that used for matplotlib, then in an IPython or a Jupyter command the following magic commands are also available to start the backend:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span><span class="n">gui</span> <span class="n">qt</span>
</pre></div>
</div>
<p>ChiantiPy has mostly been tested with the Qt5 backend for Matplotlib and using the ChiantiPy Qt5 widgets.</p>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="quick_start.html" title="Quick Start"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="ChiantiPy Documentation"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">ChiantiPy 0.15.1 documentation</a> »</li>
</ul>
</div>
<div style="padding: 20px 10px 10px 40px; background-color: #fff8d3; text-align: left;">
</div>
<div class="footer" role="contentinfo">
© Copyright 2023, Ken Dere.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
</body>
</html>