function y=uvflag(adt,cm,g,pg3,pg4,nbin);
%
% This function will attempt to flag the data for bad data.
%
%
lx=size(adt,1);
y=zeros(lx,nbin);
for i=1:nbin,
	l1=cm(:,i,1) <= 64;
	l2=cm(:,i,2) <= 64;
	l3=cm(:,i,3) <= 64;
	l4=cm(:,i,4) <= 64;
	lp=((pg3(:,i) < 25)&(pg4(:,i) < 25));
	y(l1,i)=1;
	y(l2,i)=1;
	y(l3,i)=1;
	y(l4,i)=1;
	y(lp,i)=1;
end
return;

