3D Markov Chain Monte Carlo code in Python