a Python interface to the CHIANTI atomic database for astrophysical spectroscopy
Project description
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,
Python3 (Python 3 is now required as of version 0.8.0)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ChiantiPy-0.15.1.tar.gz
.
File metadata
- Download URL: ChiantiPy-0.15.1.tar.gz
- Upload date:
- Size: 8.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bb497ad6a7cbcb66785f338759fb3f5fd685e4f202eb8f4393c8232e98b0503 |
|
MD5 | 7682dad2225217774e54e47801cc10b6 |
|
BLAKE2b-256 | 3578962e9751200e3e32433f83b4152c145932a756105fc57027ca0d46668aaf |
File details
Details for the file ChiantiPy-0.15.1-py3-none-any.whl
.
File metadata
- Download URL: ChiantiPy-0.15.1-py3-none-any.whl
- Upload date:
- Size: 170.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f135afd9c458ce29c19e88b9a4ebbf379c3ab73ee83e2b45cbc9250a685b2b22 |
|
MD5 | 006147682e0c01660e9be0dc4af3f5fb |
|
BLAKE2b-256 | 793f5e34d7fc12711382b40639e4fe3bad03ae54db0099157bc0aa32bcb70c2e |