Skip to main content

a Python interface to the CHIANTI atomic database for astrophysical spectroscopy

Project description

Documentation Status Coverage Status ascl:1308.017

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.

What is CHIANTI?

CHIANTI provides a database of atomic data that can be used to interpret the emission of spectral lines and continua 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. As of ChiantiPy 0.10.0, the CHIANTI database version 10 or later is required

Installation

The following dependencies are required to run ChiantiPy,

The following two are extremely useful for running Python programs

Optionally, if you’d like to use the GUI dialogs,

If you are not familiar with installing Python and the needed dependencies, we recommend the Anaconda platform. Next, download the CHIANTI database, version 10.0 or later. Assuming you’ve placed the CHIANTI tree in $HOME, set the environment variable in your .bashrc file,

export XUVTOP=$HOME/MY_CHIANTI_DIRECTORY

should point to the top directory of your CHIANTI distribution

Finally, clone and install the source from GitHub,

$ git clone --recursive https://github.com/chianti-atomic/ChiantiPy.git
$ cd ChiantiPy
$ python setup.py install

The release is also available on PyPI

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:

>>> 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:

Project details


Download files

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

Source Distribution

ChiantiPy-0.15.2.tar.gz (13.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ChiantiPy-0.15.2-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file ChiantiPy-0.15.2.tar.gz.

File metadata

  • Download URL: ChiantiPy-0.15.2.tar.gz
  • Upload date:
  • Size: 13.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for ChiantiPy-0.15.2.tar.gz
Algorithm Hash digest
SHA256 8b0b4dd5848fd361df54db8e2ed5b7f1a55ce4cbc6a84d8f9c4fb4e612ee993f
MD5 a9da04b3cbfefa9e3f7bdf132e3be3c7
BLAKE2b-256 9cc283cd555812364042069bbfb71b799d80d9b139bda3e5aee3bbd5cb7777e6

See more details on using hashes here.

File details

Details for the file ChiantiPy-0.15.2-py3-none-any.whl.

File metadata

  • Download URL: ChiantiPy-0.15.2-py3-none-any.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for ChiantiPy-0.15.2-py3-none-any.whl
Algorithm Hash digest
SHA256 85ef20e5769fae52009772ab33eb2f6f773ed2d5cbafd72de86d6fb0e6715f9d
MD5 0852176ba767c1e4fa2cfb20423a34d6
BLAKE2b-256 2a06f50fd826139cf8e27087ef2a494c8efda9fa471407efa61e61a4f70a9904

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page