% plot sensor noises for SEI

clear; close all
my_colors
lt_purple = [.65 0 1];


freq = logspace(-3,2,1000);

ADE_1mm_noise      = SEI_sensor_noise('ADE_1mm',  freq);
ADE_1mm_idealnoise = 2e-10 * ones(size(freq));

ADE_p25mm_noise      = SEI_sensor_noise('ADE_p25mm',freq);
ADE_p25mm_idealnoise = 6e-11 * ones(size(freq));

L4C_noise = SEI_sensor_noise('L4C',freq);

T240meas_noise = SEI_sensor_noise('T240meas',freq);
T240spec_noise = SEI_sensor_noise('T240spec',freq);

GS13meas_noise = SEI_sensor_noise('GS13meas',freq);
GS13calc_noise = SEI_sensor_noise('GS13calc',freq);

HAM_spec = HAM_req(freq);
%BSC_spec = BSC_req(freq);

%%
figure
ll= loglog(...
    freq, ADE_1mm_noise,'b',...
    freq, ADE_1mm_idealnoise,'b--',...
    freq, ADE_p25mm_noise, 'b',...
    freq, ADE_p25mm_idealnoise,'b--',...
    freq, L4C_noise,'b',...
    freq, GS13meas_noise,'g',...
    freq, GS13calc_noise,'g', ...
    freq, T240meas_noise,'m--',...
    freq, T240spec_noise,'m');

set(ll,'LineWidth',2)
set(ll(1),'Color',lt_purple);
set(ll(2),'Color',lt_purple);
set(ll(3),'Color',purple);
set(ll(4),'Color',purple);
set(ll(6),'Color',[0 1 0]);
set(ll(7),'Color',[0 .7 0]);

set(gca,'FontSize',18)
grid on
title('Noise estimates for SEI sensors','FontSize',22)
xlabel('freq (Hz)')
ylabel('noise floor ASD (m/\surdHz)')
axis([1e-2 1e2 1e-14 2e-6])

legend(...
    '1 mm ADE disp (measured)',...
    '1 mm ADE disp (ideal)',...
    '0.25 mm ADE disp (estimate)',...
    '0.25 mm ADE disp (ideal)',...
    'L-4C w/ LT1001',...
    'GS-13 best measurement',...
    'GS-13 calculated',...
    'T240 measurement',...
    'T240 spec')

set(gca,'YTick',[1e-14 1e-13 1e-12 1e-11 1e-10 1e-9 1e-8 1e-7 1e-6]);
IDfig
FillPage('w')

%print -dpdf summary_sensor_noise_plotv3.pdf
