RSKopen.m

Arguments

Input

-Required- 

  • fname: file name of the RSK database

-Optional- 

  • readHiddenChannels: read hidden channel when set as true, default is false.

Output

  • RSK: structure containing the logger metadata
  • dbid: database id returned from mksqlite


This function makes a connection to an RSK (SQLite format) database as obtained from an RBR data logger and reads in the instrument's metadata. It creates a structure that contains the metadata and, for some files, a subset of the data referred to as downsample.

Example:

file = 'sample.rsk';
rsk = RSKopen(file);

The code block below shows an example for using RSKopen.m:

>> rsk = RSKopen('sample.rsk');
rsk = 
          toolSettings: [1x1 struct] 
                dbInfo: [1x1 struct] 
    instrumentChannels: [7x1 struct]
              channels: [7x1 struct]
                epochs: [1x1 struct] 
             schedules: [1x1 struct]
           deployments: [1x1 struct] 
           instruments: [1x1 struct]
           appSettings: [1x1 struct]
               ranging: [7x1 struct] 
            continuous: [1x1 struct] 
            parameters: [1x1 struct] 
         parameterKeys: [23x1 struct]  
                region: [762x1 struct] 
            regionCast: [508x1 struct] 
              profiles: [1x1 struct] 
                   log: {1x2 cell} 

A brief explanation of each field and sub-fields is as below:

  • toolSettings: settings of RSKtools
    • filename: file name of the rsk file being read
    • readHiddenChannels: value determining if RSKtools will read hidden channels or not
  • dbInfo: database info
    • version: Ruskin version reading rsk file
    • type: rsk file type
  • instrumentChannels: channels from the instrument, including instrument ID, channel ID, channel order and channel status.
  • channels: channels read into rsk structure, include channel short name, long name and units. Note that this might be different from instrumentChannels, depending on how users set `readHiddenChannels` in `RSKopen`.
  • epochs: programmed start and end times set in the logger
    • deploymentID 
    • startTime: programmed start time 
    • endTime: estimated end time based on available memory or power
  • schedules: schedules set in the logger 
    • scheduleID
    • instrumentID
    • mode: sampling mode
    • gate: gate condition
  • deployments: deployment info
    • deploymentID
    • instrumentID
    • comment
    • loggerStatus: status of the logger
    • loggerTimeDrift: the difference between the logger's clock and the computer's clock at the time of download, displayed in milliseconds. 
    • timeOfDownload: time when the data is downloaded from the logger to the computer
    • name: rsk file name and directory
    • sampleSize: number of samples during the deployment
  • instruments: instrument and firmware info
    • instrumentID 
    • serialID: serial ID of the instrument
    • model: model of the instrument
    • firmwareVersion: firmware version
    • firmwareType: firmware type
  • appSettings: Ruskin settings
    • deploymentID
    • ruskinVersion
  • ranging: info of channel mode and gain
  • continuous (or other mode name): mode info
    • continuousID
    • scheduleID
    • samplingPeriod: sampling period in milliseconds
  • parameters: parameters info
    • parameterID
    • tstamp: time stamp when the parameters were changed in the rsk file
  • parameterKeys: parameter ID, key and value
  • region: table contains regionID, event type, start/end time stamps and labels
  • regionCast: table contains regionID, regionProfileID and cast type
  • profiles: profiles info
    • downcast: start and end time stamp for each downcast
    • upcast: start and end time stamp for each upcast
    • orders: orders of casts (downcast or upcast first)
  • log: work log, details on each step of calling RSKtools functions


RSKopen requires a working mksqlite library. We have included four versions here in the toolbox for Windows (32/64 bit), Linux (64 bit) and Mac (64 bit), but you might need to compile another version. The source code can be downloaded from https://sourceforge.net/projects/mksqlite/files/. RSKtools currently uses mksqlite Version 2.5.

About readHiddenChannels

Please note that the hidden-channel data is accessible only when it is available in the RSK table. For the RSK with the type of EPdesktop, hidden-channel data is not stored in RSK file, thus, not readable even with readHiddenChannels = True.