Skip to content
Snippets Groups Projects
Commit 01ee3baa authored by Rayne Liu's avatar Rayne Liu
Browse files

Use 1 core first

parent bea8ee52
No related branches found
No related tags found
No related merge requests found
......@@ -33,18 +33,18 @@ import random
#tshift: time shift after the strain peak
#vary_fund: whether you vary the fundamental frequency. Works in the model_dv function.
rootpath= "/Users/RayneLiu/git/rdstackingproject"#"/work/rayne.liu/git/rdstackingproject"
rootpath= "/work/rayne.liu/git/rdstackingproject"#"/Users/RayneLiu/git/rdstackingproject"
nmax=1
tshift=10
vary_fund = True
#sampler parameters
npoints = 100
nwalkers = 50
npoints = 10
nwalkers = 20
ntemps=16
dim = nmax+1
ndim = 4*dim
burnin = 50 #How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit.
burnin = 5 #How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit.
#This is trivial but often forgotten: this cannot be more than npoints! I usually use half the points.
numbins = 42 #corner plot parameter - how many bins you want
datacolor = '#105670' #'#4fa3a7'
......@@ -204,10 +204,10 @@ def log_probability(theta):
#This cell uses the tshift=10 results
#Set the number of cores of your processors
pool = choose_pool(8)
pool.size = 8
pool = choose_pool(1)
pool.size = 1
np.random.seed(42)
pos = np.array([random.uniform(-0.05,0.05), random.uniform(-0.25,-0.15), random.uniform(0.,0.8), random.uniform(0.5,1.), random.uniform(0.4,0.8), random.uniform(0.5, 1.), random.uniform(0.5, 0.6), random.uniform(0.5, 0.6)])
pos = np.array([random.uniform(-0.02,0.02), random.uniform(-0.1,0.15), random.uniform(-0.2.,0.08), random.uniform(0.,1.), random.uniform(0.4,0.8), random.uniform(0.5, 1.), random.uniform(0.5, 0.6), random.uniform(0.5, 0.6)])
pos = list(pos)
pos += 1e-5 * np.random.randn(ntemps, nwalkers, ndim)
sampler = ptemcee.Sampler(nwalkers, ndim, log_likelihood, log_prior, ntemps=ntemps, pool=pool)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment