% az_test.m % example calls to evaluate the returns for azimuth data with low % % non-zero Profile Ranges % emontgomery 11/13/07 % [image, header, ps, as]=readrangeall('S110117.r36'); [p,q]=size(header.ProfileRange); %settings.Range=ps.Range; % if ProfileRange has lots of values this comes out as a sphere % plotrange(ph, pd, settings, '2d') % find the indices of the good ProfileRanges nz=find (header.ProfileRange(1,:) >500); % verify figure plot(nz,header.ProfileRange(1,nz),'g.') pcolor(squeeze(image.imagedata(1,:,:))); shading interp colorbar pr=header.ProfileRange(1,:); figure plot(pr,'.') figure % find the highest peak in each scan npr=zeros(p,q); pk=zeros(p,q); for kk=1:p for jj=1:q plot(squeeze(image.imagedata(kk,jj,:))) fc=find(image.imagedata(kk,jj,50:end)>= max(image.imagedata(kk,jj,50:end))); pk(kk,jj)=fc(1)+49; npr(kk,jj)=image.imagedata(kk,jj,pk(kk,jj)); hold on plot(pk(kk,jj),npr(kk,jj),'r*') %pause(.1) %clf end end pk=pk.*ps.Range; plot([1:1:q],pk(kk,:)*ps.Range,'r.') hold on plot(nz,header.ProfileRange(1,nz),'g.') idx = find(pr(1,:) == 0); % find indices of NG profileRange