GetFirstGT

Returns the index of the first timestamp in the specified variable that is greater than the specified number.

Syntax

GetFirstGT(var, time)

Parameters

Parameter

Type

Description

var

variableReference

Reference to the variable

time

number

Time value in seconds.

Return

Returns the index of the first timestamp in the specified variable that is greater than the specified number.

Examples

Python

import nex
doc = nex.GetActiveDocument()
neuron = doc["Neuron04a"]
# get the index of the first spike after 5.7s
index = nex.GetFirstGT(neuron, 5.7)

NexScript

doc = GetActiveDocument()
neuron = doc["Neuron04a"]
% get the index of the first spike after 5.7s
index = GetFirstGT(neuron, 5.7)