Converting Raw Data Into Physical Units: odas_p2mat

A second cornerstone of our ODAS Matlab Library 4.0 is the new function odas_p2mat.  odas_p2mat uses the configuration information embedded in the Rockland data file to convert the binary data into data vectors in physical units for both raw signals and derived signals. The data vectors created by odas_p2mat are saved in a mat-file with the same name as the p-file. There are two options for calling odas_p2mat. First, you can call odas_p2mat directly. The mat-file can be analyzed independently, or processed further using quick_look.m. Secondly, you can call quick_look.m, which will then call odas_p2mat.

Upon being called, odas_p2mat first checks if a mat-file already exists with the same name and configuration information as the p-file (see figure blow). If a mat-file exists with matching configuration information that mat-file, the function ends.  If a mat-file exists with different configuration information, odas_p2mat will prompt the user >> Delete MAT file and continue? [y,n] allowing the user to either use the existing mat-file without incorporating the new configuration file, or delete the existing mat-file and use the new configuration information for conversion to physical units. Finally, if a mat-file does not exist, odas_p2mat will create one using the configuration information embedded in the p-file.


Note that the processing uses the embedded configuration file string and the calibration parameters contained therein, so these values must be correct.

To call odas_p2mat.m, run the command:

>>odas_p2mat(fname, convert_info);

where ‘fname’ is the name of the file to be processed, and convert_info is the input structure that defines variable processing parameters.

If the convert_info structure is not present when the function is called, default parameters will be used.  The default parameters are appropriate for a vertically profiling VMP; however, they are not appropriate for the MicroRider.  A number of parameters must be adjusted for the MicroRider.

You can create a copy of the default input structure by calling:

>> convert_info = odas_p2mat;

The input structure contains unique parameters that must be adjusted for your particular application.  Please see the ODAS Matlab Library 4.0 Technical Manual for details.

Next week: The new despike.m function, and what does it mean?