diff --git a/code/RDGW150914_ptemcee1.py b/code/RDGW150914_ptemcee1.py index 422dbae246d043c3e819e4130693ccf5348bdf90..5cd6ccdf28601107cf5c0b89106be31cf38580b1 100755 --- a/code/RDGW150914_ptemcee1.py +++ b/code/RDGW150914_ptemcee1.py @@ -42,7 +42,7 @@ vary_fund = True #sampler parameters npoints=1002 -nwalkers = 42 +nwalkers = 840 ntemps=12 ndim = int(4*(nmax+1)) burnin = 500 #How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit. @@ -176,8 +176,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(12) -pool.size = 12 +pool = choose_pool(64) +pool.size = 64 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]]) @@ -320,4 +320,4 @@ plt.ylabel("h") figband.savefig(rootpath+'/git/rdstackingproject/plotsmc/vary'+str(vary_fund)+'nmax='+str(nmax)+'_tshift='+str(tshift)+'_'+str(npoints)+'pt_band.pdf', format = 'pdf') #import os -#os.system('afplay /System/Library/Sounds/Submarine.aiff') \ No newline at end of file +#os.system('afplay /System/Library/Sounds/Submarine.aiff') diff --git a/code/RDGW150914_ptemcee2.py b/code/RDGW150914_ptemcee2.py index 7eea70a470eb0831ac17853be1f67c4e83eb45bd..05525f69cc414bb8e5ef12c7da93dd4ffb6b6fe5 100755 --- a/code/RDGW150914_ptemcee2.py +++ b/code/RDGW150914_ptemcee2.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -import warnings -warnings.simplefilter("ignore") #Used to suppress the RuntimeWarnings. But if you are changing the code for TESTING, MAKE SURE TO COMMENT IT OUT. +#import warnings +#warnings.simplefilter("ignore") #Used to suppress the RuntimeWarnings. But if you are changing the code for TESTING, MAKE SURE TO COMMENT IT OUT. ''' This script calculates the RDGW150914 constraints with ptemcee - specifically, the n=1 case both varying or not varying the fundamental frequencies. It produces the chain plot, corner plot, parameter constraints, and data plotted with the 1-sigma band. Since we are working specifically for the n=1 case, we also add in the corner plot the combined chain of alpha_0 and alpha_1, in order to demonstrate that the two are indistinguishable with each other. @@ -41,11 +41,11 @@ tshift=19 vary_fund = True #sampler parameters -npoints=60001 -nwalkers = 840 +npoints=102 +nwalkers = 42 ntemps=12 ndim = int(4*(nmax+1)) -burnin = 5000 #How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit. +burnin = 20 #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' @@ -174,8 +174,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(12) -pool.size = 12 +pool = choose_pool(64) +pool.size = 64 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]]) @@ -320,4 +320,4 @@ plt.ylabel("h") figband.savefig(rootpath+'/git/rdstackingproject/plotsmc/vary'+str(vary_fund)+'nmax='+str(nmax)+'_tshift='+str(tshift)+'_'+str(npoints)+'pt_band.pdf', format = 'pdf') import os -os.system('afplay /System/Library/Sounds/Submarine.aiff') \ No newline at end of file +os.system('afplay /System/Library/Sounds/Submarine.aiff') diff --git a/code/RDGW150914_ptemcee3.py b/code/RDGW150914_ptemcee3.py index c77da00d04c0dddc2147842e980a5a25e9c9a4b6..6da5bebb02b78f05581b37f1f12afa3326b50a80 100755 --- a/code/RDGW150914_ptemcee3.py +++ b/code/RDGW150914_ptemcee3.py @@ -175,8 +175,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(12) -pool.size = 12 +pool = choose_pool(64) +pool.size = 64 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 f199312a33266103d1572df1eedfedaf69aaac14..0070160f510e6870dd0451d7dc05fae525f934c9 100755 --- a/code/RDGW150914_ptemcee4.py +++ b/code/RDGW150914_ptemcee4.py @@ -175,8 +175,8 @@ def log_probability(theta): #Fit with ptemcee #Set the number of cores of your processors -pool = choose_pool(12) -pool.size = 12 +pool = choose_pool(64) +pool.size = 64 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 0358c8491dac5a8a9b425b2264e62d46fd871752..68c9559088f0eadb957cda450156e8a1518c0513 100755 --- a/code/condor_submit_RdownPtemcee1.sub +++ b/code/condor_submit_RdownPtemcee1.sub @@ -12,8 +12,8 @@ initialdir = . notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" -request_memory = 8GB -request_cpus = 4 +request_memory = 512GB +request_cpus = 64 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 f780e1f37082973a0be0d329fa06226206523816..0194194f4a56fecb6a29af88e5f2a0d6f385cf9e 100755 --- a/code/condor_submit_RdownPtemcee2.sub +++ b/code/condor_submit_RdownPtemcee2.sub @@ -12,8 +12,8 @@ initialdir = . notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" -request_memory = 8GB -request_cpus = 4 +request_memory = 512GB +request_cpus = 64 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 f9e3d38bf94434f840bc9e10c90ab0c7da1c8488..dba2384e35433b48c0627e096bfdd3a1c5963d5a 100755 --- a/code/condor_submit_RdownPtemcee3.sub +++ b/code/condor_submit_RdownPtemcee3.sub @@ -12,8 +12,8 @@ initialdir = . notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" -request_memory = 8GB -request_cpus = 4 +request_memory = 512GB +request_cpus = 64 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 2780f90f0c714bcd310e17fbeb16414abe6dbf93..b3a555b44c2cc2c20ee95f6bfa43699bcb380452 100755 --- a/code/condor_submit_RdownPtemcee4.sub +++ b/code/condor_submit_RdownPtemcee4.sub @@ -12,8 +12,8 @@ initialdir = . notify_user = rl746@cornell.edu notification = Complete arguments = "-processid $(Process)" -request_memory = 8GB -request_cpus = 4 +request_memory = 512GB +request_cpus = 64 on_exit_remove = (ExitBySignal == False) || ((ExitBySignal == True) && (ExitSignal != 11)) accounting_group = aei.dev.test_dynesty queue 1