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
Rayne Liu
RDStackingProject
Commits
4a4fa608
Commit
4a4fa608
authored
Oct 04, 2020
by
Rayne Liu
Browse files
Fixed some bugs
parent
27479b6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
code/NR_Interpolate-0001_t_10M.py
View file @
4a4fa608
...
...
@@ -10,6 +10,8 @@
import
numpy
as
np
from
scipy
import
interpolate
import
corner
import
os
os
.
environ
[
'MPLCONFIGDIR'
]
=
'/home/rayne.liu/.config/matplotlib'
import
matplotlib.pyplot
as
plt
from
matplotlib.ticker
import
MaxNLocator
from
matplotlib
import
rc
...
...
@@ -130,7 +132,7 @@ plt.plot(timespan_new, gwdatanew_re, "b", alpha=0.3, lw=2, label='After_re')
plt
.
plot
(
timespan
,
gwdata_im
,
alpha
=
0.3
,
lw
=
2
,
label
=
'Before_im'
)
plt
.
plot
(
timespan_new
,
gwdatanew_im
,
alpha
=
0.3
,
lw
=
2
,
label
=
'After_im'
)
plt
.
legend
()
figtest
.
savefig
(
rootpath
+
'/plotsmc/001_interpolated_datatest.png'
,
format
=
'png'
,
bbox_inches
=
'tight'
,
dpi
=
300
)
figtest
.
savefig
(
rootpath
+
'/plotsmc/00
0
1_interpolated_datatest.png'
,
format
=
'png'
,
bbox_inches
=
'tight'
,
dpi
=
300
)
# ### Now the interpolation seems nice according to what we have above...let's start sampling!
...
...
@@ -207,7 +209,7 @@ def log_probability(theta):
pool
=
choose_pool
(
1
)
pool
.
size
=
1
np
.
random
.
seed
(
42
)
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
=
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
)
...
...
@@ -276,4 +278,4 @@ for yi in range(naxes):
ax
.
axvline
(
median
[
xi
],
color
=
mediancolor
)
ax
.
axhline
(
median
[
yi
],
color
=
mediancolor
)
ax
.
plot
(
median
[
xi
],
median
[
yi
],
color
=
mediancolor
,
marker
=
's'
)
figcorn
.
savefig
(
rootpath
+
'/plotsmc/0001_10M_interpolated_cornerplot.png'
,
format
=
'png'
,
bbox_inches
=
'tight'
,
dpi
=
300
)
\ No newline at end of file
figcorn
.
savefig
(
rootpath
+
'/plotsmc/0001_10M_interpolated_cornerplot.png'
,
format
=
'png'
,
bbox_inches
=
'tight'
,
dpi
=
300
)
code/condor_submit_Interpolate0001_t_10M.sub
View file @
4a4fa608
...
...
@@ -12,7 +12,7 @@ initialdir = .
notify_user = rl746@cornell.edu
notification = Complete
arguments = "-processid $(Process)"
request_memory =
128
GB
request_memory =
64
GB
request_cpus = 1
on_exit_remove = (ExitBySignal == False) || ((ExitBySignal == True) && (ExitSignal != 11))
accounting_group = aei.dev.test_dynesty
...
...
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