PhotoDissociation Region Toolbox — Python¶
Reliable astrophysics at everyday low, low prices! ®
pdrtpy is the new and improved version of the classic PhotoDissociation Region Toolbox, rewritten in Python with new capabilities and giving more flexibility to end users. (The Perl/CGI version of PDRT is deprecated and no longer supported).
The new PDR Toolbox will cover many more 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 model code has improved physics and chemistry. Critical updates include those discussed in Neufeld & Wolfire 2016, plus photo rates from Heays et al. 2017, oxygen chemistry rates from Kovalenko et al. 2018 and Tran et al. 2018, and carbon chemistry rates from Dagdigian 2019. We have also implemented new collisional excitation rates for [O I] from Lique et al. 2018 (and Lique private communication) and have included 13C chemistry along with the emitted line intensities for [13C II] and 13CO.
What is a PDR?¶
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 [O I] and [C II].
For a full review of PDR physics and chemistry, see Hollenbach & Tielens 1997.
First make sure you are using Python 3:
should show e.g., 3.7.6.
Install the package¶
Python has numerous ways to install packages; the easiest is with pip. The code is hosted at the Python Packaging Index, so you can type:
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, which will install the package locally.
pip install --user pdrtpy
Then go ahead and install the Example Notebooks.
We have prepared jupyter iPython notebooks with examples of how to use
pdrtpy. You can download these as follows.
git clone https://github.com/mpound/pdrtpy-nb.git
If you don’t have git, you can download a zip file of the repository.
To familiarize yourself with the capabilities of
pdrtpy, we suggest you do the notebooks in this order:
Module Descriptions and APIs¶
- Measurements: How you put observations to the Toolbox
- ModelSets: The interface to models in the Toolbox
- Utilities: Various constants and methods used by the Toolbox
- Plotting Tools: Display models and data
- Analysis Tools: Fit models to data
If you plan to tinker with the code, you may want to try this installation method.
git clone https://github.com/mpound/pdrtpy sudo apt-get install python3-venv python -m venv ~/venv source ~/venv/bin/activate cd pdrtpy pip install -r requirements.txt