Spike Train Toolkit
     - Primer
     - Introduction
     - Toolkit Wiki
     - Download
     - Demonstrations
     - Input Format
     - Input Structures
     - Output Structures
     - Information Options
     - Entropy Options
     - Function Reference
     - Version History
     - License
     - Contribute
  Analysis Overview
     - Analyze Data
     - Your Submissions
  BrainML Models
  LNI Homepage
User ID

  Spike Train Analysis Toolkit Input Format

We have developed an easy-to-generate input file format for the Spike Train Analysis Toolkit. Each input data set is described by two files:

  • A data file, denoted by a .stad file extension (example)
  • A metadata file, denoted by a .stam file extension (examplethis example actually shows a .stap file, in which the text "DATAFILE_FULL_PATH" is replaced with the absolute path of the date file, as described below, when the toolkit is compiled with make.m)
The example uses data from Di Lorenzo & Victor (2003).

This file format can hold information about spike trains ("episodic" data) as well as regularly-sampled data ("continuous" data).

Data file

The data file is a text file that consists of several lines, each line corresponding to a particular spike train or continuously valued parameter (e.g., LFP). Each line consists of a list of spike times or sampled values; each item in the list is separated by spaces. Each list can be associated with several recording sites and stimulus categories.

Metadata file

The metadata file is a text file that describes the data in the data file. The metadata file provides information about four types of elements (each described in more detail below):

Describes the file that contains the data.
Describes the physical location(s) from which the data was obtained. In our framework, a data set should only contain multiple sites only if the sites were recorded simultaneously. Data from sites that were recorded sequentially should appear in separate file pairs.
Describes the groups in which the spike trains are partitioned. This is required because the spike trains must be classified into discrete categories for use with the toolkit.
Describes the spike trains contained in the data file.
The syntax of the metadata file is as follows:
  • The metadata file is essentially a collection of name/value pairs. A typical statement is of the form
    There should be no whitespace on either side of the equals sign. The semicolon is required at the end of all statements.
  • Using whitespace to separate the name/value pairs is optional.
  • Any line beginning with # (the "hash" or "pound" sign) is taken to be a comment and is ignored.


The datafile consists of a name/value pair that gives the absolute path of the data file (i.e., not the path relative to working directory or the location of the metadata file).




A site element consists of 5 name/value pairs:
The unique index of the site. This index is used by trace elements to refer to the site. The first index is 1, not 0. This name/value pair must be given first.
A text label that describes the site.
Can be either continuous or episodic.
The scale factor required to convert the time mesurements in seconds. If time measurements were reported in milliseconds, then time_scale=0.001.
The temporal resolution of the recording (prior to scaling by time_scale).
For continuous data, the pluralized international system of units (SI) base or derived unit of the sampled data (e.g., amperes, volts). This field is not required for episodic data.
For continuous data, the international system of units (SI) prefix, which is a power of ten (e.g., 10-3). Named prefixes are not allowed. This field is not required for episodic data.


site=1; label=unit_001; recording_tag=episodic; time_scale=1; time_resolution=0.001; si_unit=none; si_prefix=1;


A category element consists of 2 name/value pairs:

The unique index of the category. This index is used by trace elements to refer to the category. The first index is 1, not 0. This name/value pair must be given first.
A text label that describes the category.


category=1; label=NaCl;
category=2; label=Quinine HCl;
category=3; label=HCl;
category=4; label=Sucrose;


A trace element consists of 6 name/value pairs:

The unique index of the trace. The first index is 1, not 0. This name/value pair must be given first. This index gives the line number of the data file that is being described.
The index of the category that the trace belongs to.
The position of the trace in the sequence of repeated trials.
The index of the site the trace was recorded from. (Traces with the same catid and trialid, but differing siteids are assumed to be simultaneously recorded.)
The start time of the recording. This time is scaled by the site's time_scale to give the start time in seconds.
The end time of the recording. This time is scaled by the site's time_scale to give the end time in seconds.


trace=1; catid=1; trialid=1; siteid=1; start_time=10.000; end_time=20.000;
trace=2; catid=1; trialid=2; siteid=1; start_time=10.000; end_time=20.000;
trace=16; catid=1; trialid=16; siteid=1; start_time=10.000; end_time=20.000;
trace=17; catid=2; trialid=1; siteid=1; start_time=10.000; end_time=20.000;
trace=18; catid=2; trialid=2; siteid=1; start_time=10.000; end_time=20.000;
trace=32; catid=2; trialid=16; siteid=1; start_time=10.000; end_time=20.000;
trace=33; catid=3; trialid=1; siteid=1; start_time=10.000; end_time=20.000;
trace=34; catid=3; trialid=2; siteid=1; start_time=10.000; end_time=20.000;
trace=48; catid=3; trialid=16; siteid=1; start_time=10.000; end_time=20.000;
trace=49; catid=4; trialid=1; siteid=1; start_time=10.000; end_time=20.000;
trace=50; catid=4; trialid=2; siteid=1; start_time=10.000; end_time=20.000;
trace=64; catid=4; trialid=16; siteid=1; start_time=10.000; end_time=20.000;


Weill Medical College of Cornell University