Skip to content
Snippets Groups Projects
Commit 14a404ea authored by Grant David Meadors's avatar Grant David Meadors
Browse files

Marginalizing over the histogram

parent cf570971
No related branches found
No related tags found
No related merge requests found
......@@ -218,6 +218,15 @@ def combSpectrum(targetDirectory, flag):
#plt.close()
histBins = 1e-24 * np.arange(50., 101.)
plt.figure()
p0 = plt.hist(beforeArray[:, 27], histBins)
plt.grid(True)
plt.xlabel('Hoft')
plt.ylabel('Histogram count (1e-24 bins from 5e-23 to 1e-24)')
plt.title('850 Hz comb histogram before feedforward')
plt.savefig(graphWholeRun + 'HistogramBefore850.png')
plt.savefig(graphWholeRun + 'HistogramBefore850.pdf')
plt.close()
plt.figure()
#p0 = plt.scatter(timeArray, beforeArray[:, 27], color='b')
#p0 = plt.hist(beforeArray[:, 27], histBins)
p1 = plt.hist(afterArray[:, 27], histBins)
......@@ -226,9 +235,32 @@ def combSpectrum(targetDirectory, flag):
plt.ylabel('Histogram count (1e-24 bins from 5e-23 to 1e-24)')
plt.title('850 Hz comb histogram after feedforward')
#plt.legend([p0, p1], ['Before', 'After'])
plt.savefig(graphWholeRun + 'Histogram.png')
plt.savefig(graphWholeRun + 'Histogram.pdf')
plt.savefig(graphWholeRun + 'HistogramAfter850.png')
plt.savefig(graphWholeRun + 'HistogramAfter850.pdf')
plt.close()
# Marginalize over all the comb frequencies to see if we obtain a similar distribution
histMarginBins = 1e-20 * np.arange(1., 101.)
beforeMargin = np.sum(beforeArray, axis=1)
afterMargin = np.sum(afterArray, axis=1)
plt.figure()
p2 = plt.hist(beforeMargin)
plt.grid(True)
plt.xlabel('Hoft')
plt.ylabel('Histogram count')
plt.title('Marginalized comb before feedforward')
plt.savefig(graphWholeRun + 'HistogramBeforeMargin.png')
plt.savefig(graphWholeRun + 'HistogramBeforeMargin.pdf')
plt.close()
plt.figure()
p3 = plt.hist(afterMargin)
plt.grid(True)
plt.xlabel('Hoft')
plt.ylabel('Histogram count')
plt.title('Marginalized comb after feedforward')
plt.savefig(graphWholeRun + 'HistogramAfterMargin.png')
plt.savefig(graphWholeRun + 'HistogramAfterMargin.pdf')
plt.close()
# Uncomment below to test on one directory only:
#combSpectrum('/home/pulsar/public_html/feedforward/diagnostics/LHO/H-H1_AMPS_C02_L2-9326/', 'one')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment