%script pl_rawfan_ex % PL_RAWFAN_EX reads raw fan .cdf file and plots a single fan image directly % from the raw radial data- no interpolation used % may be useful in fan processing eventually % emontgomery 6/16/09 % open a cdf file with raw fan nc=netcdf('8558fan_raw.cdf') % omit the last point of each scan, since they're all max at 255 % also, for this example, get just the first sweep % f11=nc{'raw_image'}(11,1:499,1:2322); % has slope f40=nc{'raw_image'}(40,1:499,1:2322); % better waves hang=nc{'headangle'}(1:2322); close(nc) % fabricate some matrices of approximatey the right size d1=[.01:.01:4.99]'; distmat=repmat(d1,1,2322); hangmat=repmat(hang',499,1); % convert the angles and distances to x and y [x,y]=xycoord(distmat,hangmat); clear hangmat distmat hang % and display- both are slow % figure % plot2 isn't the best, since it doesn't incorporate the colors in F11, % except as heights. probably a meshgrid preceeding it would help % plot3(x,y,f40,'.') % this is the Eureka plot- very cool (if I do say so myself) figure % having these as column vectors is necessary! scatter(x(:),y(:),1,f40(:)); colorbar title('40th sample, first sweep- Hatteras09 fan') xlabel('x distance (m)') ylabel('y distance (m)') % % the plot made by scatter is large, and print -djpeg will hang if % attempted. Doing a screen grab and printing that works OK.