Package: pdrtpy
Reliable astrophysics at everyday low, low prices!®pdrtpyis the new and improved version of the formerly web-basedPhotoDissociation Region Toolbox, rewritten in Python with new capabilities and giving more flexibility to end users.  (The web-based /CGI version of PDRT is deprecated and no longer supported).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 JupyterExample Notebooksfor 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 inNeufeld & Wolfire 2016, plus photo rates fromHeays et al. 2017, oxygen chemistry rates fromKovalenko et al. 2018andTran et al. 2018,
and carbon chemistry rates fromDagdigian 2019. We have also implemented new collisional
excitation rates for [O I] fromLique et al. 2018(and Lique private
communication) and have included13C chemistry along with the
emitted line intensities for  [13C II] and13CO.We also support fitting of temperatures and column densities to H2excitation diagrams.Up to date documentation can be found atpdrtpy.readthedocs.io.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, seeHollenbach & Tielens 1997.Getting StartedInstallationRequirementspdrtpyrequires Python 3 and recent versions ofastropy,numpy,scipy,lmfit, andmatplotlib. If you want to run theExample Notebooks, you also needjupyter.First make sure you are using Python 3:python--versionshould show e.g.,3.7.6.Install the packageWith pipPython has numerous ways to install packages; the easiest is withpip.
The code is hosted at thePython Packaging Index, so you can type:pipinstallpdrtpyIf you do not have permission to install into your Python system package area, you will need to do auser-install, which will install the package locally.pipinstall--userpdrtpyFor installation from github, seeFor Developersbelow.Then go ahead and install theExample Notebooks.Example NotebooksWe have prepared Jupyter iPython notebooks with examples of how to usepdrtpy.  You can download these as follows.gitclonehttps://github.com/mpound/pdrtpy-nb.gitIf you don’t have git, you candownload a zip file of the repository.To familiarize yourself with the capabilities ofpdrtpy, we suggest you do the notebooks in this order:Working with MeasurementsIntroduction to ModelSetsExploring ModelsDetermining Radiation Field and IntensityImage Radiation Field and Intensity for MapsFitting |H2| Excitation DiagramsAdding Custom ModelsGetting Help & Giving FeedbackIf you have a question or wish to give feedback about using PDR Toolbox or about the example notebooks, head on over to ourPDR Toolbox online forum.  There you can post your question and engage in discussion with the developers and other users.  Feature requests from the community are welcome.Reporting IssuesIf you find a bug or something you think is in error, please report it on
thegithub issue tracker.
(You must have aGithub accountto 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 thePDR Toolbox forum.Contribute Code or DocumentationWe welcome contributions and ideas to improve the PDR Toolbox!All contributors agree to follow ourCode of Conduct.  Please look at ourRoadmap of Functionalityto see the main new features we want to build.  You can help out with those or suggest new features.For DevelopersIf you plan to tinker with the code, you should fork the repo and work on your own fork.  Point your browser tohttps://github.com/mpound/pdrtpyand click onforkin 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 ofpdrtpyinstalled).sudoapt-getinstallpython3-venvpython-mvenv~/pdrtpy_venvsource~/pdrtpy_venv/bin/activate[.csh]cdpdrtpypipinstall-rrequirements.txtpipinstall-e.