function [vad,prof,lidar]=Pro_analysis(FILENAME,Max_Velocity,SNR_cutoff)

%
%*********************************************************************************************


% === IMPORT SCAN DATA ============================================

inputfiles=FILENAME;
nfiles=1;
nread=0;
clear vad
fid=fopen(FILENAME);
temp=read_Proc_profiles(fid);
tt=datevec(temp.start_time);
temp.timestamp=datenum([tt(1) tt(2) tt(3) tt(4) tt(5) tt(6)]);

[junk,temp.name]=fileparts(char(inputfiles));
temp.datet=datestr(temp.start_time,'mm/dd/yyyy');
lidar=temp;
[na,nr]=size(lidar.SNR);
meanSNR=mean(mean(lidar.SNR(:,nr-50:nr)));
%
% --- Filter --------------------------------------------------------
%disp('--------------------------------------------------------------------------------')
%Max_Velocity=25.;
%SNR_cutoff=1.015;
temp=File_Cleaner_V2(lidar,Max_Velocity,SNR_cutoff);
%disp('Filtering Complete.')
poo=fclose(fid);
vad=temp;
clear temp

prof=vvpanalysis_3(vad);
ind=find(prof.nind<3);
prof.beta(ind)=NaN;
prof.turb(ind)=NaN;
prof.vels(ind,:)=NaN;
prof.theta(ind)=NaN;
prof.u(ind)=NaN;
prof.v(ind)=NaN;
prof.w(ind)=NaN;
prof.Vh(ind)=NaN;
ind=find(abs(prof.u)>60 | abs(prof.v)>60 | abs(prof.w)>60);
prof.beta(ind)=NaN;
prof.turb(ind)=NaN;
prof.vels(ind,:)=NaN;
prof.theta(ind)=NaN;
prof.u(ind)=NaN;
prof.v(ind)=NaN;
prof.w(ind)=NaN;
prof.Vh(ind)=NaN;


return



