x = importdata('cr1000x_tower.dat');
vt1 = x.data(:,end-9);
vt2 = x.data(:,end-12);
vt3 = x.data(:,end-16);
vm = nanmean([vt1 vt2 vt3],2);
vd = [vt1 vt2 vt3] - vm;




x = importdata('mosaic_tower_tower_cr1000x.dat');


t10 = x.data(:,end);
t6  = x.data(:,end-1);
t2  = x.data(:,end-2);
t0  = x.data(:,end-3);
mn = nanmean([t10 t6 t2 t0],2);
dd = [t10 t6 t2 t0] - mn;

vt1 = x.data(:,end-9);
vt2 = x.data(:,end-12);
vt3 = x.data(:,end-16);
vm = nanmean([vt1 vt2 vt3],2);
vd = [vt1 vt2 vt3] - vm;


clf;
subplot(2,1,1)
plot(vt1); hold on;
plot(vt2);
    plot(vt3);

plot(t10); hold on;
plot(t6);
plot(t2);
plot(t0);
xlabel('Seconds');
ylabel('T [C]');

subplot(2,1,2)
histN(vd(:,1),-0.1:0.001:0.1,'line','linewidth',1); hold on;
histN(vd(:,2),-0.1:0.001:0.1,'line','linewidth',1);
histN(vd(:,3),-0.1:0.001:0.1,'line','linewidth',1);

histN(dd(:,1),-0.1:0.001:0.1,'line','linewidth',2); hold on;
histN(dd(:,2),-0.1:0.001:0.1,'line','linewidth',2);
histN(dd(:,3),-0.1:0.001:0.1,'line','linewidth',2);
histN(dd(:,4),-0.1:0.001:0.1,'line','linewidth',2);
xlabel('T(n) - MEAN(T) [C]');

set(gca,'fontname','times','fontsize',12);
set(gcf,'PaperPositionMode','manual');
set(gcf,'PaperUnits','centimeters');
set(gcf,'PaperPosition',[0 0 24 18]);
print -dpng -r300 deltats.png





histN(vd(:,1),-0.1:0.001:0.1,'line','linewidth',1); hold on;
histN(vd(:,2),-0.1:0.001:0.1,'line','linewidth',1);
histN(vd(:,3),-0.1:0.001:0.1,'line','linewidth',1);

xlabel('T(n) - MEAN(T) [C]');

set(gca,'fontname','times','fontsize',12);
set(gcf,'PaperPositionMode','manual');
set(gcf,'PaperUnits','centimeters');
set(gcf,'PaperPosition',[0 0 24 18]);
print -dpng -r300 vaisala_comparison.png











x = importdata('cr1000x_tower_DIFF.dat');


t10 = x.data(:,end);
t6  = x.data(:,end-1);
t2  = x.data(:,end-2);
t0  = x.data(:,end-3);
t10 = t10(1.79*10^4:end);
t6 = t6(1.79*10^4:end);
t2 = t2(1.79*10^4:end);
t0 = t0(1.79*10^4:end); t0(t0 < 20) = NaN; 

diffM = nanmean([t10 t6 t2 t0],2);
diffM = [t10 t6 t2 t0] - diffM;


x = importdata('cr1000x_tower_SE.dat');

ts10 = x.data(:,end);
ts6  = x.data(:,end-1);
ts2  = x.data(:,end-2);
ts0  = x.data(:,end-3);

seM = nanmean([ts10 ts6 ts2 ts0],2);
seM = [ts10 ts6 ts2 ts0] - seM;

subplot(2,1,1)
histN(seM(:,1),-1:0.01:1,'line','linewidth',2); hold on;
histN(seM(:,2),-1:0.01:1,'line','linewidth',2);
histN(seM(:,3),-1:0.01:1,'line','linewidth',2);
histN(seM(:,4),-1:0.01:1,'line','linewidth',2);
xlabel('T(n) - MEAN(T) [C]');
title('Single Ended');
subplot(2,1,2)
histN(diffM(:,1),-1:0.01:1,'line','linewidth',2); hold on;
histN(diffM(:,2),-1:0.01:1,'line','linewidth',2);
histN(diffM(:,3),-1:0.01:1,'line','linewidth',2);
histN(diffM(:,4),-1:0.01:1,'line','linewidth',2);
xlabel('T(n) - MEAN(T) [C]');
title('Differential');
set(gca,'fontname','times','fontsize',12);
set(gcf,'PaperPositionMode','manual');
set(gcf,'PaperUnits','centimeters');
set(gcf,'PaperPosition',[0 0 24 18]);
print -dpng -r300 deltats.png




