Esempio n. 1
0
def main(Ndim = 10, n = 200, max_iter=5000):
	""" Run the sampling """
	mod   = MultiGaussModel(Ndim)
	guess = [ mod.fromPrior() for k in xrange(n) ]

	xx = np.array([ (rk.pos[0], rk.pos[1], rk.logL) for rk in guess])

	sampler = NestedSampler(mod) 
	sampler.run_nested(guess, max_iter)
	sampler.process_results()
	return xx, sampler, mod
Esempio n. 2
0
def lighthouse_main(n = 100, max_iter=2000):
	""" Run the sampling """
	#n=100                 # number of objects
	#max_iter = 2000         # number of iterations
	mod = LightHouseModel()
	guess = [ mod.fromPrior() for k in xrange(n) ]

	xx = np.array([ (rk.pos[0], rk.pos[1], rk.logL) for rk in guess])

	sampler = NestedSampler(mod) 
	sampler.run_nested(guess, max_iter)
	sampler.process_results()
	return xx, sampler, mod
Esempio n. 3
0
def lighthouse_main(n=100, max_iter=2000):
    """ Run the sampling """
    #n=100                 # number of objects
    #max_iter = 2000         # number of iterations
    mod = LightHouseModel()
    guess = [mod.fromPrior() for k in xrange(n)]

    xx = np.array([(rk.pos[0], rk.pos[1], rk.logL) for rk in guess])

    sampler = NestedSampler(mod)
    sampler.run_nested(guess, max_iter)
    sampler.process_results()
    return xx, sampler, mod