README for sonar processing program status 7/24/07 etm There are three sonar types : fan, pencil and range (rotating Pencil). Each has a program to read the data file and one to make diagnostic plots. readfan.m readpencil.m readrangeall.m plotfan07.m plotpen07.m plotrange.m The {read*, plot*} combinations above replace showfan07.m and showpen07.m, although they're still in this repository. The processing of fan and pencil sonar files may be accomplished using procsonar_07.m. This program processes multiple files in a directory (calling the above programs) and it uses the typical meta.txt file to input control parameters and descptive metadata. (See fanExamplemeta.txt and penExamplemeta.txt) Procsonar_07 outputs netcdf files of the raw data, and processed data, where the elevation and horizontal ranges are computed from the images. The programs that create the x-y coordinate elevations from the images are embedded in plotpen07.m At this point for data from the Azimuth drive, showsonars.m will call readrangeall and plotrange to display data from the pencil/azimuth combo. Animsonar_jun07.m is under development to do the next step of animating the timeseries and integrating data from ADCP, fan and pencil beams. **It isn't operational at this point. ------------------------------------------------------------------------------------------------------------------ To work with image data from the pencil beam, some additional helper files stored under m_cmg/em_branches/sonar may be of interest. They may need adjustments to factors applied, depencing on the source of the data. find_good_pr.m : evaluates the % return of PenHeader.ProfileRange by 20 degree PenHeader.HeadAngle bins view_pen.m : Originally written for files made by the imagenex viewer, where there will be multiple scans in each file, possibly with gain changing too. Can be run on files from the logger, but gain returned will be []. Assumes you've run readpencil first: outputs matrices of ProfileRange, HeadAngle and gain. plt_prga.m : generates plots from the output of view_pen. plt_prfrngproc.m : another program to generate plots with ProfileRange overlaying the Pencil image. plt_17r02.m : view_pen for data from the azimuth drive, where the image is saved. Generates a plot of each sweep with ProfileRange overlaid. A .mat file with all the images is saved to facilitate reviewing the data.