Bayesian Analysis of Galaxies for Physical Inference and Parameter EStimation is a state of the art Python code for modelling galaxy spectra and fitting spectroscopic and photometric observations.
Bagpipes is currently in a state of active development in the run-up to the release of version 1. Please email me if you have any queries, or find things which don’t work as they’re supposed to.
Source and installation¶
Bagpipes is developed at GitHub, however the code cannot be installed from there, as the large model grid files aren’t included in the repository. The code should instead be installed with pip:
pip install bagpipes
All of the code’s Python dependencies will be automatically installed. The only non-Python dependency is the MultiNest nested sampling algorithm (used only for fitting). To install MultiNest see point 1 of the “on your own computer” section of the PyMultiNest installation instructions.
In my experience, the sequence of commands necessary to install MultiNest on a mac is as follows:
git clone https://github.com/JohannesBuchner/MultiNest brew install gcc49 export DYLD_LIBRARY_PATH="/usr/local/bin/gcc-4.9:$DYLD_LIBRARY_PATH" cd MultiNest/build cmake .. make sudo make install cd ../.. rm -r MultiNest
Bagpipes is described in Section 3 of Carnall et al. 2018, if you make use of Bagpipes, please include a citation to this work in any publications. Please note development of the code has been ongoing since this work was published, so certain parts of the code are no longer as described.
The best place to get started is by looking at the iPython notebook examples. It’s a good idea to tackle them in order as the later examples build on the earlier ones. These documentation pages contain a more complete reference guide.
Bagpipes is structured around three core classes:
A few of the excellent projects Bagpipes relies on are:
- The Bruzual & Charlot 2003 stellar population models.
- The Draine & Li 2007 dust emission models.
- The MultiNest nested sampling algorithm (Feroz et al. 2013)
- The PyMultiNest Python interface for Multinest (Buchner et al. 2014).
- The Cloudy photoionization code (Ferland et al. 2017).
- The Deepdish HDF5 loading/saving interface.