Coder Social home page Coder Social logo

v-gpu / pypahdb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pahdb/pypahdb

0.0 0.0 0.0 15.55 MB

A Python tool to decompose astronomical PAH emission into contributing PAH subclasses.

Home Page: https://www.astrochemistry.org/pahdb/

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

pypahdb's Introduction

Travis Status Coverage Status Documentation

pypahdb

pypahdb is a Python package to fit and decompose 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 https://doi.org/10.25080/Majora-4af1f417-00f.

Features

pypahdb is the light version of a full suite of Python software tools that is currently being developed, which is an analog of the off-line IDL tools. A feature comparison is presented in the table below.

pyPAHdb IDL/Python tools
Included molecules. 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 of an emission profile.
[2] NNLS: non-negative least squares.
[3] In this context refers to handling observational spectroscopic uncertainties.

Requirements

This software requires:

python3 specutils scipy astropy

Installation

pypahdb can be directly installed from the repository using pip:

pip install git+git://github.com/PAHdb/pyPAHdb.git

Supported data formats

Presently, pypahdb supports ASCII tables and Spitzer FITS files.

Examples

from pypahdb.decomposer import Decomposer
from pypahdb.observation import Observation

# read-in a fits-file containing an astronomical observation
observation = Observation('/path/to/observation.fits')
# run the decomposer on the spectral data in observation.fits
result = Decomposer(observation.spectrum)
# 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

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)

Flowchart

Background

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, asscociated with the Astrophysics & Astrochemistry Laboratory at NASA Ames Research Center.

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".

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

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,
  https://doi.org/211, 8, 2014 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

Contributing

Please read CONTRIBUTING.md for details on the code of conduct, and the process for submitting pull requests.

Versioning

For the versions available, see the tags on this repository.

Authors

  • Christiaan Boersma - Initial work - PAHdb
  • Matthew J. Shannon - Initial work - PAHdb
  • Alexandros Maragkoudakis

See also the list of contributors who participated in this project.

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details

Acknowledgments

pypahdb's People

Contributors

pahdb avatar mattjshannon avatar alexmaragko avatar v-gpu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.