Skip to content

Session State

William Chapman edited this page Jul 16, 2014 · 1 revision

There are two properties of a session object which effect the state of the object. These are root.epoch and root.cel. Setting either one of these values changes the state of the session object. Once the state is changed, CMBHOME automatically updates the dynamic fields of Session objects. Using the state fields of session is one of the primary functionalities of CMBHOME.

Epochs

One of the main functionalities of CMBHOME is to create "epochs", or periods of time, to analyze seprately.

For instance, you may want to analyze the first and last 100 seconds of the session. To do this, you would use:

root.epoch = [0 100; ...
              root.b_ts(end)-100:root.b_ts(end)];

At this point, all of the time-variable fields in root would be a 2x1 cell array, with each cell containing data from a single epoch. This data can then be analyzed either seperately using cellfun(...), or in a continuized manner using CMBHOME.Utils.ContinuizeEpochs(...).

Active Cell

After importing spiking data into a session object, there are multiple listings in root.cells. root.cel_XX fields are dynamically populated based on the epoch and the active cell. So, if you want to get the x spiking locations of the second cluster on tetrode 12, use:

root.cel = [12 2];
root.cel_x

root.cel_XX fields will always be a cell array of MxN, where M is the number of epochs, and N is the number of cells currently set.

Clone this wiki locally