PMElogo.jpg (16797 bytes)
                                                                     Precision Measurement Engineering, Inc.


SCAMP MATLAB PROCESSING AND DISPLAY SOFTWARE (P/N 5530)

REVISION 27-FEB-2004

 

INTRODUCTION

SCAMP measures and records CTD and other parameters at roughly 1 mm intervals in water column profiles. A typical profile will produce a large volume of data. SCAMP’s Matlab software provides a software environment that customers may use to process and display the collected data.

PME provides software in to forms: in commented script files (*.m) that the customer can read or modify, and in mex files (*.dll) that can not be read or modified. In general the script files implement processing steps and data display while the mex files do actual processing steps.

The customer must supply Mathworks Matlab software, revision 5.1 or later. PME supports only the Windows P.C. platform but the software will operate on other platforms if the mex files are re-compiled. PME will in some cases provide source code to enable re-compilation.

Processing of microstructure measurements is an evolving science. PME’s has implemented the complete path beginning at sensor measurements and ending with dissipation. Various methods used within this path are the subject of on-going development by PME and by the microstructure community. PME’s software is designed as a shell that enables customers to understand the path and substitute their own methods at appropriate points.

In addition to processing, PME provides a display GUI that allows the customer to easily review the measured data and also processed results. The display is shown below. Click to enlarge.

SCAMPGUI1.gif (21097 bytes)

 

DISTRIBUTED SCRIPT FILES

Script files may be read and modified by customers. The important files s_process.m, and s_plot.m may be used as stand-alone activities without use of the GUI. Distributed as SCAMPGUI.ZIP.

FILE FUNCTION
SCAMP.M GUI display
SCAMP.MAT Data file for GUI display
S_SERVICE.M Call-back file for GUI display activities
S_PROCESS.M Loads and processes SCAMP data
S_BATFIT.M Implements the Batchelor fitting required by S_PROCESS.M
S_PLOT.M Implements plotting within the GUI
   
   

 

DISTRIBUTED MEX FILES

Mex files are provided for operation on the P.C. Windows platform only. Each mex file is provided with a corresponding *.m file that gives a description of the file’s use and references upon which the computation method is based. Mex files are distributed in a SCAMPTOOL folder. Distributed as SCAMPTOOL.ZIP.

 

FILE FUNCTION
S_AVG.DLL Find the average of a segment
S_BLIMIT.DLL Find array index for frequency limit
S_BSPECT.DLL Find theoretical Batchelor PSD
S_BV.DLL Find Brunt-Visala frequency
S_BWCOMP.DLL Smooth and Sharpen data
S_C11.DLL Find max likelyhood C11 parameter
S_DDT.DLL Find DDT array
S_FILTER.DLL Low-pass filter an array
S_GETSEG.DLL Extract a segment from an array
S_GPRIME.DLL Compute gravity anomaly
S_LC.DLL Computed centered length scale
S_LOAD1.DLL Load a old SCAMP data channel with name and units
S_LOAD2.DLL Load a USB SCAMP data channel with name and units
S_NORDER.DLL Normalize array into downwards mode order
S_PSD.DLL Compute power spectral density of array segment
S_REPVEL.DLL Find representative velocity in a segment
S_SAL.DLL Compute salinity
S_SEGMEN.DLL Define segment boundaries from DDT
S_SEGPLT.DLL Prepare a segment value array for plotting
S_SIGT.DLL Compute density, sigma-T
S_SMEAN.DLL De-trend an array
S_SNOISE.DLL Estimate SCAMP electronic noise
S_SORTD.DLL Sort depth and sigma-T into density stable profile
S_THORPE.DLL Compute Thorpe displacements
S_VEL.DLL Compute velocity
S_X.DLL Compute Chi
   
   

 
INSTALLATION UNDER MATLAB ON P.C. WINDOWS PLATFORM

The script files within SCAMPGUI.ZIP may be placed at any convenient location. These files use files within the SCAMPTOOL folder. S_PROCESS.M contains the statement:

addpath ('c:\matlabr11\toolbox\scamptool'); %holds SCAMP mex files

The SCAMPTOOL folder may be placed at this location, or at any convenient location within Matlab’s path, or at any convenient location if the addpath statement above is suitably modified.

The GUI is designed to operate at 1024 X 768 screen resolution.  The GUI must be MAXIMIZED for proper operation.

OPERATION OF THE GUI

The GUI is begun by starting Matlab, then changing directories to the directory that contains the SCAMPGUI files. SCAMP.M is the central file and accesses the other files. After SCAMP.M is run the GUI display above appears, except that no data are displayed.

The first activity is to click the LOAD button and browse to a SCAMP data file. The GUI will load old SCAMP files as well as files collected with the USB SCAMP. After file selection a brief period elapses while data are processed. When processing is completed the results can be viewed. Example profile 1820 is supplied for testing the GUI.

The left two graphs present full-profile results. These include both directly measured data such as CTD and also full-profile processing results such as salinity. Results are selected from the drop-down boxes directly above the graphs.

The right two graphs present processing results from segments of the profile. Segments of both directly measured data and processed data can be viewed. These are essentially ‘magnified’ views of the data presented in the left (full-profile) two graphs. Additionally other processed results that apply only to the current segment can be displayed. Results are selected from the drop-down boxes directly above the graphs.

Segments within the data may be selected sequentially by clicking the <SEG and SEG> buttons. The horizontal dotted red lines on the left two graphs indicate the currently selected segment.

Data may be plotted vs time or vs depth by selection of the appropriate radio box in the upper right corner of the GUI.

New data may be loaded by repeating the LOAD process. Old data are replaced after processing.

GUI operation is terminated by selecting the X button at window upper right corner.

 

GENERAL NOTES

One additional note: the *.dll programs use arrays of rows rather than the more normal Matlab arrays of columns. The *.dll programs also count array elements beginning with index 0, not the Matlab convention of beginning with index 1. This is not a problem in most cases but beware of this feature. It is clearly stated in the *.m files where appropriate.