pint.scripts.event_optimize.run_sampler_autocorr
- pint.scripts.event_optimize.run_sampler_autocorr(sampler, pos, nsteps, burnin, csteps=100, crit1=10)[source]
Runs the sampler and checks for chain convergence. Return the converged sampler and the mean autocorrelation time per 100 steps :param Sampler: The Emcee Ensemble Sampler :param pos: The Initial positions of the walkers :param nsteps: The number of integration steps :type nsteps: int :param csteps: The interval at which the autocorrelation time is computed. :type csteps: int :param crit1: The ratio of chain length to autocorrelation time to satisfy convergence :type crit1: int
- Return type:
The sampler and the mean autocorrelation times
Note
The function checks for convergence of the chains every specified number of steps. The criteria to check for convergence is:
the chain has to be longer than the specified ratio times the estimated autocorrelation time
the change in the estimated autocorrelation time is less than 1%