Skip to content
Snippets Groups Projects
Commit 398e3b84 authored by Jonah Kanner's avatar Jonah Kanner :nerd:
Browse files

Fixed minor bugs in plot_evidence script

git-svn-id: https://svn.ligo.caltech.edu/svn/bayeswave/trunk@77 c56465c9-8126-4a4f-9d7d-ac845eff4865
parent 4dfe7db5
No related branches found
No related tags found
No related merge requests found
......@@ -153,6 +153,8 @@ for job in dirList:
# -- Return to top level directory, continue through list of jobs
os.chdir(topdir)
# -- Need to set the matplotlib figure size
plt.rcParams['figure.figsize'] = 8, 6
# -------------
# Make PP plot
......@@ -161,7 +163,6 @@ injconArray = np.array(skydict['injcontour'])
xtics = np.arange(0,1.01,0.01)
numFound = np.array( [ (injconArray <= xvalue).sum() for xvalue in xtics] )
fracFound = 1.0*numFound / injconArray.size
plt.figure()
plt.plot(xtics, fracFound)
plt.xlabel('Confidence Region')
plt.ylabel('Fraction of injections found')
......@@ -271,7 +272,7 @@ skyTable.write('<table>')
skyTable.write('<tr><b><td>SNR <td>Job <td>50% Area <td>90% Area <td>Found Contour</b></tr>')
# -- Make tuple, sort by SNR
raw_eventList = zip(snrList, area50List, area90List, injcontourList, goodJobList)
raw_eventList = zip(snrList, area50, area90, injconArray, goodJobList)
eventList = sorted(raw_eventList, key=lambda event: event[0], reverse=True)
for (snr, a50, a90, injc, job) in eventList:
skyTable.write("""<tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment