function [ap,Fname]=adhtproc
%

hptPATH=('\\Tornado\Diatom\astar\1000astar\Maffione\*.WAV');
cd(hptPATH(1:41))

%get the list of wav files for the hp
Fname = dir;%this is a text list of all the wav files
Fname = Fname(3:end);
[m,n]=size(Fname);

for i=1:m
  aphFILE=(Fname(i).name);
  fid=fopen(aphFILE);
  
  for j=1:7
    strbuf=fgetl(fid);
  end
  
  lambda=fgetl(fid);
  
  k=1;
  
  while ~feof(fid)
   strbuf=str2num(fgetl(fid));
   if ~isempty(strbuf);
     hpdata(k,i)=strbuf;
   k=k+1;
   end
  end  
end

%Normalize all wavelengths to 750 nm (subtract value from 750 from all values to 350)
% So we START at 350, and go to 800.  So logicaly 750nm is at row (750-350)/2 or row 200

nm750=hpdata(200,:);  %all 750 values in an array.
[m,n]=size(hpdata);

for i=1:n
  Od(:,i)=hpdata(:,i)-nm750(i);
end

ap = ((2.303*Od*0.000355324)/(0.00105));

apcorr = ((0.000539 + 0.1917*ap) + (0.0831*ap.^2));




 
