From c7093866311836abe5de540902b0d300e54524ea Mon Sep 17 00:00:00 2001 From: Rayne Liu <rl746@cornell.edu> Date: Tue, 18 Aug 2020 10:41:40 -0400 Subject: [PATCH] Adjusted ranges, changed number of cpus requested --- code/RDGW150914_ptemcee1.py | 18 +++++++++--------- code/RDGW150914_ptemcee2.py | 20 ++++++++++---------- code/RDGW150914_ptemcee3.py | 20 ++++++++++---------- code/RDGW150914_ptemcee4.py | 20 ++++++++++---------- code/condor_submit_RdownPtemcee1.sub | 2 +- code/condor_submit_RdownPtemcee2.sub | 2 +- code/condor_submit_RdownPtemcee3.sub | 2 +- code/condor_submit_RdownPtemcee4.sub | 2 +- 8 files changed, 43 insertions(+), 43 deletions(-) diff --git a/code/RDGW150914_ptemcee1.py b/code/RDGW150914_ptemcee1.py index cbd336f..d8ee047 100755 --- a/code/RDGW150914_ptemcee1.py +++ b/code/RDGW150914_ptemcee1.py @@ -41,9 +41,9 @@ tshift=3.6 vary_fund = True #sampler parameters -npoints=13700 -nwalkers = 840 -ntemps=12 +npoints=20000 +nwalkers = 1000 +ntemps=16 ndim = int(4*(nmax+1)) burnin = 4200 #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! Usually 1/5~1/4 npoints is what I observe. @@ -139,15 +139,15 @@ def log_prior(theta): y_0 = theta[6] y_1 = theta[7] - if all([nmax == 1, 0 <= tshift <= 5, vary_fund == True, -0.8 <= a_0 <= 0.8, -1.0 <= a_1 <= 1.0, -2.0 <= b_0 <= 9.0, -2.0 <= b_1 <= 21.0, 0 <= x_0 <= 1.6, 0 <= x_1 <= 1.6, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + if all([nmax == 1, 0 <= tshift <= 5, vary_fund == True, -1.2 <= a_0 <= 1.2, -1.5 <= a_1 <= 1.5, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 21.0, 0 <= x_0 <= 1.6, 0 <= x_1 <= 1.4, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 - elif all([nmax == 1, tshift == 19, vary_fund == True, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -2.0 <= b_0 <= 10.0, -2.0 <= b_1 <= 10.0, 0 <= x_0 <= 1.0, 0 <= x_1 <= 1.2, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + elif all([nmax == 1, tshift == 19, vary_fund == True, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -9.0 <= b_0 <= 20.0, -9.0 <= b_1 <= 25.0, 0 <= x_0 <= 0.8, 0 <= x_1 <= 0.9, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 #PAY EXTRA ATTENTION TO THESE TWO CASES, SINCE WE SHIFTED y_0. THE CORNER PLOTS LABELS NEED TO BE TREATED WITH CARE. - elif all([nmax == 1, 0 <= tshift <= 5, vary_fund == False, -1.0 <= a_0 <= 1.0, -1.5 <= a_1 <= 1.5, -1.0 <= b_0 <= 1.0, -3.0 <= b_1 <= 12.0, 0 <= x_0 <= 2.0, 0 <= x_1 <= 2.4, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi,]): + elif all([nmax == 1, 0 <= tshift <= 5, vary_fund == False, -10.0 <= a_0 <= 10.0, -1.5 <= a_1 <= 1.5, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 16.0, 0 <= x_0 <= 2.2, 0 <= x_1 <= 2.5, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi,]): return 0.0 - elif all([nmax == 1, tshift == 19, vary_fund == False, -1.0 <= a_0 <= 1.0, -10.0 <= a_1 <= 10.0, -1.0 <= b_0 <= 1.0, -3.0 <= b_1 <= 10.0, 0 <= x_0 <= 0.6, 0 <= x_1 <= 1.2, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + elif all([nmax == 1, tshift == 19, vary_fund == False, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 32.0, 0 <= x_0 <= 0.6, 0 <= x_1 <= 1.0, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 return -np.inf @@ -176,8 +176,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(16) -pool.size = 16 +pool = choose_pool(32) +pool.size = 32 vary_param = float(vary_fund) np.random.seed(42) pos = np.array([[random.uniform(-0.1,0.1), random.uniform(-0.1,0.1), 4.28313743e-01, random.uniform(2.5, 2.6) + (1-vary_param) * np.pi]]) diff --git a/code/RDGW150914_ptemcee2.py b/code/RDGW150914_ptemcee2.py index 5b55fe7..9cbefb1 100755 --- a/code/RDGW150914_ptemcee2.py +++ b/code/RDGW150914_ptemcee2.py @@ -41,11 +41,11 @@ tshift=19 vary_fund = True #sampler parameters -npoints=13700 -nwalkers = 840 -ntemps=12 +npoints=20000 +nwalkers = 1000 +ntemps=16 ndim = int(4*(nmax+1)) -burnin = 4200 #How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit. +burnin = 4200 #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! Usually 1/5~1/4 npoints is what I observe. numbins = 42 #corner plot parameter - how many bins you want datacolor = '#105670' #'#4fa3a7' @@ -139,15 +139,15 @@ def log_prior(theta): y_0 = theta[6] y_1 = theta[7] - if all([nmax == 1, 0 <= tshift <= 5, vary_fund == True, -0.8 <= a_0 <= 0.8, -1.0 <= a_1 <= 1.0, -2.0 <= b_0 <= 9.0, -2.0 <= b_1 <= 21.0, 0 <= x_0 <= 1.6, 0 <= x_1 <= 1.6, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + if all([nmax == 1, 0 <= tshift <= 5, vary_fund == True, -1.2 <= a_0 <= 1.2, -1.5 <= a_1 <= 1.5, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 21.0, 0 <= x_0 <= 1.6, 0 <= x_1 <= 1.4, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 - elif all([nmax == 1, tshift == 19, vary_fund == True, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -2.0 <= b_0 <= 10.0, -2.0 <= b_1 <= 10.0, 0 <= x_0 <= 1.0, 0 <= x_1 <= 1.2, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + elif all([nmax == 1, tshift == 19, vary_fund == True, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -9.0 <= b_0 <= 20.0, -9.0 <= b_1 <= 25.0, 0 <= x_0 <= 0.8, 0 <= x_1 <= 0.9, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 #PAY EXTRA ATTENTION TO THESE TWO CASES, SINCE WE SHIFTED y_0. THE CORNER PLOTS LABELS NEED TO BE TREATED WITH CARE. - elif all([nmax == 1, 0 <= tshift <= 5, vary_fund == False, -1.0 <= a_0 <= 1.0, -1.5 <= a_1 <= 1.5, -1.0 <= b_0 <= 1.0, -3.0 <= b_1 <= 12.0, 0 <= x_0 <= 2.0, 0 <= x_1 <= 2.4, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi,]): + elif all([nmax == 1, 0 <= tshift <= 5, vary_fund == False, -10.0 <= a_0 <= 10.0, -1.5 <= a_1 <= 1.5, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 16.0, 0 <= x_0 <= 2.2, 0 <= x_1 <= 2.5, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi,]): return 0.0 - elif all([nmax == 1, tshift == 19, vary_fund == False, -1.0 <= a_0 <= 1.0, -10.0 <= a_1 <= 10.0, -1.0 <= b_0 <= 1.0, -3.0 <= b_1 <= 10.0, 0 <= x_0 <= 0.6, 0 <= x_1 <= 1.2, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + elif all([nmax == 1, tshift == 19, vary_fund == False, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 32.0, 0 <= x_0 <= 0.6, 0 <= x_1 <= 1.0, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 return -np.inf @@ -177,8 +177,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(16) -pool.size = 16 +pool = choose_pool(32) +pool.size = 32 vary_param = float(vary_fund) np.random.seed(42) pos = np.array([[random.uniform(-0.1,0.1), random.uniform(-0.1,0.1), 4.28313743e-01, random.uniform(2.5, 2.6) + (1-vary_param) * np.pi]]) diff --git a/code/RDGW150914_ptemcee3.py b/code/RDGW150914_ptemcee3.py index 82c6273..a596e09 100755 --- a/code/RDGW150914_ptemcee3.py +++ b/code/RDGW150914_ptemcee3.py @@ -42,11 +42,11 @@ tshift=0 vary_fund = False #sampler parameters -npoints=13700 -nwalkers = 840 -ntemps=12 +npoints=20000 +nwalkers = 1000 +ntemps=16 ndim = int(4*(nmax+1)) -burnin = 4200 #How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit. +burnin = 4200 #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! Usually 1/5~1/4 npoints is what I observe. numbins = 42 #corner plot parameter - how many bins you want datacolor = '#105670' #'#4fa3a7' @@ -140,15 +140,15 @@ def log_prior(theta): y_0 = theta[6] y_1 = theta[7] - if all([nmax == 1, 0 <= tshift <= 5, vary_fund == True, -0.8 <= a_0 <= 0.8, -1.0 <= a_1 <= 1.0, -2.0 <= b_0 <= 9.0, -2.0 <= b_1 <= 21.0, 0 <= x_0 <= 1.6, 0 <= x_1 <= 1.6, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + if all([nmax == 1, 0 <= tshift <= 5, vary_fund == True, -1.2 <= a_0 <= 1.2, -1.5 <= a_1 <= 1.5, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 21.0, 0 <= x_0 <= 1.6, 0 <= x_1 <= 1.4, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 - elif all([nmax == 1, tshift == 19, vary_fund == True, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -2.0 <= b_0 <= 10.0, -2.0 <= b_1 <= 10.0, 0 <= x_0 <= 1.0, 0 <= x_1 <= 1.2, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + elif all([nmax == 1, tshift == 19, vary_fund == True, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -9.0 <= b_0 <= 20.0, -9.0 <= b_1 <= 25.0, 0 <= x_0 <= 0.8, 0 <= x_1 <= 0.9, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 #PAY EXTRA ATTENTION TO THESE TWO CASES, SINCE WE SHIFTED y_0. THE CORNER PLOTS LABELS NEED TO BE TREATED WITH CARE. - elif all([nmax == 1, 0 <= tshift <= 5, vary_fund == False, -1.0 <= a_0 <= 1.0, -1.5 <= a_1 <= 1.5, -1.0 <= b_0 <= 1.0, -3.0 <= b_1 <= 12.0, 0 <= x_0 <= 2.0, 0 <= x_1 <= 2.4, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi,]): + elif all([nmax == 1, 0 <= tshift <= 5, vary_fund == False, -10.0 <= a_0 <= 10.0, -1.5 <= a_1 <= 1.5, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 16.0, 0 <= x_0 <= 2.2, 0 <= x_1 <= 2.5, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi,]): return 0.0 - elif all([nmax == 1, tshift == 19, vary_fund == False, -1.0 <= a_0 <= 1.0, -10.0 <= a_1 <= 10.0, -1.0 <= b_0 <= 1.0, -3.0 <= b_1 <= 10.0, 0 <= x_0 <= 0.6, 0 <= x_1 <= 1.2, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + elif all([nmax == 1, tshift == 19, vary_fund == False, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 32.0, 0 <= x_0 <= 0.6, 0 <= x_1 <= 1.0, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 return -np.inf @@ -178,8 +178,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(16) -pool.size = 16 +pool = choose_pool(32) +pool.size = 32 vary_param = float(vary_fund) np.random.seed(42) pos = np.array([[random.uniform(-0.1,0.1), random.uniform(-0.1,0.1), 4.28313743e-01, random.uniform(2.5, 2.6) + (1-vary_param) * np.pi]]) diff --git a/code/RDGW150914_ptemcee4.py b/code/RDGW150914_ptemcee4.py index 3a5fa10..8dc3a3a 100755 --- a/code/RDGW150914_ptemcee4.py +++ b/code/RDGW150914_ptemcee4.py @@ -42,11 +42,11 @@ tshift=19 vary_fund = False #sampler parameters -npoints=13700 -nwalkers = 840 -ntemps=12 +npoints=20000 +nwalkers = 1000 +ntemps=16 ndim = int(4*(nmax+1)) -burnin = 4200 #How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit. +burnin = 4200 #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! Usually 1/5~1/4 npoints is what I observe. numbins = 42 #corner plot parameter - how many bins you want datacolor = '#105670' #'#4fa3a7' @@ -140,15 +140,15 @@ def log_prior(theta): y_0 = theta[6] y_1 = theta[7] - if all([nmax == 1, 0 <= tshift <= 5, vary_fund == True, -0.8 <= a_0 <= 0.8, -1.0 <= a_1 <= 1.0, -2.0 <= b_0 <= 9.0, -2.0 <= b_1 <= 21.0, 0 <= x_0 <= 1.6, 0 <= x_1 <= 1.6, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + if all([nmax == 1, 0 <= tshift <= 5, vary_fund == True, -1.2 <= a_0 <= 1.2, -1.5 <= a_1 <= 1.5, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 21.0, 0 <= x_0 <= 1.6, 0 <= x_1 <= 1.4, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 - elif all([nmax == 1, tshift == 19, vary_fund == True, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -2.0 <= b_0 <= 10.0, -2.0 <= b_1 <= 10.0, 0 <= x_0 <= 1.0, 0 <= x_1 <= 1.2, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + elif all([nmax == 1, tshift == 19, vary_fund == True, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -9.0 <= b_0 <= 20.0, -9.0 <= b_1 <= 25.0, 0 <= x_0 <= 0.8, 0 <= x_1 <= 0.9, 0 <= y_0 <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 #PAY EXTRA ATTENTION TO THESE TWO CASES, SINCE WE SHIFTED y_0. THE CORNER PLOTS LABELS NEED TO BE TREATED WITH CARE. - elif all([nmax == 1, 0 <= tshift <= 5, vary_fund == False, -1.0 <= a_0 <= 1.0, -1.5 <= a_1 <= 1.5, -1.0 <= b_0 <= 1.0, -3.0 <= b_1 <= 12.0, 0 <= x_0 <= 2.0, 0 <= x_1 <= 2.4, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi,]): + elif all([nmax == 1, 0 <= tshift <= 5, vary_fund == False, -10.0 <= a_0 <= 10.0, -1.5 <= a_1 <= 1.5, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 16.0, 0 <= x_0 <= 2.2, 0 <= x_1 <= 2.5, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi,]): return 0.0 - elif all([nmax == 1, tshift == 19, vary_fund == False, -1.0 <= a_0 <= 1.0, -10.0 <= a_1 <= 10.0, -1.0 <= b_0 <= 1.0, -3.0 <= b_1 <= 10.0, 0 <= x_0 <= 0.6, 0 <= x_1 <= 1.2, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): + elif all([nmax == 1, tshift == 19, vary_fund == False, -10.0 <= a_0 <= 10.0, -10.0 <= a_1 <= 10.0, -9.0 <= b_0 <= 9.0, -10.0 <= b_1 <= 32.0, 0 <= x_0 <= 0.6, 0 <= x_1 <= 1.0, 0 <= y_0-np.pi <= 2*np.pi, 0 <= y_1 <= 2*np.pi]): return 0.0 return -np.inf @@ -178,8 +178,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(16) -pool.size = 16 +pool = choose_pool(32) +pool.size = 32 vary_param = float(vary_fund) np.random.seed(42) pos = np.array([[random.uniform(-0.1,0.1), random.uniform(-0.1,0.1), 4.28313743e-01, random.uniform(2.5, 2.6) + (1-vary_param) * np.pi]]) diff --git a/code/condor_submit_RdownPtemcee1.sub b/code/condor_submit_RdownPtemcee1.sub index 75b33f1..a13dfe3 100755 --- a/code/condor_submit_RdownPtemcee1.sub +++ b/code/condor_submit_RdownPtemcee1.sub @@ -13,7 +13,7 @@ notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" request_memory = 232GB -request_cpus = 16 +request_cpus = 32 on_exit_remove = (ExitBySignal == False) || ((ExitBySignal == True) && (ExitSignal != 11)) accounting_group = aei.dev.test_dynesty queue 1 diff --git a/code/condor_submit_RdownPtemcee2.sub b/code/condor_submit_RdownPtemcee2.sub index 65bde85..89f356d 100755 --- a/code/condor_submit_RdownPtemcee2.sub +++ b/code/condor_submit_RdownPtemcee2.sub @@ -13,7 +13,7 @@ notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" request_memory = 232GB -request_cpus = 16 +request_cpus = 32 on_exit_remove = (ExitBySignal == False) || ((ExitBySignal == True) && (ExitSignal != 11)) accounting_group = aei.dev.test_dynesty queue 1 diff --git a/code/condor_submit_RdownPtemcee3.sub b/code/condor_submit_RdownPtemcee3.sub index 7c090eb..270b997 100755 --- a/code/condor_submit_RdownPtemcee3.sub +++ b/code/condor_submit_RdownPtemcee3.sub @@ -13,7 +13,7 @@ notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" request_memory = 232GB -request_cpus = 16 +request_cpus = 32 on_exit_remove = (ExitBySignal == False) || ((ExitBySignal == True) && (ExitSignal != 11)) accounting_group = aei.dev.test_dynesty queue 1 diff --git a/code/condor_submit_RdownPtemcee4.sub b/code/condor_submit_RdownPtemcee4.sub index f3567a9..93fbceb 100755 --- a/code/condor_submit_RdownPtemcee4.sub +++ b/code/condor_submit_RdownPtemcee4.sub @@ -13,7 +13,7 @@ notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" request_memory = 232GB -request_cpus = 16 +request_cpus = 32 on_exit_remove = (ExitBySignal == False) || ((ExitBySignal == True) && (ExitSignal != 11)) accounting_group = aei.dev.test_dynesty queue 1 -- GitLab