[AstroPy] Questions re: Markov Chain Monte Carlo

Peter Erwin erwin@mpe.mpg...
Tue Jun 4 04:54:56 CDT 2013

Hi Eric,

Whoops -- just realized that my proposed algorithm will occasionally return dummy chi^2 values rather than waiting until another subprocess has finished, which isn't what you want, so replace my "step 2" with:

	2. If it's already there, just take the corresponding chi^2 value from the dictionary, or else wait for the other subprocess to finish calculations if it's working on these parameter values
	currentChi2 = chi2ValuesDict[(Mdisk, Rdisk, T, ...)]
	if chi2ValuesDict[(Mdisk, Rdisk, T, ...)] == 0:
		# another subprocess is working on this set of parameter values, so wait until it's done -- e.g., sleep for 1s and then re-check to see if the stored value is no longer 0...
		return currentChi2



Peter Erwin                   Max-Planck-Insitute for Extraterrestrial 
erwin@mpe.mpg.de              Physics, Giessenbachstrasse
tel. +49 (0)176 2481 7713     85748 Garching, Germany
fax  +49 (0)89 30000 3495     http://www.mpe.mpg.de/~erwin

More information about the AstroPy mailing list