A modular MCMC code designed for computationally intensive likelihood functions. It is designed to run on shared memory machines, with the likelihood function running in parallel whilst a single thread takes care of administrative functions and postprocessing. All functions, including likelihood calculation, are dynamically linked.
My astrophysics research uses Bayesian methods to examine galaxies, and I require a powerful and flexible MCMC code to do this. The work that has led to the development of RainfallMCMC is covered in the following papers:
Dark matter in disc galaxies - I. A Markov Chain Monte Carlo method and application to DDO 154
Dark matter in disc galaxies - II. Density profiles as constraints on feedback scenarios
- Modular design: Likelihood calculation and other functions are dynamically linked
- Suite of output functions: Produces histograms, contour plots, and subsamples of chains
- Portability: Compiles and runs on Mac OS X and all tested versions of Linux out of the box
Currently, only the serial version of the code is being tested.
The only implementation of MCMC available is the Metropolis-Hastings algorithm.
At the moment the focus is on constructing a set of utility modules, such as ones providing adaptive step size.
- Clone the repository
- In the
RainfallMCMC
folder, typemake
- Type
./rainfall test.ini
- The results of the MCMC run will be in the newly created subfolder
output
- Use likelihood.cpp as a template to create your own likelihood functions, and test.ini as a parameter file template