CosmoFit.EnsembleSampler

class CosmoFit.EnsembleSampler(moves=None)[source]

Bases: BaseSampler

emcee.EnsembleSampler backend: affine-invariant ensemble MCMC, the default (and currently only) way Fitter.run_mcmc explores a posterior.

Parameters:

moves (emcee move or list of (move, weight), optional) – Passed straight through to emcee.EnsembleSampler. Lets the proposal strategy be swapped out (e.g. emcee.moves.DEMove() for strongly correlated posteriors) without changing anything else about the fit. Defaults to emcee’s own default (StretchMove).

__init__(moves=None)[source]

Methods

__init__([moves])

run(logpost, prior, theta0[, nwalkers, ...])

Initialize walkers around theta0 and run the sampler.