Skip to content

Importing Data

Bill Chapman edited this page Jun 8, 2016 · 3 revisions

Overview

You can import any desired data from a set of Nx1 vector in MATLAB, if your data is already imported in MATLAB (see Constructors below). Alternatively, we have provided scripts for importing from a few special cases of raw ephys recording files (Axona and Neuralynx). Please see the appropriate section below depending on your setup.

Neuralynx (GUI)

Running CMBHOME.SEEscript will start a series of graphical prompts to import a standard Neuralynx dataset. Instructions of what each prompt is looking for can be found in the title bar of the windows that pop up.

Axona (GUI)

!#TODO

Constructors

There is a constructor function in CMBHOME.Session, CMBHOME.LFP and CMBHOME.Spike. These functions can be identified by their call signature:

function self = Session(varargin)

Each of these functions uses an input parser to take in the base variables needed (eg for CMBHOME.Session, takes in x & y coordinates, time stamps, etc). Thus, a sample call to set up an entire session would be:

spk(1,1) = CMBHOME.Spike('ts', my_spike_times_t1_c1);
spk(1,2) = CMBHOME.Spike('ts', my_spike_times_t1_c2);
spk(12,3) = CMBHOME.Spike('ts', my_spike_times_t12_c3);

lfp(1) = CMBHOME.LFP(t1_sig,t1_ts,t1_fs);
lfp(12) = CMBHOME.LFP(t12_sig, t12_ts, t12_fs);

root = CMBHOME.Session('b_x', x, 'b_y', y, ...
                       'b_ts', ts, 'b_headdir', hd, ...
                       'fs_video', fs_video, ...
                       'spike', spk, ...
                       'b_lfp', lfp, ...
                       );

The first two blocks set up the spike and LFP structures, while the last uses these (and additional behavioral variables) to create the session object. After creation the object will align the timestamps of the spike, lfp, and behavioral variables.