This is a total rewrite of the ptemcee implementation. Originally, we had based
emcee, but emcee has changed quite significantly and I anticipate it will be easier to maintain the two uncoupled from hereon. This adds sufficient functionality to ptemcee for it to be usable on gravitational wave events. Here is a summary of the changes
- Add automatic convergence to the user interface: users now specify
nsamplesas a the primary input. The sampler will run until it has
nsamplesindependent samples from the posterior. The user now has access to a reduced set of the ptemcee full functionality (e.g.
iterations), but this isn't required given the convergence checking.
- Add diagnostic plots for the autocorrelation time, e.g.:
- Improve the traceplots to show the convergence and the current posterior samples
- Add dumping of posterior samples to a
- Add multi-processing support, tested on a 16 core machine to give a significant reduction in compute time (exact timings yet to be calculated).
- Add regular 10-minute checkpointing
Note, I have intentionally put much of the primary logic into functions rather than class methods. This is because eventually we should port changes to parallel bilby and potentially other samplers and this is most easily done from a functional interface (at least for parallel bilby where inheritance causes issues with the parallel aspects).