
%Averages everv 4 pixels to get 64 from 256
%1700    45 1366  52 1469  
%1900    28 1387  35 1458      (25 1352  42 1552  42-25-1=16)

%xc=cat(1,session.sitabs); 
%x=xc(1:1950,[1:28 35:64]); 

%1000-1900 band

i=[1:256];
v1900_256=11.7764/4*i+1228.8955-(11.7764/4*55.19);

J=256;
for j=1:4:J
  s(:,j)=(v1900_256(:,j)+v1900_256(:,j+1)+v1900_256(:,j+2)+v1900_256(:,j+3))/4;
end

id64= find(s);
for i=1:64
v1900_64(i) = v1900_256(id64(i));
end

v1900_58=v1900_64(:,[1:28 35:64]); %pick 58 of 64 pixels to avoid low part of water band
save('spect_v');

%800-1700 band

i=[1:256];
v1700_256=3.2031*(i)+800;

J=256;
for j=1:4:J
  s(:,j)=(v1700_256(:,j)+v1700_256(:,j+1)+v1700_256(:,j+2)+v1700_256(:,j+3))/4;
end

id64= find(s);
for i=1:64
v1700_64(i) = v1700_256(id64(i));
end

v1700_58=v1700_64(:,[1:45 52:64]); %pick 58 of 64 pixels to avoid low part of water band
