% EX PDH measurements made by Sheila and Rana on Feb 20, 2014 (see alog)

% OLTF 
% Freq = 24.407363 MHz , Demod Phase = 120.7 deg (228 steps)
load('SCRN0343.TXT');
load('SCRN0344.TXT');
% Freq = 24.407363 MHz , Demod Phase = 140.7 deg (266 steps)
load('SCRN0345.TXT');
load('SCRN0346.TXT');
% Freq = 24.407363 MHz , Demod Phase = 100 deg (190 steps)
load('SCRN0348.TXT');
load('SCRN0347.TXT');
% Freq = 24.407363 MHz , Demod Phase = 120deg (228 steps)
load('SCRN0343.TXT');
load('SCRN0344.TXT');
% Freq = 24.402363 MHz , Demod Phase = 120.7 deg (228 steps)
load('SCRN0354.TXT');
load('SCRN0355.TXT');
% Freq = 24.401363 MHz , Demod Phase = 120.7 deg (228 steps)
load('SCRN0356.TXT');
load('SCRN0357.TXT');
% Freq = 24.387319 MHz , Demod Phase = 120.7 deg (228 steps)
load('SCRN0358.TXT');
load('SCRN0359.TXT');

figure(1)
clf;
suptitle('Mod Freq = 24.407363Mhz, Diff Demod Phase')
subplot(2,1,1)
semilogx(SCRN0343(:,1),SCRN0343(:,2),SCRN0345(:,1),SCRN0345(:,2),SCRN0348(:,1),SCRN0348(:,2))
legend('Demod Phase = 120.7deg','Demod Phase = 140.7deg','Demod Phase = 100deg')
xlim([500 40000]);
grid on;
ylabel('Magnitude [db]');
subplot(2,1,2)
semilogx(SCRN0344(:,1),SCRN0344(:,2),SCRN0346(:,1),SCRN0346(:,2),SCRN0347(:,1),SCRN0347(:,2))
grid on;
xlim([500 40000]);
ylabel('Phase [deg]');
xlabel('Frequency [Hz]');
set(gcf, 'Color', 'w');

figure(2)
clf;
suptitle('Demod Phase= 120.7deg, Diff Mod Freq')
subplot(2,1,1)
semilogx(SCRN0343(:,1),SCRN0343(:,2),SCRN0354(:,1),SCRN0354(:,2),SCRN0356(:,1),SCRN0356(:,2),SCRN0358(:,1),SCRN0358(:,2))
legend('Mod Freq = 24.407363MHz','Mod Freq = 24.402363MHz','Mod Freq = 24.401363MHz','Mod Freq = 23.387319MHz')
grid on;
xlim([500 40000]);
ylabel('Magnitude [db]');
subplot(2,1,2)
semilogx(SCRN0344(:,1),SCRN0344(:,2),SCRN0355(:,1),SCRN0355(:,2),SCRN0357(:,1),SCRN0357(:,2),SCRN0359(:,1),SCRN0359(:,2))
grid on;
xlim([500 40000]);
ylabel('Phase [deg]');
xlabel('Frequency [Hz]');
set(gcf, 'Color', 'w');