It's quite possible I haven't read enough to know this, but is there a way to enforce priors or limits on fitted parameters (eg, positive temperature or distance)? At the moment I'm just having my likelihood function return ludicrously low probabilities if any walkers stray into unphysical territory, but is there a better way? It only takes one thrown NaN from one stray walker to foul up subsequent analysis, so I'd just as soon set certain regions of the parameter space as off-limits from the beginning.
The best way to do this is to just return -numpy.inf from you lnposterior function whenever the proposal position is in the out of bounds region. This is exactly the same operation as having a prior probability of zero in that region and the sampler should deal with that without any problems.
Let me know if you run in to any other problems.
That makes sense, and seems to be working well. Thanks Dan.