FirstInInterval

Creates the new event. For each interval of the specified interval variable, the first timestamp in this interval is copied to the result.

Syntax

FirstInInterval(var, intervalVar)

Parameters

Parameter

Type

Description

var

variableReference

Reference to the neuron or event variable

intervalVar

variableReference

Reference to the interval variable.

Return

The reference to the new variable.

Note

Creates the new event. For each interval of intervalVar, the first var timestamp in this interval is copied to the result.

Examples

Python

import nex
doc = nex.GetActiveDocument()
doc["firstInTrial"] = nex.FirstInInterval(doc["Neuron04a"], doc["CorrectTrials"])

NexScript

doc = GetActiveDocument()
doc["firstInTrial"] = FirstInInterval(doc["Neuron04a"], doc["CorrectTrials"])