Skip to main content

AtomDB python library. This is a very early development version.

Project description


This is pre-alpha release code. Many functions have just been ripped from my hard disk and not yet fully vetted. Possibly the most complete section is the “spectrum” module. Sample code is in the docs subfolder.

Full documentation can be found at


Standard python installation: python install

Version History July 17th 2015: initial release July 21st 2015: added dummyfirst keyword to pyatomdb.spectrum.make_spectrum August 12th 2015: fixed some errors in Updated readme. August 12th 2015: fixed example script in manual. August 17th 2015: added PI cross section graphing data. Updated get_data to fetch files from remote server August 18th 2015: Fixed bug with documentation September 23rd 2015: Added significant documentation. Converted all ‘z0’ to ‘Z’ and ‘rmJ’ to ‘z1’ throught the code for consistency. September 25th 2015: Major documentation revamp. Separated datacache from settings keyword Introduced automatic install and update into util package. October 13th 2015: More documentation improvements Removed use of “curl” library, as apparently is non-standard. Replaced with wget, ftplib and requests. November 5th 2015: Many minor bugfixes. Added “switch_version” to util package to allow looking at older AtomDB version data. Added use option to get total RRC emission using integral to infinity. February 12th 2016: As ever, bugfixes. Also added ability to calculate ionization balance to apec module. April 22nd 2016: Bugfixes! Also: Major change to get_maxwell_rate interface Added ability to apply RMF and ARF to spectra in spectrum module Fixed hydrogenic RRC calculation May 23rd 2016: Bugfix:update switch_version to get NEI files too. October 07th 2016: Bugfixes! Also: APEC now included in Can create a full apec run from a par file. October 13th 2016: Bugfixes! wget was causing problems during file download due to bugs, Now fixed November 01st 2016: Removed use of sparse algebra. Wasn’t accurate enough, causing issues with suprious lines in low ionization states.

Implemented faster ionization balance calculations in “apec.solve_ionbal_eigen” November 16th 2016: Bugfix to the level population calculation for recombination. For ions with level resolved rates and PI cross sections, we were double counting. Fixed now. November 30th 2016: Bugfix to download of new files: urllib.urlcleanup now called more often. December 8th 2016: Updated to handle 3.0.7. January 16th 2017: Bugfix for installation, include joblib as a requirement January 17th 2017: Bugfix for installation, include mock as a requirement February 21st 2017: Introduced new way to calculated spectra, using the Session and Spec objects in It is intended to make this the main way to calculate spectra, as it should lead to significant speed enhancements by avoiding lots of unnecessary recalculation of the same numbers. February 21st 2017: A series of bug fixes to installation and spectral calculation routines. Closes bugs #1, 2, 5 from github March 21st 2017: Several bug fixes and enhancements to the spectrum module. Updated to handle import of mock more gracefully May 5th 2017: Several bug fixes and initial inclusion of charge exchange model May 23rd 2017: Bug fix to spectrum.apply_response, now handles response files indexed from zero (thank you Lia Corrales for finding this issue)

0.5.0 January 9th 2018: Major updates to include CX models. Increased version number to something relevant to 3 decimal style.

0.5.1 February 14th 2018: Bugfix to use 64bit floats for ionization fraction calculation, which was occasionally causing issues.

0.5.2 May 10th 2018: Bugfixes, including one where angstrom spectra where generated backwards.

0.5.3 June 14th 2018: Bugfixes: NEI spectrum session fixed to assign bin units correctly when using a response file

0.5.4 September 03rd 2018: Bugfix: NEI spectrum.Session.set_specbins now correctly resets the spectra when changed. Thanks to Shinya Nakashima for discovering this bug.

0.6.0 November 20th 2018: Switch to python 3 support only. Python 2.7 support available for now through Github

0.7.0 Bug fixes aplenty, mostly due to python 3 conversion.

0.7.1 April 22nd 2019: Fixed bug occuring with spectrum continuum broadening.

0.7.2 May 6th 2019: Add option ‘ALL’ to get_data to download all the data files for an ion at once

0.8.0 January 27th 2020: Major overhaul of Spectrum module. Updated paths for the FTP server due to file move.

0.8.1 February 5th 2020: Corrections to NEISpectrum. Spectrum summation much faster and bugs in logic fixed.

Project details

Download files

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

Files for pyatomdb, version 0.8.1
Filename, size File type Python version Upload date Hashes
Filename, size pyatomdb-0.8.1.tar.gz (229.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page