s=dir('sit*');
x=whos('-file',s(1).name,'pds');
load glu glufit
g=reshape(glufit(:,3),x.size(1),size(glufit,1)/x.size(1));

for i=1:length(s)
    load(s(i).name,'pds','pds2');
    zeropds=min(pds')';
    zeropds2=min(pds2')';
    pdsn=pds-zeropds*ones(1,size(pds,2));
    pdsn2=pds2-zeropds2*ones(1,size(pds2,2));    
    onepdsn=pdsn(:,1);
    onepdsn2=pdsn2(:,1);
    pdsn=pdsn./(onepdsn*ones(1,size(pdsn,2)));
    pdsn2=pdsn2./(onepdsn2*ones(1,size(pdsn2,2)));    
    xcal1(i).pdsn=[pdsn,g(:,i)];
    xcal1(i).zeropds=zeropds;
    xcal1(i).onepdsn=onepdsn;
    xcal2(i).pdsn=[pdsn2,g(:,i)];
    xcal2(i).zeropds=zeropds2;
    xcal2(i).onepdsn=onepdsn2;    
end
save sitpds xcal1 xcal2 glufit