Event classes (blinks, fixations, saccades, events)#
- class pyneon.events.NeonEV(file)#
Bases:
NeonTabular
Base for Neon event data (blinks, fixations, saccades, “events” messages).
- crop(tmin: Number | None = None, tmax: Number | None = None, by: Literal['timestamp', 'row'] = 'timestamp', inplace: bool = False) NeonEV | None #
Crop data to a specific time range based on timestamps or row numbers.
- Parameters:
tmin (number, optional) – Start timestamp/row to crop the data to. If
None
, the minimum timestamp/row in the data is used. Defaults toNone
.tmax (number, optional) – End timestamp/row to crop the data to. If
None
, the maximum timestamp/row in the data is used. Defaults toNone
.by ("timestamp" or "row", optional) – Whether tmin and tmax are UTC timestamps in nanoseconds or row numbers of the stream data. Defaults to “timestamp”.
inplace (bool, optional) – Whether to replace the data in the object with the cropped data. Defaults to False.
- Returns:
Cropped stream if
inplace=False
, otherwiseNone
.- Return type:
NeonEV or None
- restrict(other: NeonStream) NeonEV #
Restrict events to a time range defined by another stream.
- Parameters:
other (NeonStream) – Stream to restrict to.
- Returns:
Restricted event data.
- Return type: