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

Updates to postprocess

git-svn-id: https://svn.ligo.caltech.edu/svn/bayeswave/trunk@12 c56465c9-8126-4a4f-9d7d-ac845eff4865
parent 575f9003
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,7 @@ for ifo in ifoList:
plt.loglog(freq, median_line + median_spline, 'r', label='Noise model')
plt.xlabel('Frequency')
plt.ylabel('PSD')
plt.title('PSD for IFO {0}'.format(ifo))
plt.xlim([freq.min(), freq.max()])
plt.grid()
plt.legend()
......@@ -149,12 +150,49 @@ plt.close()
# ---------------------
# Make web page
# ---------------------
web = open('results.html', 'w')
plotlist = glob.glob('*.png')
web.write('<html><body>\n')
# -- Get some text from condor out
condor = open('condorOut.txt', 'r')
info = ""
for line in condor:
if line.find('Run Flags') > 0:
break
else:
info = info + line
condor.close()
# -- Start the web page
web.write('<h1>Bayeswave Burst Output page</h1>\n')
# -- Write out the basic log info
web.write('<h3>Log Info</h3>')
web.write("<pre>{0}</pre>".format(info))
print "Info: {0}".format(info)
# -- Write out the bayes Factor plot
web.write('<h3>Evidence For Signal</h3>')
web.write(" log(Odds_signal / Odds_glitch) = {0:.2f} <br/>".format(sig_gl) )
web.write(" log(Odds_signal / Odds_noise) = {0:.2f} <br/>".format(sig_noise) )
web.write("<img src='./odds.png' width=600 alt='odds.png'>")
# -- Write out the waveforms
web.write("<h3>Median Waveforms and 1-sigma Uncertainties</h3>")
web.write("Reconstructed waveforms in whitened data<br/>")
for ifo in ifoList:
web.write("<img src='./waveform_{0}.png' alt='waveform_{0}.png' width=500>".format(ifo))
# -- Write out the PSDs
web.write("<h3>PSDs and Reconstructed PSDs</h3>")
for ifo in ifoList:
web.write("<img src='./psd_{0}.png' alt='psd_{0}.png' width=500>".format(ifo))
plotlist = glob.glob('*.png')
for plot in plotlist:
web.write("<img src='{0}'>".format(plot))
web.write("<img src='{0}' width=200>".format(plot))
web.write('</body></html>')
web.close()
......
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