configDTFileOptionsSlocum

PURPOSE ^

CONFIGDTFILEOPTIONSSLOCUM Configure conversion and loading options for Slocum files in delayed time.

SYNOPSIS ^

function slocum_options = configDTFileOptionsSlocum()

DESCRIPTION ^

CONFIGDTFILEOPTIONSSLOCUM  Configure conversion and loading options for Slocum files in delayed time.

  Syntax:
    SLOCUM_OPTIONS = CONFIGDTFILEOPTIONSSLOCUM()

  Description:
    SLOCUM_OPTIONS = CONFIGDTFILEOPTIONSSLOCUM() should return a struct 
    with the parameters that control which are the deployment files, 
    whether they need to be converted, and which files and data should be used
    in delayed time mode. The returned struct should have the following fields:
      FORMAT_CONVERSION: boolean specifying whether data is in binary files
        that should be converted to human readable format.
      XBD_NAME_PATTERN: string with the name pattern of binary data files as
        needed by script MAIN_GLIDER_DATA_PROCESSING_DT.
        The name of a binary file should match this pattern to be converted,
        and the conversion to ascii format renames it according to
        this pattern and the replacement string in next field.
      DBA_NAME_REPLACEMENT: string with the name pattern replacement to use
        when converting binary files to ascii.
      DBA_NAME_PATTERN_NAV: string with the name pattern of navigation ascii 
        files to be loaded for processing by function LOADSLOCUMDATA.
        The name of an ascii file should match this pattern to be loaded 
        as a navigation file.
      DBA_NAME_PATTERN_SCI: string with the name pattern of science ascii
        files to be loaded for processing by function LOADSLOCUMDATA.
        The name of an ascii file should match this pattern to be loaded
        as a science file.
      DBA_TIME_SENSOR_NAV: string with the name of the timestamp sensor to use
        in navigation files when combining data from a set of ascii files.
      DBA_TIME_SENSOR_SCI: string with the name of the timestamp sensor to use
        in science files when combining data from a set of ascii files.
      DBA_SENSORS: string cell array with the name of the sensors to include
        in the processing. Restricting the list of sensors to load may reduce
        the memory footprint.

  Examples:
    slocum_options = configDTFileOptionsSlocum()

  See also:
    MAIN_GLIDER_DATA_PROCESSING_DT
    LOADSLOCUMDATA

  Authors:
    Joan Pau Beltran  <joanpau.beltran@socib.cat>

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

configDTFileOptionsSlocum.m

SOURCE CODE ^

0001 function slocum_options = configDTFileOptionsSlocum()
0002 %CONFIGDTFILEOPTIONSSLOCUM  Configure conversion and loading options for Slocum files in delayed time.
0003 %
0004 %  Syntax:
0005 %    SLOCUM_OPTIONS = CONFIGDTFILEOPTIONSSLOCUM()
0006 %
0007 %  Description:
0008 %    SLOCUM_OPTIONS = CONFIGDTFILEOPTIONSSLOCUM() should return a struct
0009 %    with the parameters that control which are the deployment files,
0010 %    whether they need to be converted, and which files and data should be used
0011 %    in delayed time mode. The returned struct should have the following fields:
0012 %      FORMAT_CONVERSION: boolean specifying whether data is in binary files
0013 %        that should be converted to human readable format.
0014 %      XBD_NAME_PATTERN: string with the name pattern of binary data files as
0015 %        needed by script MAIN_GLIDER_DATA_PROCESSING_DT.
0016 %        The name of a binary file should match this pattern to be converted,
0017 %        and the conversion to ascii format renames it according to
0018 %        this pattern and the replacement string in next field.
0019 %      DBA_NAME_REPLACEMENT: string with the name pattern replacement to use
0020 %        when converting binary files to ascii.
0021 %      DBA_NAME_PATTERN_NAV: string with the name pattern of navigation ascii
0022 %        files to be loaded for processing by function LOADSLOCUMDATA.
0023 %        The name of an ascii file should match this pattern to be loaded
0024 %        as a navigation file.
0025 %      DBA_NAME_PATTERN_SCI: string with the name pattern of science ascii
0026 %        files to be loaded for processing by function LOADSLOCUMDATA.
0027 %        The name of an ascii file should match this pattern to be loaded
0028 %        as a science file.
0029 %      DBA_TIME_SENSOR_NAV: string with the name of the timestamp sensor to use
0030 %        in navigation files when combining data from a set of ascii files.
0031 %      DBA_TIME_SENSOR_SCI: string with the name of the timestamp sensor to use
0032 %        in science files when combining data from a set of ascii files.
0033 %      DBA_SENSORS: string cell array with the name of the sensors to include
0034 %        in the processing. Restricting the list of sensors to load may reduce
0035 %        the memory footprint.
0036 %
0037 %  Examples:
0038 %    slocum_options = configDTFileOptionsSlocum()
0039 %
0040 %  See also:
0041 %    MAIN_GLIDER_DATA_PROCESSING_DT
0042 %    LOADSLOCUMDATA
0043 %
0044 %  Authors:
0045 %    Joan Pau Beltran  <joanpau.beltran@socib.cat>
0046 
0047 %  Copyright (C) 2013-2016
0048 %  ICTS SOCIB - Servei d'observacio i prediccio costaner de les Illes Balears
0049 %  <http://www.socib.es>
0050 %
0051 %  This program is free software: you can redistribute it and/or modify
0052 %  it under the terms of the GNU General Public License as published by
0053 %  the Free Software Foundation, either version 3 of the License, or
0054 %  (at your option) any later version.
0055 %
0056 %  This program is distributed in the hope that it will be useful,
0057 %  but WITHOUT ANY WARRANTY; without even the implied warranty of
0058 %  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0059 %  GNU General Public License for more details.
0060 %
0061 %  You should have received a copy of the GNU General Public License
0062 %  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0063 
0064   error(nargchk(0, 0, nargin, 'struct'));
0065   
0066   % Binary file conversion to text format
0067   % (disable it when reprocessing deployments with no new binary data):
0068   slocum_options.format_conversion = true;
0069   
0070   % All binary files, renamed or not:
0071   % slocum_options.xbd_name_pattern = '^(.*)\.([smdtne]bd)$';
0072   % Already renamed binary files of all sizes:
0073   slocum_options.xbd_name_pattern = '^(\w+-\d{4}-\d+-\d+-\d+)\.([smdtne]bd)$';
0074   
0075   % xbd to dba name replacement:
0076   slocum_options.dba_name_replace = '$1-$2.dba';
0077   
0078   % Navigation files to use (restrict the character set if needed):
0079   % slocum_options.dba_name_pattern_nav = '^.*-[smd]bd\.dba$';
0080   slocum_options.dba_name_pattern_nav = '^.*-dbd\.dba$';
0081   
0082   % Science files to use: (restrict the character set if needed):
0083   % slocum_options.dba_name_pattern_sci = '^.*-[tne]bd\.dba$';
0084   slocum_options.dba_name_pattern_sci = '^.*-ebd\.dba$';
0085   
0086   % Time sensor column in navigation files:
0087   slocum_options.dba_time_sensor_nav = 'm_present_time';
0088   
0089   % Time sensor column in science files:
0090   slocum_options.dba_time_sensor_sci = 'sci_m_present_time';
0091   
0092   % Sensors to load:
0093   slocum_options.dba_sensors = {
0094     'm_present_time'
0095     'm_lat'
0096     'm_lon'
0097     'm_gps_lat'
0098     'm_gps_lon'
0099     'm_gps_status'
0100     'c_wpt_lat'
0101     'c_wpt_lon'
0102     'm_roll'
0103     'm_pitch'
0104     'm_heading'
0105     'm_depth'
0106     'm_final_water_vx'
0107     'm_final_water_vy'
0108     'sci_m_present_time'
0109     'sci_ctd41cp_timestamp'
0110     'sci_water_pressure'
0111     'sci_water_cond'
0112     'sci_water_temp'
0113     'sci_flntu_chlor_units'
0114     'sci_flntu_turb_units'
0115     'sci_flntu_temp'
0116     'sci_flntu_timestamp'
0117     'sci_oxy3835_oxygen'
0118     'sci_oxy3835_saturation'
0119     'sci_oxy3835_temp'
0120     'sci_oxy3835_timestamp'
0121   };
0122   
0123 end

Generated on Fri 06-Oct-2017 10:47:42 by m2html © 2005