Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gregory Ashton
PyFstat
Commits
00a02b1b
Commit
00a02b1b
authored
Dec 07, 2016
by
Gregory Ashton
Browse files
Update to the MC runs
parent
e6370ecf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Paper/AllSkyMC/generate_data.py
View file @
00a02b1b
...
...
@@ -28,7 +28,8 @@ VF0 = VF1 = 100
DeltaF0
=
VF0
*
np
.
sqrt
(
3
)
/
(
np
.
pi
*
Tspan
)
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
run_setup
=
[((
nsteps
,
0
),
20
,
False
),
...
...
Paper/AllSkyMC/plot_data.py
View file @
00a02b1b
...
...
@@ -79,8 +79,10 @@ fig.tight_layout()
fig
.
savefig
(
'allsky_recovery.png'
)
total_number_steps
=
6
*
50.
fig
,
ax
=
plt
.
subplots
()
ax
.
hist
(
df
.
runTime
,
bins
=
20
)
ax
.
set_xlabel
(
'runTime per follow-up [s]'
)
ax
.
hist
(
df
.
runTime
/
total_number_steps
,
bins
=
50
)
ax
.
set_xlabel
(
'run-time per step [s]'
)
fig
.
tight_layout
()
fig
.
savefig
(
'runTimeHist.png'
)
Paper/AllSkyMC/runTimeHist.png
0 → 100644
View file @
00a02b1b
21.1 KB
Paper/AllSkyMC/submitfile
View file @
00a02b1b
...
...
@@ -9,4 +9,4 @@ Log=CollectedOutput/log.$(Process)
request_cpus = 1
request_memory = 16 GB
Queue
9
0
Queue
10
0
Paper/DirectedMC/plot_data.py
View file @
00a02b1b
...
...
@@ -4,6 +4,9 @@ import numpy as np
import
os
from
tqdm
import
tqdm
from
oct2py
import
octave
import
glob
filenames
=
glob
.
glob
(
"CollectedOutput/*.txt"
)
plt
.
style
.
use
(
'paper'
)
...
...
@@ -22,14 +25,17 @@ def Recovery(Tspan, Depth, twoFstar=60, detectors='H1,L1'):
def
binomialConfidenceInterval
(
N
,
K
,
confidence
=
0.95
):
cmd
=
'[fLow, fUpper] = binomialConfidenceInterval({}, {}, {})'
.
format
(
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
])
results_file_name
=
'MCResults.txt'
df
=
pd
.
read_csv
(
results_file_name
,
sep
=
' '
,
names
=
[
'depth'
,
'h0'
,
'dF0'
,
'dF1'
,
'twoF_predicted'
,
'twoF'
,
'runTime'
])
df_list
=
[]
for
fn
in
filenames
:
df
=
pd
.
read_csv
(
fn
,
sep
=
' '
,
names
=
[
'depth'
,
'h0'
,
'dF0'
,
'dF1'
,
'twoF_predicted'
,
'twoF'
,
'runTime'
])
df
[
'CLUSTER_ID'
]
=
fn
.
split
(
'_'
)[
1
]
df_list
.
append
(
df
)
df
=
pd
.
concat
(
df_list
)
twoFstar
=
60
depths
=
np
.
unique
(
df
.
depth
.
values
)
...
...
@@ -73,8 +79,11 @@ fig.tight_layout()
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
()
ax
.
hist
(
df
.
runTime
,
bins
=
50
)
ax
.
set_xlabel
(
'runTime per follow-up [s]'
)
ax
.
hist
(
df_clean
.
runTime
/
total_number_steps
,
bins
=
50
)
ax
.
set_xlabel
(
'run-time per step [s]'
)
fig
.
tight_layout
()
fig
.
savefig
(
'runTimeHist.png'
)
Paper/DirectedMC/runTimeHist.png
0 → 100644
View file @
00a02b1b
22.8 KB
Paper/allsky_recovery.png
View replaced file @
e6370ecf
View file @
00a02b1b
50.7 KB
|
W:
|
H:
50.9 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment