Event classes (blinks, fixations, saccades, events)#

class pyneon.events.NeonEV(file)#

Bases: NeonTabular

Base for Neon event data (blinks, fixations, saccades, “events” messages).

property start_ts: ndarray#

Start timestamps of events in nanoseconds..

property end_ts: ndarray#

End timestamps of events in nanoseconds.

property durations: ndarray#

Duration of events in milliseconds.

property id: ndarray#

Event ID.

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 to None.

  • tmax (number, optional) – End timestamp/row to crop the data to. If None, the maximum timestamp/row in the data is used. Defaults to None.

  • 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, otherwise None.

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:

NeonEV

Bases: NeonEV

Blink data.

class pyneon.events.NeonFixations(file)#

Bases: NeonEV

Fixation data.

class pyneon.events.NeonSaccades(file)#

Bases: NeonEV

Saccade data.

class pyneon.events.NeonEvents(file)#

Bases: NeonEV

Event data.