Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AMPS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant David Meadors
AMPS
Commits
1eed1e34
Commit
1eed1e34
authored
12 years ago
by
Grant David Meadors
Browse files
Options
Downloads
Patches
Plain Diff
Made program capable of plotting differences over all 200 jobs, before and after
parent
57494518
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrastBeforeAfterAmplitude.m
+59
-0
59 additions, 0 deletions
contrastBeforeAfterAmplitude.m
with
59 additions
and
0 deletions
contrastBeforeAfterAmplitude.m
0 → 100644
+
59
−
0
View file @
1eed1e34
% Grant David Meadors
% contrastBeforeAfterRealImaginary
% g m e a d o r s @ u m i c h . e d u
% 02012-11-19 (JD 2456251)
% Plots the calibrated amplitude of Hann
% windows for Hoft, both before and after feedforward
beforeRaw
=
load
(
'S6H1_Hann_40_2000test_bins.txt'
);
afterRaw
=
load
(
'S6H1_Hann_40_2000feedforward_bins.txt'
);
% Each file now is loaded as a matrix, formatted by column:
% SFTnumber Frequency(Hz) rawPower calibratedAmplitude scalefactor timebaseline
% Our object is to average all the calibrated amplitude rows corresponding
% to a given SFT number.
beforeL
=
unique
(
beforeRaw
(:,
1
));
afterL
=
unique
(
afterRaw
(:,
1
));
before
=
ones
(
size
(
beforeL
));
after
=
ones
(
size
(
afterL
));
% Average over all the bins corresponding to a given SFT number,
% then multiply by sqrt(8/3) because of the Hann window normalization factor.
for
ii
=
1
:
length
(
before
)
before
(
ii
)
=
sqrt
(
8
/
3
)
*
mean
(
beforeRaw
(
beforeRaw
(:,
1
)
==
ii
,
4
));
end
for
ii
=
1
:
length
(
after
)
after
(
ii
)
=
sqrt
(
8
/
3
)
*
mean
(
afterRaw
(
afterRaw
(:,
1
)
==
ii
,
4
));
end
figure
(
1
)
semilogy
(
beforeL
,
before
,
afterL
,
after
)
legend
(
'Before feedforward'
,
'After feedforward'
)
title
(
'Hann power component vs SFT number for 563 1/1800 bins centered at 850 Hz'
)
ylabel
(
'SFT calibrated units, Hoft, amplitude'
)
xlabel
(
'SFT number'
)
grid
on
print
(
'-dpdf'
,
'HannAmp.pdf'
)
print
(
'-dpng'
,
'HannAmp.png'
)
close
(
1
)
difference
=
before
-
after
;
differenceClean
=
difference
;
differenceClean
(
isnan
(
difference
))
=
[];
arithmean
=
mean
(
differenceClean
)
*
ones
(
size
(
difference
));
arithmeanString
=
horzcat
(
'Arithmetic mean of difference: '
,
num2str
(
arithmean
(
1
)));
figure
(
2
)
plot
(
beforeL
,
difference
,
beforeL
,
arithmean
)
legend
(
'Before minus after feedforward'
,
arithmeanString
)
xlabel
(
'SFT number'
)
ylabel
(
'SFT calibrated units, Hoft, amplitude (before - after)'
)
title
({
'Hann amplitude difference vs SFT number for 563 1/1800 bins centered at 850 Hz'
;
...
arithmeanString
;
...
horzcat
(
'Median of difference: '
,
num2str
(
median
(
differenceClean
)))});
grid
on
ylim
([
-
1e-24
1e-24
])
print
(
'-dpdf'
,
'HannAmpDiff.pdf'
)
print
(
'-dpng'
,
'HannAmpDiff.png'
)
close
(
2
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment