
Security News
TypeScript Native Previews: 10x Faster Compiler Now on npm for Public Testing
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.
PhotoDissociation Region Toolbox --- Python
Reliable astrophysics at everyday low, low prices! |reg|
.. image:: https://img.shields.io/badge/ascl-1102.022-blue.svg?colorB=262255&style=plastic :target: http://ascl.net/1102.022 :alt: Astrophysics Source Code Library 1102.022
.. image:: http://www.repostatus.org/badges/latest/active.svg?style=plastic :target: http://www.repostatus.org/#active :alt: Project Status: Active - The project has reached a stable, usable state and is being actively developed.
.. image:: https://img.shields.io/pypi/pyversions/pdrtpy.svg?style=plastic :target: https://img.shields.io/pypi/pyversions/pdrtpy.svg?style=plastic :alt: Python version
.. image:: https://img.shields.io/badge/License-GPLv3-blue.svg?style=plastic :target: https://www.gnu.org/licenses/gpl-3.0 :alt: GNU GPL v3 License
.. image:: https://readthedocs.org/projects/pdrtpy/badge/?version=latest&style=plastic :target: https://pdrtpy.readthedocs.io/en/latest/?badge=latest :alt: Documentation status
.. image:: https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=plastic :target: https://github.com/mpound/pdrtpy/blob/master/CODE_OF_CONDUCT.md :alt: Contributor Covenant Code of Conduct
.. image:: https://github.com/mpound/pdrtpy/actions/workflows/ci.yml/badge.svg :target: https://github.com/mpound/pdrtpy/actions/workflows/ci.yml/ :alt: CI Workflow Build Status
.. image:: https://results.pre-commit.ci/badge/github/mpound/pdrtpy/master.svg :target: https://results.pre-commit.ci/latest/github/mpound/pdrtpy/master :alt: pre-commit.ci status
pdrtpy
is the Python PhotoDissociation Region Toolbox <http://dustem.astro.umd.edu/>
_. The current stable version is 2.4.4.
The PDR Toolbox is a science-enabling tool for the community, designed to help astronomers determine the physical parameters of photodissociation regions from observations. Typical observations of both Galactic and extragalactic PDRs come from ground- and space-based millimeter, submillimeter, and far-infrared telescopes such as ALMA, SOFIA, JWST, Spitzer, and Herschel. Given a set of observations of spectral line or continuum intensities, PDR Toolbox can compute best-fit FUV incident intensity and cloud density based on our models of PDR emission.
The PDR Toolbox will cover a wide range of spectral lines and metallicities
and allows map-based analysis so users can quickly compute spatial
images of density and radiation field from map data. We provide Jupyter
Example Notebooks
_ for data analysis. It also can support models from
other PDR codes enabling comparison of derived properties between codes.
The underlying PDR model code has improved physics and chemistry. Critical updates include those discussed in
Neufeld & Wolfire 2016 <https://ui.adsabs.harvard.edu/abs/2016ApJ...826..183N/abstract>
, plus photo rates from
Heays et al. 2017 <https://ui.adsabs.harvard.edu/abs/2017A%26A...602A.105H/abstract>
, oxygen chemistry rates from
Kovalenko et al. 2018 <https://ui.adsabs.harvard.edu/abs/2018ApJ...856..100K/abstract>
_ and
Tran et al. 2018 <https://ui.adsabs.harvard.edu/abs/2018ApJ...854...25T/abstract>
,
and carbon chemistry rates from
Dagdigian 2019 <https://ui.adsabs.harvard.edu/abs/2019MNRAS.487.3427D/abstract>
. We have also implemented new collisional
excitation rates for |OI| from
Lique et al. 2018 <https://ui.adsabs.harvard.edu/abs/2018MNRAS.474.2313L/abstract>
_ (and Lique private
communication) and have included |13C| chemistry along with the
emitted line intensities for |13CII| and |13CO|.
We also support fitting of temperatures and column densities to |H2| excitation diagrams.
Up to date documentation can be found at pdrtpy.readthedocs.io <http://pdrtpy.readthedocs.io/>
_.
Photodissociation regions (PDRs) include all of the neutral gas in the ISM where far-ultraviolet (FUV) photons dominate the chemistry and/or heating. In regions of massive star formation, PDRS are created at the boundaries between the HII regions and neutral molecular cloud, as photons with energies 6 eV < h \nu < 13.6 eV. photodissociate molecules and photoionize other elements. The gas is heated from photo-electrons and cools mostly through far-infrared fine structure lines like |OI| and |CII|.
For a full review of PDR physics and chemistry, see Hollenbach & Tielens 1997 <https://ui.adsabs.harvard.edu/abs/1997ARA&A..35..179H>
_.
Requirements ^^^^^^^^^^^^
pdrtpy
requires Python 3 and recent versions of astropy <https://astropy.org>
, numpy <https://numpy.org>
, scipy <https://scipy.org>
, lmfit <https://lmfit.github.io/lmfit-py/>
, and matplotlib <https://matplotlib.org/>
. If you want to run the Example Notebooks
, you also need jupyter <https://jupyter.org>
_.
First make sure you are using Python 3.10 or higher:
.. code-block:: sh
python --version
should show e.g., 3.11.7.
.. Also, make sure setuptools is up to date:
.. .. code-block:: sh
.. pip install -U setuptools
Install the package ^^^^^^^^^^^^^^^^^^^
Python has numerous ways to install packages; the easiest is with pip.
The code is hosted at the Python Packaging Index <https://pypi.org/project/pdrtpy/>
_, so you can type:
.. code-block:: sh
pip install pdrtpy
If you do not have permission to install into your Python system package area, you will need to do a user-install <https://pip.pypa.io/en/latest/user_guide/#user-installs>
_, which will install the package locally.
.. code-block:: sh
pip install --user pdrtpy
For Developers
_ below.Then go ahead and install the Example Notebooks
_.
.. _notebooks:
We have prepared Jupyter iPython notebooks with examples of how to use pdrtpy
. You can download these as follows.
.. code-block:: sh
git clone https://github.com/mpound/pdrtpy-nb.git
If you don't have git, you can
download a zip file of the repository <https://github.com/mpound/pdrtpy-nb/archive/master.zip>
_.
To familiarize yourself with the capabilities of pdrtpy
, we suggest you do the notebooks in this order:
Working with Measurements <https://github.com/mpound/pdrtpy-nb/blob/master/notebooks/PDRT_Example_Measurements.ipynb>
_Introduction to ModelSets <https://github.com/mpound/pdrtpy-nb/blob/master/notebooks/PDRT_Example_ModelSets.ipynb>
_Exploring Models <https://github.com/mpound/pdrtpy-nb/blob/master/notebooks/PDRT_Example_Model_Plotting.ipynb>
_Determining Radiation Field and Intensity <https://github.com/mpound/pdrtpy-nb/blob/master/notebooks/PDRT_Example_Find_n_G0_Single_Pixel.ipynb>
_Image Radiation Field and Intensity for Maps <https://github.com/mpound/pdrtpy-nb/blob/master/notebooks/PDRT_Example_Make_n_G0_maps.ipynb>
_Fitting |H2| Excitation Diagrams <https://github.com/mpound/pdrtpy-nb/blob/master/notebooks/PDRT_Example_H2_Excitation.ipynb>
_Adding Custom Models <https://github.com/mpound/pdrtpy-nb/blob/master/notebooks/PDRT_Example_Adding_Models.ipynb>
_If you have a question or wish to give feedback about using PDR Toolbox or about the example notebooks, head on over to our PDR Toolbox online forum <https://groups.google.com/g/pdrt>
_. There you can post your question and engage in discussion with the developers and other users. Feature requests from the community are welcome.
If you find a bug or something you think is in error, please report it on
the github issue tracker <https://github.com/mpound/pdrtpy/issues>
.
(You must have a Github account <https://github.com/>
to submit an issue).
If you aren't sure if something is a bug or not, or if you don't wish to
create a Github account, you can post to the PDR Toolbox forum <https://groups.google.com/g/pdrt>
_.
We welcome contributions and ideas to improve the PDR Toolbox! All contributors agree to follow our Code of Conduct <https://github.com/mpound/pdrtpy/blob/master/CODE_OF_CONDUCT.md>
_ . Please look at our
Roadmap of Functionality <https://github.com/mpound/pdrtpy/blob/master/roadmap.md>
_
to see the main new features we want to build. You can help out with those or suggest new features.
If you plan to tinker with the code, you should fork the repo and work on your own fork. Point your browser to
https://github.com/mpound/pdrtpy <https://github.com/mpound/pdrtpy>
_
and click on fork in the upper right corner. After you have made your changes, create a pull request to merge them into the master branch.
You may want to use a virtual environment to protect from polluting your daily working environment (especially if you have a stable version of pdrtpy
installed).
.. code-block:: sh
sudo apt-get install python3-venv python -m venv ~/pdrtpy_venv source ~/pdrtpy_venv/bin/activate[.csh] cd pdrtpy pip install -r requirements.txt pip install -e .
.. |reg| unicode:: U+000AE .. REGISTERED SIGN
.. |13C| replace:: :sup:13
\ C
.. |13CO| replace:: :sup:13
\ CO
.. |13CII| replace:: [\ :sup:13
\ C II]
.. |OI| replace:: [O I]
.. |CII| replace:: [C II]
.. |H2| replace:: H\ :sub:2
.. |nu| unicode:: 0x3bd .. greek nu
FAQs
PhotoDissociation Region Toolbox (PDRT), astrophysics analysis tools
We found that pdrtpy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.
Research
Security News
Malicious npm packages targeting React, Vue, Vite, Node.js, and Quill remained undetected for two years while deploying destructive payloads.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.