MakeIntervals

Creates new interval variable with intervals [varTimestamp+shiftMin, varTimestamp+shiftMax]. Overlapping intervals are merged.

Syntax

MakeIntervals(var, shiftMin, shiftMax)

Parameters

Parameter

Type

Description

var

variableReferenceUseTimestamps

Reference to neuron, event, marker, interval or waveform variable. For neuron, event or marker variable, the variable timestamps are used. For interval variable, interval start times are used as timestamps. For waveform variable, wave timestamps are used.

shiftMin

number

Shift minimum in seconds.

shiftMax

number

Shift maximum in seconds.

Return

Reference to the new variable.

Note

Creates new interval variable with intervals [varTimestamp+shiftMin, varTimestamp+shiftMax]. Overlapping intervals are merged.

Examples

Python

import nex
doc = nex.GetActiveDocument()
doc["IntAroundEvent04"] = nex.MakeIntervals(doc["Event04"], 0, 2)

NexScript

doc = GetActiveDocument()
doc["IntAroundEvent04"] = MakeIntervals(doc["Event04"], 0, 2)