MakeIntFromEnd
Creates new interval variable. For each timestamp tend
of the intEndVar
,
it looks for the last timestamp (tstart
) of the intStartVar
before tend
.
If tstart
is after the previous timestamp of intEndVar
, it adds the interval [tstart+shift1, tend+shift2]
to the result.
Syntax
MakeIntFromEnd(intStartVar, intEndVar, shift1, shift2)
Parameters
Parameter |
Type |
Description |
---|---|---|
intStartVar |
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. |
intEndVar |
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. |
shift1 |
number |
Shift minimum (seconds). |
shift2 |
number |
Shift maximum (seconds). |
Return
Reference to the new variable.
Examples
Python
import nex
doc = nex.GetActiveDocument()
doc["Int2"] = nex.MakeIntFromEnd(doc["FrameStart"], doc["FrameEnd"], - 0.1, 0.1)
NexScript
doc = GetActiveDocument()
doc["Int2"] = MakeIntFromEnd(doc["FrameStart"], doc["FrameEnd"], -0.1, 0.1)