Spike Trains
A spike train in NeuroExplorer represents spike timestamps (the times when the spikes occurred). A special Waveform data type is used to store both the timestamps and the spike waveform values.
Note
Events are very similar to spike trains. The only difference between spike trains and events is that spike trains may contain additional information about recording sites, electrode numbers, cluster numbers, etc. (for example, spike trains contain positions of neurons used in the 3D activity “movie” shown via 3D View | 3D Activity Animation menu command).
Internally, the timestamps are stored as 64-bit signed integers. These integers are usually the timestamps recorded by the data acquisition system and they represent time in the so-called time ticks. For example, the typical time tick for Plexon system is 25 microseconds, so an event recorded at 1 sec will have the timestamp equal to 40000.
Limitations
NeuroExplorer requires that, in each spike train, all the timestamps are in ascending order, that is
timestamp[i+1] > timestamp[i] for all i
.
NeuroExplorer also requires that
timestamp[i] >= 0 for all i
.
Timestamped Variables in NexScript and Python
You can get access to any timestamp in the current file. For example,
to assign the value 0.5 (sec) to the third timestamp of the variable SPK01a
, you can use this script:
doc = GetActiveDocument()
doc["SPK01a"][3] = 0.5
In Python, the best way to access the timestamps is to get all the neuron timestamps at once:
import nex
doc = nex.GetActiveDocument()
# get all timestamps for neuron SPK01a
ts = doc["SPK01a"].Timestamps()
Viewers
You can view the timestamps of the selected variables in graphical display (View | 1D Data Viewer menu command):
Numerical values of the timestamps (in seconds) are shown in the Timestamps sheet of the Data view: