View on GitHub

SFR Toolbox for Matlab

Standardized Scientific File Access in Matlab.

Download this project as a .zip file Download this project as a tar.gz file

Scientific File Repository Toolbox

This toolbox can be used to access scientific data from a variety of different file-formats using standardized syntax. The toolbox assumes that your scientific data consists of continuous data on multiple channels which can be represented by a large 2D array of numerics. In addition, the files may contain attributes describing the data.

View the manual of the toolbox here: SFR-Toolbox Manual

Object oriented data access.

Data acquisition systems (i.e. TDT, Nicolet, Neuralynx, Blackrock, etc.) use various file formats to store their data. To analyze these data, a scientific lab needs to write methods for each individual system which can result in an inefficient workflow in the lab.

This toolbox addresses this issue by representing a dataset (which can consist of 1 or more files) by a single object. The user specifies which files belong to the dataset and which data-format is used in the files. The user can then access the raw data and the meta-data using the properties 'data' and 'attr' of the created object. The toolbox automatically uses the correct 'getMethods' for the associated file-format without any additional input from the user.

Specific GET methods per file -format

The strength of this toolbox is that there is a simple template that can be used to add support for additional file-formats. Basically, only two files are required to add support. An INFOMethod should return meta-information about the data in the form of a MATLAB structure and some initiation values that are used during the object construction. A GETMethod should return the data in a 2D array [indeces channels], utilizing the file-names that are provided in the object.

Additional features allow the user to improve efficiency by caching information from the GETMethod and allow the user to add meta-information directly to the object.

File Location manager

The toolbox uses a user-specific XML file to indicate where the files are located on the computer. The user can switch dynamically between multiple sets of locations which can be useful if the path to a specific file changes when the folder is accessed from home or from work. It is also possible to temporarily override the location and specify a direct path to the files.

Installation

  1. Download the project and save the downloaded folder on the Matlab path.
  2. Copy the 'sample_ReposFile.xml' to a different location and open with Matlab.
  3. Change the path attribute of the line that starts with to the location where you saved the project.

Viewing the example data.

  1. Start Matlab and browse to the \SFRExample folder.
  2. Set your SFR-location using: sfrsetlocation()
  3. Load the 'repos.mat' file in matlab.
  4. View the data using: repos.data(1:1000, 1:4)