Commit 00a02b1b authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Update to the MC runs

parent e6370ecf
...@@ -28,7 +28,8 @@ VF0 = VF1 = 100 ...@@ -28,7 +28,8 @@ VF0 = VF1 = 100
DeltaF0 = VF0 * np.sqrt(3)/(np.pi*Tspan) DeltaF0 = VF0 * np.sqrt(3)/(np.pi*Tspan)
DeltaF1 = VF1 * np.sqrt(45/4.)/(np.pi*Tspan**2) DeltaF1 = VF1 * np.sqrt(45/4.)/(np.pi*Tspan**2)
depths = np.linspace(100, 400, 7) #depths = np.linspace(100, 400, 7)
depths = [50, 75]
nsteps = 50 nsteps = 50
run_setup = [((nsteps, 0), 20, False), run_setup = [((nsteps, 0), 20, False),
......
...@@ -79,8 +79,10 @@ fig.tight_layout() ...@@ -79,8 +79,10 @@ fig.tight_layout()
fig.savefig('allsky_recovery.png') fig.savefig('allsky_recovery.png')
total_number_steps = 6 * 50.
fig, ax = plt.subplots() fig, ax = plt.subplots()
ax.hist(df.runTime, bins=20) ax.hist(df.runTime/total_number_steps, bins=50)
ax.set_xlabel('runTime per follow-up [s]') ax.set_xlabel('run-time per step [s]')
fig.tight_layout()
fig.savefig('runTimeHist.png') fig.savefig('runTimeHist.png')
...@@ -9,4 +9,4 @@ Log=CollectedOutput/log.$(Process) ...@@ -9,4 +9,4 @@ Log=CollectedOutput/log.$(Process)
request_cpus = 1 request_cpus = 1
request_memory = 16 GB request_memory = 16 GB
Queue 90 Queue 100
...@@ -4,6 +4,9 @@ import numpy as np ...@@ -4,6 +4,9 @@ import numpy as np
import os import os
from tqdm import tqdm from tqdm import tqdm
from oct2py import octave from oct2py import octave
import glob
filenames = glob.glob("CollectedOutput/*.txt")
plt.style.use('paper') plt.style.use('paper')
...@@ -22,14 +25,17 @@ def Recovery(Tspan, Depth, twoFstar=60, detectors='H1,L1'): ...@@ -22,14 +25,17 @@ def Recovery(Tspan, Depth, twoFstar=60, detectors='H1,L1'):
def binomialConfidenceInterval(N, K, confidence=0.95): def binomialConfidenceInterval(N, K, confidence=0.95):
cmd = '[fLow, fUpper] = binomialConfidenceInterval({}, {}, {})'.format( cmd = '[fLow, fUpper] = binomialConfidenceInterval({}, {}, {})'.format(
N, K, confidence) N, K, confidence)
[l, u] = octave.eval(cmd, verbose=False, return_both=True)[0].split('\n') [l, u] = octave.eval(cmd, verbose=False, return_both=True)[0].split('\n')
return float(l.split('=')[1]), float(u.split('=')[1]) return float(l.split('=')[1]), float(u.split('=')[1])
results_file_name = 'MCResults.txt' df_list = []
for fn in filenames:
df = pd.read_csv( df = pd.read_csv(
results_file_name, sep=' ', names=['depth', 'h0', 'dF0', 'dF1', fn, sep=' ', names=['depth', 'h0', 'dF0', 'dF1', 'twoF_predicted',
'twoF_predicted', 'twoF', 'runTime']) 'twoF', 'runTime'])
df['CLUSTER_ID'] = fn.split('_')[1]
df_list.append(df)
df = pd.concat(df_list)
twoFstar = 60 twoFstar = 60
depths = np.unique(df.depth.values) depths = np.unique(df.depth.values)
...@@ -73,8 +79,11 @@ fig.tight_layout() ...@@ -73,8 +79,11 @@ fig.tight_layout()
fig.savefig('directed_recovery.png') fig.savefig('directed_recovery.png')
total_number_steps = 5*20.
df_clean = df[df.CLUSTER_ID == '969049'] # Hack due to a change in the code
fig, ax = plt.subplots() fig, ax = plt.subplots()
ax.hist(df.runTime, bins=50) ax.hist(df_clean.runTime/total_number_steps, bins=50)
ax.set_xlabel('runTime per follow-up [s]') ax.set_xlabel('run-time per step [s]')
fig.tight_layout()
fig.savefig('runTimeHist.png') fig.savefig('runTimeHist.png')
Paper/allsky_recovery.png

50.7 KB | W: | H:

Paper/allsky_recovery.png

50.9 KB | W: | H:

Paper/allsky_recovery.png
Paper/allsky_recovery.png
Paper/allsky_recovery.png
Paper/allsky_recovery.png
  • 2-up
  • Swipe
  • Onion skin
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