Commit 5b26dc73 authored by Siyuan Chen's avatar Siyuan Chen

update model galaxy ptmcmc sampler to write more output

parent 508d1317
......@@ -93,8 +93,8 @@ def log_likelihood(par):
logL = 0.
for i in range(numberOfFrequencyBinsToUse):
logL += KDEs[i].logpdf(model[i])
print(model,logL)
logL += KDEs[i].logpdf(model[i]) - 0.5*np.log10(2.*np.pi)
#print(model,logL)
return logL[0]
......@@ -140,10 +140,10 @@ KDEs = makeKDEs(samples, numberOfFrequencyBinsToUse)
x0 = np.array([-2.8,-0.2,11.25,-1.25,0.,0.025,0.8,0.,0.,1.,0.,-0.5,0.,8.25,1.,0.4,0.5,0.])
ndim = len(x0)
cov = np.diag(np.ones(ndim) * 0.01**2)
N = 1000 # 1000000
N = 1000000
sampler = ptmcmc(ndim, log_likelihood, log_prior, cov, outDir='./output', resume=False)
sampler.sample(x0, N, SCAMweight=30, AMweight=15, DEweight=50)
sampler.sample(x0, N, SCAMweight=30, AMweight=15, DEweight=50, isave=100)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment