pyPAHdb is a Python package to fit and decompose isolated astronomical PAH emission spectra into contributing PAH subclasses, i.e., charge and size.
A paper describing pyPAHdb was presented at SciPy2018 and can be found using its DOI: https://doi.org/10.25080/Majora-4af1f417-00f.
pyPAHdb is the light version of a full suite of Python software tools, which has a counterpart written in IDL. A feature comparison is presented in the table below.
Feature | pyPAHdb | IDL/Python Suite |
---|---|---|
Included PAHs | Fixed | User defined |
Excitation Energy | Fixed | User defined |
Emission Profile | Fixed | Selectable |
FWHM [1] | Fixed | User defined |
Band Redshift | Fixed | User defined |
Emission Model | Fixed | Selectable |
NNLS [2] | ✓ | ✓ |
Class Breakdown | ✓ | ✓ |
Parallelization | ✓ | ✓ |
Handle Uncertainties [3] | ✓ |
[1] FWHM: full-width at half-maximum for an emission profile.
[2] NNLS: non-negative least squares.
[3] In this context, refers to handling observational spectroscopic
uncertainties.
This software requires:
python3
specutils
scipy
astropy
matplotlib
pyPAHdb can be directly installed from the repository using pip:
pip install git+https://github.com/PAHdb/pyPAHdb.git
Note that upon first-run a pickled precomputed matrix will be downloaded from PAHdb's server.
pyPAHdb supports reading IPAC tables, Spitzer FITS files and JWST FITS files.
from pypahdb.decomposer import Decomposer
from pypahdb.observation import Observation
# Make sure to run from __main__ context to satisfy multiprocessing
if __name__ == '__main__':
# read-in a file containing an astronomical observation
observation = Observation('/path/to/observation.ext')
# run the decomposer on the spectral data in observation.fits
result = Decomposer(observation.spectrum)
# display results
result.plot_fit().show()
# Save result to fits-file
result.save_fits('/path/to/myresult.fits', header=observation.header)
# Save a PDF summary of the fit results
result.save_pdf('/path/to/figure.pdf')
More examples can be found in the examples-directory.
Documentation can be found at https://pahdb.github.io/pyPAHdb/.
Briefly, the methodology of pyPAHdb can be summarized in the following flowchart, consisting of three steps: (1) Astronomical spectroscopic data is loaded, whether loaded from FITS or ASCII files. (2) An over-sampled pre-computed matrix of PAH spectra is loaded and interpolated onto the wavelength grid of the astronomical observations. Database-fitting is performed using non-negative least-squares (NNLS), which yields the contribution of an individual PAH molecule to the total fit. As a result, we obtain a breakdown of the model fit in terms of PAH charge and size. (3) The results are written to disk as a single FITS file and as a PDF summarizing the results (one page per pixel, if a spectral cube is provided as input)
The pyPAHdb Python package is being developed as part of the awarded James Webb Space Telescope (JWST) Early Release Science (ERS) program "Radiative Feedback from Massive Stars as Traced by Multiband Imaging and Spectroscopic Mosaics" (program website; ID: 1288). The program is coordinated by an international "Core team" of 19 scientists and supported by 119 "science collaborators". pyPAHdb is developed by the NASA Ames PAH IR Spectroscopic Database team, associated with the Astrophysics & Astrochemistry Laboratory at NASA Ames Research Center.
Since FY19 the NASA Ames PAH IR Spectroscopic Database and pyPAHdb are being supported through a directed Work Package at NASA Ames titled: "Laboratory Astrophysics – The NASA Ames PAH IR Spectroscopic Database".
Since FY23 the NASA Ames PAH IR Spectroscopic Database and pyPAHdb are being supported through the Laboratory Astrophysics Round 2 directed Work Package at NASA Ames.
pyPAHdb uses a precomputed matrix of theoretically calculated PAH emission spectra from version 3.00 of the library of computed spectra. This matrix has been constructed from a collection of "astronomical" PAHs, which meet the following criteria and include the fullerenes C60 and C70:
magnesium=0 oxygen=0 iron=0 silicium=0 chx=0 ch2=0 c>20 hydrogen>0
The PAH emission spectra have been calculated employing a PAH emission model using the following parameters:
- A calculated vibrational temperature upon the absorption of a 7 eV photon
- A calculated integrated band intensity after following the entire emission cascade
- A redshift of 15 /cm to mimic some anharmonic effect
- A Gaussian emission profile with a FWHM of 15 cm-1
Additional information can be found at the NASA Ames PAH IR Spectroscopic Database website, which is located at www.astrochemistry.org/pahdb.
You are kindly asked to consider the following references for citation when using pyPAHdb:
-
M.J. Shannon, and C. Boersma, "ORGANIC MOLECULES IN SPACE: INSIGHTS FROM THE NASA AMES MOLECULAR DATABASE IN THE ERA OF THE JAMES WEBB SPACE TELESCOPE" in Proceedings of the 17th Python in Science Conference, eds. F. Akici, D. Lippa, D. Niederhut, and M. Pacer, 99, 2018 https://doi.org/10.25080/Majora-4af1f417-00f
-
C.W. Bauschlicher, Jr., A. Ricca, C. Boersma, and L.J. Allamandola, "THE NASA AMES PAH IR SPECTROSCOPIC DATABASE: COMPUTATIONAL VERSION 3.00 WITH UPDATED CONTENT AND THE INTRODUCTION OF MULTIPLE SCALING FACTORS", The Astrophysical Journal Supplement Series, 234, 32, 2018 https://doi.org/10.3847/1538-4365/aaa019
-
C. Boersma, C.W. Bauschlicher, Jr., A. Ricca, A.L. Mattioda, J. Cami, E. Peeters, F. Sanchez de Armas, G. Puerta Saborido, D.M. Hudgins, and L.J. Allamandola, "THE NASA AMES PAH IR SPECTROSCOPIC DATABASE VERSION 2.00: UPDATED CONTENT, WEBSITE AND ON/OFFLINE TOOLS", The Astrophysical Journal Supplement Series, 211, 8, 2014 https://doi.org/10.1088/0067-0049/211/1/8
-
C.W. Bauschlicher, Jr., C. Boersma, A. Ricca, A.L. Mattioda, J. Cami, E. Peeters, F. Sánchez de Armas, G. Puerta Saborido, D.M. Hudgins, and L.J. Allamandola, "THE NASA AMES PAH IR SPECTROSCOPIC DATABASE: THE COMPUTED SPECTRA", The Astrophysical Journal Supplement Series, 189, 341, 2010 https://doi.org/10.1088/0067-0049/189/2/341
-
Mattioda, A. L., Hudgins, D. M., Boersma, C., Ricca, A., Peeters, E., Cami, J., Sanchez de Armas, F., Puerta Saborido, G., Bauschlicher, C. W., J., and Allamandola, L. J. "THE NASA AMES PAH IR SPECTROSCOPIC DATABASE: THE LABORATORY SPECTRA", The Astrophysical Journal Supplement Series, 251, 22, 2020 https://doi.org/10.3847/1538-4365/abc2c8
Please read CONTRIBUTING.md for details on the code of conduct, and the process for submitting pull requests.
For the versions available, see the tags on this repository.
- Christiaan Boersma - Initial work - PAHdb
- Matthew J. Shannon - Initial work - PAHdb
- Alexandros Maragkoudakis - PAHdb
See also the list of contributors who participated in this project.
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details
- The NASA Ames PAH IR Spectroscopic Database Team - www.astrochemistry.org/pahdb
- The Astrophysics & Astrochemistry Laboratory at NASA Ames Research Center - www.astrochemistry.org