function [vad,prof,lidar]=BPanal_profile(files,Max_Velocity,SNR_cutoff)

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


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

load(char(files))
[na,nr]=size(lidar.SNR);
snrrange=mean(lidar.SNR);
ind=find(~isnan(lidar.SNR(:,int16(0.95*nr):nr))| lidar.SNR(:,int16(0.95*nr):nr)>1.000);
NoiseFloor=10*log10(mean(lidar.SNR(ind))-1);
%
% --- 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.NoiseFloor=NoiseFloor;
prof.Max_Velocity=Max_Velocity;
prof.SNR_cutoff=SNR_cutoff;
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



