%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% loading data

alice_trans = load('alice_media_convertor.dat');
#bob_trans = load('bob_media_convertor_1.dat');
bob_trans = load('bob_media_convertor_2.dat');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

plot(alice_trans(:, 1), alice_trans(:, 2)./max(alice_trans(:, 2)), 'r', ...
     bob_trans(:, 1), bob_trans(:, 2)./max(bob_trans(:, 2)), 'b'),...
     xlabel('Wavelength (nm)'),...
     ylabel('Intensity (Normalised Unit)'),...
     title('Transceiver Spectrum'),...
     grid;
     
legend('Alice', 'Bob');

set(gca,'fontsize',20); % sets font of numbers on axes

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% measured with SNSPD 1 second integration time

alice_trans = load('media_convertor_single_photon_spectrum.dat');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

plot(alice_trans(:, 1), alice_trans(:, 2), 'r'),...
     xlabel('Wavelength (nm)'),...
     ylabel('Intensity (s^-^1)'),...
     title('Transceiver Spectrum (Single Photon )'),...
     grid;
     
set(gca,'fontsize',20); % sets font of numbers on axes

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%