Home > ctdcal > read_autosal_raw.m

read_autosal_raw

PURPOSE ^

read_autosal_raw : Read the data in the *.raw files from the Ron Brown

SYNOPSIS ^

function theResult = read_autosal_raw(fname)

DESCRIPTION ^

 read_autosal_raw : Read the data in the *.raw files from the Ron Brown
 
 CTD Calibration toolbox
 
 INPUT: 
   fname: Path and name of the *.raw file

 OUTPUT:
   theData: Structure containing the data

 DESCRIPTION:    
   This function reads the autosal analysis data stored in the *.raw
 files from the Ron Brown autosal system.  The format of the files is a simple
 ascii formats with one header line and subsequent data lines containing
 ten analysis data points (twice conductivity ratio) followed by a time string
 of the fomr hh:mm:ss.

 SEE ALSO:
     correct_autosal_drift
     read_autosal_dat

 CHANGELOG:
   08-Jul-2004, Version 1.0
        * Initial version.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function theResult  = read_autosal_raw(fname)
0002 % read_autosal_raw : Read the data in the *.raw files from the Ron Brown
0003 %
0004 % CTD Calibration toolbox
0005 %
0006 % INPUT:
0007 %   fname: Path and name of the *.raw file
0008 %
0009 % OUTPUT:
0010 %   theData: Structure containing the data
0011 %
0012 % DESCRIPTION:
0013 %   This function reads the autosal analysis data stored in the *.raw
0014 % files from the Ron Brown autosal system.  The format of the files is a simple
0015 % ascii formats with one header line and subsequent data lines containing
0016 % ten analysis data points (twice conductivity ratio) followed by a time string
0017 % of the fomr hh:mm:ss.
0018 %
0019 % SEE ALSO:
0020 %     correct_autosal_drift
0021 %     read_autosal_dat
0022 %
0023 % CHANGELOG:
0024 %   08-Jul-2004, Version 1.0
0025 %        * Initial version.
0026 %
0027 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0028 
0029 error(nargchk(1,1,nargin))
0030 
0031 % First count the number of lines and pre allocated the output cell arrays.
0032 % This is only temporary since we will separate standards from salts later.
0033  % This also serves to check if the file is in the path
0034 nLines = count_lines(fname); 
0035 
0036 % Read the file.
0037 [s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 hh mm ss ] = textread(fname,...
0038         '%f %f %f %f %f %f %f %f %f %f %d:%d:%d','headerlines',1);
0039         
0040 cond_ratio = [s1 s2 s3 s4 s5 s6 s7 s8 s9 s10];
0041 
0042 
0043 theResult = struct('cond_ratio',cond_ratio,'hours',hh,'minutes',mm,...
0044  'seconds',ss);
0045  
0046  
0047 return
0048

Generated on Fri 08-Oct-2004 11:57:17 by m2html © 2003