Commit 4a4fa608 authored by Rayne Liu's avatar Rayne Liu
Browse files

Fixed some bugs

parent 27479b6c
......@@ -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/0001_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)
......@@ -12,7 +12,7 @@ initialdir = .
notify_user = rl746@cornell.edu
notification = Complete
arguments = "-processid $(Process)"
request_memory = 128GB
request_memory = 64GB
request_cpus = 1
on_exit_remove = (ExitBySignal == False) || ((ExitBySignal == True) && (ExitSignal != 11))
accounting_group = aei.dev.test_dynesty
......
Supports Markdown
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