the @spix class

A @spix object embeds spike data from previously created @cortex objects. In essence, a @spix object is a very large spike matrix collected from any number of units belonging to the same experiment. Additionally, it includes information on how to quickly select subsets of spike trains and run analyses. Please note that the @spix class does not provide support for behavioral, eog, epp, or touchscreen data.

  • To create a @spix object use the constructor function.
  • To add units to a @spix object and perform other object maintenance tasks, use object handling methods.
  • Information about the object can be retrieved using dot-properties of the @spix class.
  • Data can be retrieved or analyzed using @spix data analysis methods
  • Many @spix methods support RESTRICTIONS, optional arguments that specify parts of the object on which the method is to operate
  • While using analysis methods or dot-properties, you can use label indexing instead of numbers to access speficic items within the object

content of a @spix object

Aside from the spike matrix, the main components of a @spix object are the following:

keys an embedded @key object used by the method addunits() to select trial epochs to be appended to the spike matrix, and by other class methods to restrict analysis to specific data
units information on each of the single units added to the object; each unit is a structure containing the following fields:
  label unit nickname
source source @cortex object name
date recording date, optional
extra currently unused
subsets definitions of subsets of units to be included in the same batch analysis; each subset is a structure containing the following fields:
  label the subset name
units array of unit ID#s
groups definitions of groups of keys; analyses run on a group of keys yield separate results for each of the keys in the group; each group is a structure containing the following fields:
  label the key group name
keys the list of keys that belong to the group, by ID#
combos definitions of key combos; analyses run on a key combo combine trial epochs from all keys in the combo and yield a single result; each combo is a structure containing the following fields:
  label the key combo name
keys the list of keys that make up a combo, by ID#
factors definitions of analysis factors; currently, factors are only used by the method anovan(); each factor is a structure containing the following fields:
  label the factor name
levels factor levels; each level is defined by a set of keys that is similar to a combo, in that trial epochs selected by the different keys are combined together for the analysis; each level is a structure containing the following fields:
  label the level name
keys the list of keys that make up a level, by ID#

Use the following methods to add content to the object:

  • addunits
  • addsubset
  • addgroup
  • addcombo
  • addfactor

Note that keys are embedded in the object at construction time, and that keys can be replaced via the changekeys() method.


In addition to the above components, a @spix object maintains the following 2 lists:

inclunits list of currently "included" units; analyses run without explicitly specifying units or subsets will be performed on all units in this list
inkeys list of currently "included" keys; analyses run without explicitly specifying keys, groups, combos, or factors, will be performed repeatedly for each of the keys in this list

Use the following methods to change these lists:

  • excludeunits
  • restoreunits
  • selectunits
  • excludekeys
  • restorekeys
  • selectkeys

As usual with classes, object fields are not directly accessible to the user. This can be easily verified by trying to do something like:

>> sp.inkeys = 1:10

All the above, however, can be retrieved from a @spix object using the dot-property syntax, part of the class interface.