Skip to main content

a Python interface to the CHIANTI atomic database for astrophysical spectroscopy

Project description

Welcome to ChiantiPy version 0.6.5

Development of ChiantiPy is in the process of moving to github

changes from 0.6.0 to 0.6.5

An error in the continuum and the three spectrum routines (spectrum, mspectrum and ipymspectrum) has been corrected. Ions for which the continuum cannot be calculated are now ignored.

matplotlib.pyplot is now imported for plotting

IPython version 4 / Jupyter is now listed as a prerequisite. However, v0.6.4 can be made compatible with IPython 2 or 3 with a simple edit.

An error in calculating the proton excitation rates was fixed.

The code has been edited to make it compatible with Python 3 and has been tested against Python 3.3

changes from 0.5.3 to 0.6.0

This is a major release.

First, ChiantiPy 0.6.0 is compatible with the most recently released CHIANTI database version 8.0. It also fixes some major bugs in the previous version. Documentation has been improved and a IPython notebook QuickStart.ipynb, that largely follows the ‘Quick Start’ documentation pages, has also been included.

There are two new multi-ion classes: bunch and ipymspectrum. bunch allows the user to calculate line intensities for a specified set of elements or individual ions as a function of temperature or density. One advantage of bunch is the ability to calculate the intensity ratio of lines of two different ions as a function of temperature or density.

ipymspectrum is much like the existing spectrum and mspectrum classes. mspectrum allows the use of the Python multiprocessing module to speed up spectral calculations. The ipymspectrum class uses the IPython parallel module so that multiprocessing spectral calculations can be performed in the IPython QtConsole and Notebook.

A new method intensityList has been developed to allow the user to list the most intense lines within a given wavelength range. This new methods, together with previously existing intensityRatio and intensityRatioSave are all now inherited by the ion classs and the multi-ion classes.

The ion and multi-ion classes now accept the keyword argument abundanceName that allow the user to specify the set of elemental abundances rather than just the default abundance file.

Additional we have replaced the FortranFormat module of Scientific Python by Konrad Hinsen with the fortranformat module of Brendan Arnold at I have slightly modified fortranformat to make it Python 3 compliant.

For the future, I plan to make ChiantiPy compliant with both Python 2.7 and the current version of Python 3 (now 3.4), improve the documentation and move the projec to github, in no particular order.

ChiantiPy is now released under a new license, the OSI approved ISCL license. From Wikipedia The ISCL license is a permissive free software license written by the Internet Software Consortium (ISC). It is functionally equivalent to the simplified BSD and MIT/Expat licenses, …

What is ChiantiPy

ChiantiPy is the Python interface to the CHIANTI atomic database 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.

Detailed information can be found at


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.

Getting started with ChiantiPy


  • Python 2.7 or 3
  • Numpy
  • Scipy
  • Matplotlib
  • [Optional] PyQt4 or wxPython
  • IPython version 4 / Jupyter
ChiantiPy has been developed with IPython versions 2.x, 3.x and now version 4 / Jupyter which is the required version. A very small edit to one of the version 0.6.3 files will allow this version to work in IPython 2 or 3. This is discussed in the Notes section. The previously released version 0.6.0 is compatible with IPython 2.x and 3.x and will remain on the SourceForge site for an indefinite period of time.
  • CHIANTI, the atomic database for astrophysical spectroscopy

In addition, the FortranFormat module from Scientific Python, developed by Konrad Hinsen of the Centre de Biophysique Moleculaire (, is included in this distribution for simplicity.

Installing the CHIANTI database

The gzipped data tar ball can be downloaded from the CHIANTI website

  • put the file in a convenient directory, cd to the directory and untar the file
  • ChiantiPy uses the environment variable XUVTOP to find the database. Set XUVTOP to the name of the directory where the CHIANTI data tarball was placed. For example

> setenv XUVTOP /data1/xuv/directory.where.the.tarball.was.placed

Some sites have the CHIANTI database maintained as part of a SolarSoft distribution. In that case, simply set XUVTOP to the directory were it exists, usually something like $SSW/packages/chianti/dbase

Installing the ChiantiPy package

Fairly detailed directions can be found on the web page ChiantiPy

The ChiantiPy package can be downloaded from the ChiantiPy, untar it, cd to the directory where it was unpacked, and then, as root

> python install

If you do not have root privileges, simply put the ChiantiPy directory (simply called ‘chianti’) in your PYTHONPATH

Version 0.6.4 is also available on the Python package index PyPI

Running ChiantiPy

The documentation can be found on its web page ChiantiPy

In particular, a quick start guide is included which should get you up and running fairly quickly. This has been recently updated to reflect the new features in v0.6.0.

Keeping track of ChiantiPy

There is a mailing list that you can subscribe to at In order to subscribe it is first necessary to obtain a user account from This is a straightforward process.

There is also a general chianti google group with the email address

Project details

Release history Release notifications

History Node


This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
ChiantiPy-0.6.5.tar.gz (124.6 kB) Copy SHA256 hash SHA256 Source None Nov 22, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page