GetVarSpikeCount
Returns the number of timestamps in the specified variable.
Syntax
GetVarSpikeCount(doc, varNumber, varType)
Parameters
Parameter |
Type |
Description |
---|---|---|
doc |
documentReference |
Reference to the document |
varNumber |
number |
1-based variable number within the group specified by varType. |
varType |
string |
Variable type. Should be ‘neuron’, ‘neuronorevent’, ‘event’, ‘interval’, ‘wave’, ‘continuous’, ‘marker’ or ‘all’ |
Return
Returns the number of timestamps in the variable. For a continuous variable, returns the number of fragments.
Examples
Python
import nex
doc = nex.GetActiveDocument()
numSpikes = nex.GetVarSpikeCount(doc, 3, "neuron")
NexScript
doc = GetActiveDocument()
numSpikes = GetVarSpikeCount(doc, 3, "neuron")