pint.sampler.EmceeSampler
- class pint.sampler.EmceeSampler(nwalkers)[source]
Bases:
MCMCSampler
Wrapper class around the emcee sampling package.
This is to let it work within the PINT Fitter framework
Be warned: emcee can only handle double precision. You will never get a longdouble response back.
Methods
chains_to_dict
(names)Convert the sampler chains to a dictionary
A safe method of getting the sampler chain, if it exists
get_initial_pos
(fitkeys, fitvals, fiterrs, ...)Get the initial positions for each walker of the sampler.
initialize_sampler
(lnpostfn, ndim)Initialize the internal sampler data.
Simple way to check if the EmceeSampler can run yet.
run_mcmc
(pos, nsteps)Wraps around emcee.run_mcmc
- initialize_sampler(lnpostfn, ndim)[source]
Initialize the internal sampler data.
This is usually done after __init__ because ndim and lnpostfn are properties of the Fitter that holds this sampler.