file=uipickfiles('prompt','Pick data file for processing');
fid=fopen(char(file));
lidar=read_CSM(fid,0.0);
scantype=input('type of scan: rhi or ppi ','s')
scan=scangen_b(lidar,scantype);