From 01ee3baa1627290f8233b29778e25f2c671c6b00 Mon Sep 17 00:00:00 2001 From: Rayne Liu <rl746@cornell.edu> Date: Sat, 3 Oct 2020 03:04:15 +0000 Subject: [PATCH] Use 1 core first --- code/NR_Interpolate-0001_t_10M.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/NR_Interpolate-0001_t_10M.py b/code/NR_Interpolate-0001_t_10M.py index 7d58176..048855d 100755 --- a/code/NR_Interpolate-0001_t_10M.py +++ b/code/NR_Interpolate-0001_t_10M.py @@ -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) -- GitLab