Skip to main content

A Python interface to the CHIANTI atomic database

Project description

ChiantiPy - Version 0.16.0

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

ChiantiPy is available on PyPI

$ python3 -m pip install ChiantiPy

Or, clone and install the source from GitHub,

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

Another method is to use 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,

setenv XUVTOP $HOME/MY_CHIANTI_DIRECTORY

or

export XUVTOP=$HOME/MY_CHIANTI_DIRECTORY

should point to the top directory of your CHIANTI distribution

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.16.0.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.16.0-py3-none-any.whl (358.1 kB view details)

Uploaded Python 3

File details

Details for the file chiantipy-0.16.0.tar.gz.

File metadata

  • Download URL: chiantipy-0.16.0.tar.gz
  • Upload date:
  • Size: 13.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for chiantipy-0.16.0.tar.gz
Algorithm Hash digest
SHA256 93258636225fa6ef8745a94eb9d5d394b264c8c83d1c6efa74fce2fad1ef3da4
MD5 999333aa6afd8a68963a5669f71103c1
BLAKE2b-256 90a3d22ce6488a5089e8abcc5ad40fe2526e892d2dc19fe1e5beab6f4a01a336

See more details on using hashes here.

File details

Details for the file chiantipy-0.16.0-py3-none-any.whl.

File metadata

  • Download URL: chiantipy-0.16.0-py3-none-any.whl
  • Upload date:
  • Size: 358.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for chiantipy-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f92d59bafaa68778b7122a72b759ee6157b164aa3a7eab395d279ba943154593
MD5 c13da6cdeb63fef12586b75da8617653
BLAKE2b-256 8ba60e0161fba3d032dcf36606fa25aee7ca455f26addb177e5762a32e0bbc2b

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