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

Added a statistical cut

parent 4750d36b
No related branches found
No related tags found
No related merge requests found
...@@ -53,7 +53,6 @@ differenceClean = difference; ...@@ -53,7 +53,6 @@ differenceClean = difference;
differenceClean(isnan(difference)) = []; differenceClean(isnan(difference)) = [];
arithmean = mean(differenceClean)*ones(size(difference)); arithmean = mean(differenceClean)*ones(size(difference));
arithmeanString = horzcat('Arithmetic mean of difference: ', num2str(arithmean(1))); arithmeanString = horzcat('Arithmetic mean of difference: ', num2str(arithmean(1)));
length(difference)
figure(2) figure(2)
plot(beforeL, difference, beforeL, arithmean) plot(beforeL, difference, beforeL, arithmean)
...@@ -88,10 +87,38 @@ ylabel('Histogram count') ...@@ -88,10 +87,38 @@ ylabel('Histogram count')
legend('Before feedforward', 'After feedforward') legend('Before feedforward', 'After feedforward')
title({'Hann windowed calibrated amplitude histogram';... title({'Hann windowed calibrated amplitude histogram';...
harmmeanString;... harmmeanString;...
num2str(harmmeanBefore); num2str(harmmeanBefore);...
num2str(harmmeanAfter); num2str(harmmeanAfter);...
num2str(harmmeanDifference)}) num2str(harmmeanDifference)})
grid on grid on
print('-dpdf', 'HannHist.pdf') print('-dpdf', 'HannHist.pdf')
print('-dpng', 'HannHist.png') print('-dpng', 'HannHist.png')
close(3) close(3)
% Try cutting statistical outliers to see how that affects the distribution
beforeCut = before;
afterCut = after;
threshold = 7e-23;
beforeCut(beforeCut > threshold) = [];
afterCut(afterCut > threshold) = [];
beforeCutHist = hist(beforeCut, HoftHistVector);
afterCutHist = hist(afterCut, HoftHistVector);
harmmeanBeforeCut = harmmean(beforeCut);
harmmeanAfterCut = harmmean(afterCut);
harmmeanDifferenceCut = harmmeanBeforeCut - harmmeanAfterCut;
harmmeanStringCut = 'Harmonic mean, cut at 7e-23: before, after, difference';
figure(4)
plot(HoftHistVector, beforeCutHist, HoftHistVector, afterCutHist)
xlabel('Hoft')
ylabel('Histogram count')
legend('Before feedforward', 'After feedforward')
title({'Hann window calibrated amplitude histogram';...
harmmeanStringCut;...
num2str(harmmeanBeforeCut);...
num2str(harmmeanAfterCut);...
num2str(harmmeanDifferenceCut)});
grid on
print('-dpdf', 'HannHistCut.pdf')
print('-dpng', 'HannHistCut.png')
close(4)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment