Skip to content

Streaming Gaze Data

Use device.receive_gaze_datum to receive gaze data.

gaze = device.receive_gaze_datum()

This function can return different types of gaze data (GazeDataType) depending on the device and its configuration:

See below samples for each type of gaze data.

GazeData(
    x=784.0623779296875,
    y=537.4524536132812,
    worn=False,
    timestamp_unix_seconds=1744294828.3579288
)

This method exposes gaze data

GazeData

GazeData

Bases: NamedTuple

Basic gaze data with position, timestamp and indicator of glasses worn status.

Represents the 2D gaze point on the scene camera coordinates with a timestamp in nanoseconds unix epoch and an indicator of whether the glasses are being worn.

Methods:

  • from_raw

    Create a GazeData instance from raw data.

Attributes:

datetime property

datetime: datetime

Get the timestamp as a datetime object.

timestamp_unix_ns property

timestamp_unix_ns: int

Get the timestamp in nanoseconds since Unix epoch.

timestamp_unix_seconds instance-attribute

timestamp_unix_seconds: float

Timestamp in seconds since Unix epoch.

worn instance-attribute

worn: bool

Whether the glasses are being worn.

x instance-attribute

x: float

"X coordinate of the gaze point

y instance-attribute

y: float

Y coordinate of the gaze point.

from_raw classmethod

from_raw(data: RTSPData) -> GazeData

Create a GazeData instance from raw data.

Parameters:

  • data (RTSPData) –

    The raw data received from the RTSP stream.

Returns:

  • GazeData ( GazeData ) –

    An instance of GazeData with the parsed values.

Source code in src/pupil_labs/realtime_api/streaming/gaze.py
35
36
37
38
39
40
41
42
43
44
45
46
47
@classmethod
def from_raw(cls, data: RTSPData) -> "GazeData":
    """Create a GazeData instance from raw data.

    Args:
        data (RTSPData): The raw data received from the RTSP stream.

    Returns:
        GazeData: An instance of GazeData with the parsed values.

    """
    x, y, worn = struct.unpack("!ffB", data.raw)
    return cls(x, y, worn == 255, data.timestamp_unix_seconds)

Neon +2.9.31 +1.8.0

BinoAndDualMonoGazeData(
    x=848.9487915039062,
    y=474.46356201171875,
    worn=True,
    mono_left_x=895.11083984375,
    mono_left_y=477.2065734863281,
    mono_right_x=800.8253173828125,
    mono_right_y=469.348388671875,
    timestamp_unix_seconds=1772109976.1031907
)

This method exposes gaze data for Neon in Dual Mono mode, which includes binocular and monocular gaze data.

BinoAndDualMonoGazeData

BinoAndDualMonoGazeData

Bases: NamedTuple

Binocular and dual monocular gaze data

Represents the binocular 2D gaze point, the left and right dual monocular gaze points, on the scene camera coordinates with a timestamp in seconds unix epoch and an indicator of whether the glasses are being worn.

Methods:

  • from_raw

    Create a BinoAndDualMonoGazeData instance from raw data.

Attributes:

  • datetime (datetime) –

    Get the timestamp as a datetime object.

  • mono_left_x (float) –

    X coordinate of the left monocular gaze point.

  • mono_left_y (float) –

    Y coordinate of the left monocular gaze point.

  • mono_right_x (float) –

    X coordinate of the right monocular gaze point.

  • mono_right_y (float) –

    Y coordinate of the right monocular gaze point.

  • timestamp_unix_ns (int) –

    Get the timestamp in nanoseconds since Unix epoch.

  • worn (bool) –

    Whether the glasses are being worn.

  • x (float) –

    X coordinate of the gaze point.

  • y (float) –

    Y coordinate of the gaze point.

datetime property

datetime: datetime

Get the timestamp as a datetime object.

mono_left_x instance-attribute

mono_left_x: float

X coordinate of the left monocular gaze point.

mono_left_y instance-attribute

mono_left_y: float

Y coordinate of the left monocular gaze point.

mono_right_x instance-attribute

mono_right_x: float

X coordinate of the right monocular gaze point.

mono_right_y instance-attribute

mono_right_y: float

Y coordinate of the right monocular gaze point.

timestamp_unix_ns property

timestamp_unix_ns: int

Get the timestamp in nanoseconds since Unix epoch.

worn instance-attribute

worn: bool

Whether the glasses are being worn.

x instance-attribute

x: float

X coordinate of the gaze point.

y instance-attribute

y: float

Y coordinate of the gaze point.

from_raw classmethod

from_raw(data: RTSPData) -> BinoAndDualMonoGazeData

Create a BinoAndDualMonoGazeData instance from raw data.

Parameters:

  • data (RTSPData) –

    The raw data received from the RTSP stream.

Returns:

Source code in src/pupil_labs/realtime_api/streaming/gaze.py
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
@classmethod
def from_raw(cls, data: RTSPData) -> "BinoAndDualMonoGazeData":
    """Create a BinoAndDualMonoGazeData instance from raw data.

    Args:
        data (RTSPData): The raw data received from the RTSP stream.

    Returns:
        BinoAndDualMonoGazeData: An instance of BinoAndDualMonoGazeData with the
        parsed values.

    """
    x, y, worn, mono_left_x, mono_left_y, mono_right_x, mono_right_y = (
        struct.unpack("!ffBffff", data.raw)
    )
    return cls(
        x,
        y,
        worn == 255,
        mono_left_x,
        mono_left_y,
        mono_right_x,
        mono_right_y,
        data.timestamp_unix_seconds,
    )

Neon +2.8.8 +1.2.0

EyestateGazeData(
    x=784.0623779296875,
    y=537.4524536132812,
    worn=False,
    pupil_diameter_left=4.306737899780273,
    eyeball_center_left_x=-29.3125,
    eyeball_center_left_y=11.6875,
    eyeball_center_left_z=-42.15625,
    optical_axis_left_x=0.09871648252010345,
    optical_axis_left_y=0.15512824058532715,
    optical_axis_left_z=0.9829498529434204,
    pupil_diameter_right=3.2171919345855713,
    eyeball_center_right_x=33.21875,
    eyeball_center_right_y=12.84375,
    eyeball_center_right_z=-45.34375,
    optical_axis_right_x=-0.20461124181747437,
    optical_axis_right_y=0.1512681096792221,
    optical_axis_right_z=0.9670844078063965,
    timestamp_unix_seconds=1744294828.3579288
)
This method exposes gaze data, pupil diameter, and eye poses.

EyestateGazeData

EyestateGazeData

Bases: NamedTuple

Gaze data with additional eye state information.

Contains gaze point, pupil diameter, eyeball center coordinates, and optical axis coordinates for both left and right eyes.

Methods:

  • from_raw

    Create an EyestateGazeData instance from raw data.

Attributes:

datetime property

datetime: datetime

Get the timestamp as a datetime object.

eyeball_center_left_x instance-attribute

eyeball_center_left_x: float

X coordinate of the eyeball center for the left eye.

eyeball_center_left_y instance-attribute

eyeball_center_left_y: float

Y coordinate of the eyeball center for the left eye.

eyeball_center_left_z instance-attribute

eyeball_center_left_z: float

Z coordinate of the eyeball center for the left eye.

eyeball_center_right_x instance-attribute

eyeball_center_right_x: float

X coordinate of the eyeball center for the right eye.

eyeball_center_right_y instance-attribute

eyeball_center_right_y: float

Y coordinate of the eyeball center for the right eye.

eyeball_center_right_z instance-attribute

eyeball_center_right_z: float

Z coordinate of the eyeball center for the right eye.

optical_axis_left_x instance-attribute

optical_axis_left_x: float

X coordinate of the optical axis for the left eye.

optical_axis_left_y instance-attribute

optical_axis_left_y: float

Y coordinate of the optical axis for the left eye.

optical_axis_left_z instance-attribute

optical_axis_left_z: float

Z coordinate of the optical axis for the left eye.

optical_axis_right_x instance-attribute

optical_axis_right_x: float

X coordinate of the optical axis for the right eye.

optical_axis_right_y instance-attribute

optical_axis_right_y: float

Y coordinate of the optical axis for the right eye.

optical_axis_right_z instance-attribute

optical_axis_right_z: float

Z coordinate of the optical axis for the right eye.

pupil_diameter_left instance-attribute

pupil_diameter_left: float

Pupil diameter for the left eye.

pupil_diameter_right instance-attribute

pupil_diameter_right: float

Pupil diameter for the right eye.

timestamp_unix_ns property

timestamp_unix_ns: int

Get the timestamp in nanoseconds since Unix epoch.

timestamp_unix_seconds instance-attribute

timestamp_unix_seconds: float

Timestamp in seconds since Unix epoch.

worn instance-attribute

worn: bool

Whether the glasses are being worn.

x instance-attribute

x: float

X coordinate of the gaze point.

y instance-attribute

y: float

Y coordinate of the gaze point.

from_raw classmethod

from_raw(data: RTSPData) -> EyestateGazeData

Create an EyestateGazeData instance from raw data.

Parameters:

  • data (RTSPData) –

    The raw data received from the RTSP stream.

Returns:

  • EyestateGazeData ( EyestateGazeData ) –

    An instance of EyestateGazeData with the parsed values.

Source code in src/pupil_labs/realtime_api/streaming/gaze.py
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
@classmethod
def from_raw(cls, data: RTSPData) -> "EyestateGazeData":
    """Create an EyestateGazeData instance from raw data.

    Args:
        data (RTSPData): The raw data received from the RTSP stream.

    Returns:
        EyestateGazeData: An instance of EyestateGazeData with the parsed values.

    """
    (
        x,
        y,
        worn,
        pupil_diameter_left,
        eyeball_center_left_x,
        eyeball_center_left_y,
        eyeball_center_left_z,
        optical_axis_left_x,
        optical_axis_left_y,
        optical_axis_left_z,
        pupil_diam_right,
        eyeball_center_right_x,
        eyeball_center_right_y,
        eyeball_center_right_z,
        optical_axis_right_x,
        optical_axis_right_y,
        optical_axis_right_z,
    ) = struct.unpack("!ffBffffffffffffff", data.raw)
    return cls(
        x,
        y,
        worn == 255,
        pupil_diameter_left,
        eyeball_center_left_x,
        eyeball_center_left_y,
        eyeball_center_left_z,
        optical_axis_left_x,
        optical_axis_left_y,
        optical_axis_left_z,
        pupil_diam_right,
        eyeball_center_right_x,
        eyeball_center_right_y,
        eyeball_center_right_z,
        optical_axis_right_x,
        optical_axis_right_y,
        optical_axis_right_z,
        data.timestamp_unix_seconds,
    )

Neon +2.9.0 +1.3.6

EyestateEyelidGazeData(
    x=784.0623779296875,
    y=537.4524536132812,
    worn=False,
    pupil_diameter_left=4.306737899780273,
    eyeball_center_left_x=-29.3125,
    eyeball_center_left_y=11.6875,
    eyeball_center_left_z=-42.15625,
    optical_axis_left_x=0.09871648252010345,
    optical_axis_left_y=0.15512824058532715,
    optical_axis_left_z=0.9829498529434204,
    pupil_diameter_right=3.2171919345855713,
    eyeball_center_right_x=33.21875,
    eyeball_center_right_y=12.84375,
    eyeball_center_right_z=-45.34375,
    optical_axis_right_x=-0.20461124181747437,
    optical_axis_right_y=0.1512681096792221,
    optical_axis_right_z=0.9670844078063965,
    eyelid_angle_top_left=-1.1484375,
    eyelid_angle_bottom_left=-1.2763671875,
    eyelid_aperture_left=1.6408717632293701,
    eyelid_angle_top_right=-0.6259765625,
    eyelid_angle_bottom_right=-1.2216796875,
    eyelid_aperture_right=7.2039408683776855,
    timestamp_unix_seconds=1744294828.3579288
)
This method exposes gaze data, pupil diameter, eye poses, and eye openness data.

EyestateEyelidGazeData

EyestateEyelidGazeData

Bases: NamedTuple

Gaze data with additional eyelid state information.

Contains gaze point, pupil diameter, eyeball center coordinates, optical axis coordinates, as well as eyelid angles and aperture for both left and right eyes.

Methods:

  • from_raw

    Create an EyestateEyelidGazeData instance from raw data.

Attributes:

datetime property

datetime: datetime

Get the timestamp as a datetime object.

eyeball_center_left_x instance-attribute

eyeball_center_left_x: float

X coordinate of the eyeball center for the left eye.

eyeball_center_left_y instance-attribute

eyeball_center_left_y: float

Y coordinate of the eyeball center for the left eye.

eyeball_center_left_z instance-attribute

eyeball_center_left_z: float

Z coordinate of the eyeball center for the left eye.

eyeball_center_right_x instance-attribute

eyeball_center_right_x: float

X coordinate of the eyeball center for the right eye.

eyeball_center_right_y instance-attribute

eyeball_center_right_y: float

Y coordinate of the eyeball center for the right eye.

eyeball_center_right_z instance-attribute

eyeball_center_right_z: float

Z coordinate of the eyeball center for the right eye.

eyelid_angle_bottom_left instance-attribute

eyelid_angle_bottom_left: float

Angle of the bottom eyelid for the left eye(rad).

eyelid_angle_bottom_right instance-attribute

eyelid_angle_bottom_right: float

Angle of the bottom eyelid for the right eye (rad).

eyelid_angle_top_left instance-attribute

eyelid_angle_top_left: float

Angle of the top eyelid for the left eye(rad).

eyelid_angle_top_right instance-attribute

eyelid_angle_top_right: float

Angle of the top eyelid for the right eye (rad).

eyelid_aperture_left instance-attribute

eyelid_aperture_left: float

Aperture of the eyelid for the left eye (mm).

eyelid_aperture_right instance-attribute

eyelid_aperture_right: float

Aperture of the eyelid for the right eye (mm).

optical_axis_left_x instance-attribute

optical_axis_left_x: float

X coordinate of the optical axis for the left eye.

optical_axis_left_y instance-attribute

optical_axis_left_y: float

Y coordinate of the optical axis for the left eye.

optical_axis_left_z instance-attribute

optical_axis_left_z: float

Z coordinate of the optical axis for the left eye.

optical_axis_right_x instance-attribute

optical_axis_right_x: float

X coordinate of the optical axis for the right eye.

optical_axis_right_y instance-attribute

optical_axis_right_y: float

Y coordinate of the optical axis for the right eye.

optical_axis_right_z instance-attribute

optical_axis_right_z: float

Z coordinate of the optical axis for the right eye.

pupil_diameter_left instance-attribute

pupil_diameter_left: float

Pupil diameter for the left eye.

pupil_diameter_right instance-attribute

pupil_diameter_right: float

Pupil diameter for the right eye.

timestamp_unix_ns property

timestamp_unix_ns: int

Get the timestamp in nanoseconds since Unix epoch.

timestamp_unix_seconds instance-attribute

timestamp_unix_seconds: float

Timestamp in seconds since Unix epoch.

worn instance-attribute

worn: bool

Whether the glasses are being worn.

x instance-attribute

x: float

X coordinate of the gaze point.

y instance-attribute

y: float

Y coordinate of the gaze point.

from_raw classmethod

from_raw(data: RTSPData) -> EyestateEyelidGazeData

Create an EyestateEyelidGazeData instance from raw data.

Parameters:

  • data (RTSPData) –

    The raw data received from the RTSP stream.

Returns:

  • EyestateEyelidGazeData ( EyestateEyelidGazeData ) –

    An instance of EyestateEyelidGazeData with the parsed values.

Source code in src/pupil_labs/realtime_api/streaming/gaze.py
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
@classmethod
def from_raw(cls, data: RTSPData) -> "EyestateEyelidGazeData":
    """Create an EyestateEyelidGazeData instance from raw data.

    Args:
        data (RTSPData): The raw data received from the RTSP stream.

    Returns:
        EyestateEyelidGazeData: An instance of EyestateEyelidGazeData with the
            parsed values.

    """
    (
        x,
        y,
        worn,
        pupil_diameter_left,
        eyeball_center_left_x,
        eyeball_center_left_y,
        eyeball_center_left_z,
        optical_axis_left_x,
        optical_axis_left_y,
        optical_axis_left_z,
        pupil_diam_right,
        eyeball_center_right_x,
        eyeball_center_right_y,
        eyeball_center_right_z,
        optical_axis_right_x,
        optical_axis_right_y,
        optical_axis_right_z,
        eyelid_angle_top_left,
        eyelid_angle_bottom_left,
        eyelid_aperture_left,
        eyelid_angle_top_right,
        eyelid_angle_bottom_right,
        eyelid_aperture_right,
    ) = struct.unpack("!ffBffffffffffffffffffff", data.raw)
    return cls(
        x,
        y,
        worn == 255,
        pupil_diameter_left,
        eyeball_center_left_x,
        eyeball_center_left_y,
        eyeball_center_left_z,
        optical_axis_left_x,
        optical_axis_left_y,
        optical_axis_left_z,
        pupil_diam_right,
        eyeball_center_right_x,
        eyeball_center_right_y,
        eyeball_center_right_z,
        optical_axis_right_x,
        optical_axis_right_y,
        optical_axis_right_z,
        eyelid_angle_top_left,
        eyelid_angle_bottom_left,
        eyelid_aperture_left,
        eyelid_angle_top_right,
        eyelid_angle_bottom_right,
        eyelid_aperture_right,
        data.timestamp_unix_seconds,
    )

Neon +2.9.31 +1.8.0

EyestateEyelidDualMonoGazeData(
    x=852.3287353515625,
    y=517.3056030273438,
    worn=False,
    pupil_diameter_left=4.567640781402588,
    eyeball_center_left_x=-32.25,
    eyeball_center_left_y=18.6875,
    eyeball_center_left_z=-44.9375,
    optical_axis_left_x=0.20407231152057648,
    optical_axis_left_y=-0.020999005064368248,
    optical_axis_left_z=0.9787306189537048,
    pupil_diameter_right=3.035294771194458,
    eyeball_center_right_x=30.15625,
    eyeball_center_right_y=14.375,
    eyeball_center_right_z=-43.3125,
    optical_axis_right_x=-0.08533422648906708,
    optical_axis_right_y=-0.019046271219849586,
    optical_axis_right_z=0.9961703419685364,
    eyelid_angle_top_left=-0.63037109375,
    eyelid_angle_bottom_left=-1.138671875,
    eyelid_aperture_left=6.09653902053833,
    eyelid_angle_top_right=-0.06329345703125,
    eyelid_angle_bottom_right=0.1409912109375,
    eyelid_aperture_right=2.228158473968506,
    mono_left_x=864.9857177734375,
    mono_left_y=526.5974731445312,
    mono_right_x=834.6492309570312,
    mono_right_y=481.4454040527344,
    timestamp_unix_seconds=1772108289.6118817
)
This method exposes binocular and monocular gaze data, pupil diameter, and eye poses.

EyestateEyelidDualMonoGazeData

EyestateEyelidDualMonoGazeData

Bases: NamedTuple

Gaze data with additional eyelid state information.

Contains binocular gaze point, left and right monocular gaze points, pupil diameter, eyeball center coordinates, optical axis coordinates, as well as eyelid angles and aperture for both left and right eyes.

Methods:

  • from_raw

    Create an EyestateEyelidDualMonoGazeData instance from raw data.

Attributes:

eyeball_center_left_x instance-attribute

eyeball_center_left_x: float

X coordinate of the eyeball center for the left eye.

eyeball_center_left_y instance-attribute

eyeball_center_left_y: float

Y coordinate of the eyeball center for the left eye.

eyeball_center_left_z instance-attribute

eyeball_center_left_z: float

Z coordinate of the eyeball center for the left eye.

eyeball_center_right_x instance-attribute

eyeball_center_right_x: float

X coordinate of the eyeball center for the right eye.

eyeball_center_right_y instance-attribute

eyeball_center_right_y: float

Y coordinate of the eyeball center for the right eye.

eyeball_center_right_z instance-attribute

eyeball_center_right_z: float

Z coordinate of the eyeball center for the right eye.

eyelid_angle_bottom_left instance-attribute

eyelid_angle_bottom_left: float

Angle of the bottom eyelid for the left eye(rad).

eyelid_angle_bottom_right instance-attribute

eyelid_angle_bottom_right: float

Angle of the bottom eyelid for the right eye (rad).

eyelid_angle_top_left instance-attribute

eyelid_angle_top_left: float

Angle of the top eyelid for the left eye(rad).

eyelid_angle_top_right instance-attribute

eyelid_angle_top_right: float

Angle of the top eyelid for the right eye (rad).

eyelid_aperture_left instance-attribute

eyelid_aperture_left: float

Aperture of the eyelid for the left eye (mm).

eyelid_aperture_right instance-attribute

eyelid_aperture_right: float

Aperture of the eyelid for the right eye (mm).

mono_left_x instance-attribute

mono_left_x: float

X coordinate of the left monocular gaze point.

mono_left_y instance-attribute

mono_left_y: float

Y coordinate of the left monocular gaze point.

mono_right_x instance-attribute

mono_right_x: float

X coordinate of the right monocular gaze point.

mono_right_y instance-attribute

mono_right_y: float

Y coordinate of the right monocular gaze point.

optical_axis_left_x instance-attribute

optical_axis_left_x: float

X coordinate of the optical axis for the left eye.

optical_axis_left_y instance-attribute

optical_axis_left_y: float

Y coordinate of the optical axis for the left eye.

optical_axis_left_z instance-attribute

optical_axis_left_z: float

Z coordinate of the optical axis for the left eye.

optical_axis_right_x instance-attribute

optical_axis_right_x: float

X coordinate of the optical axis for the right eye.

optical_axis_right_y instance-attribute

optical_axis_right_y: float

Y coordinate of the optical axis for the right eye.

optical_axis_right_z instance-attribute

optical_axis_right_z: float

Z coordinate of the optical axis for the right eye.

pupil_diameter_left instance-attribute

pupil_diameter_left: float

Pupil diameter for the left eye.

pupil_diameter_right instance-attribute

pupil_diameter_right: float

Pupil diameter for the right eye.

timestamp_unix_seconds instance-attribute

timestamp_unix_seconds: float

Timestamp in seconds since Unix epoch.

worn instance-attribute

worn: bool

Whether the glasses are being worn.

x instance-attribute

x: float

X coordinate of the gaze point.

y instance-attribute

y: float

Y coordinate of the gaze point.

from_raw classmethod

Create an EyestateEyelidDualMonoGazeData instance from raw data.

Parameters:

  • data (RTSPData) –

    The raw data received from the RTSP stream.

Returns:

Source code in src/pupil_labs/realtime_api/streaming/gaze.py
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
@classmethod
def from_raw(cls, data: RTSPData) -> "EyestateEyelidDualMonoGazeData":
    """Create an EyestateEyelidDualMonoGazeData instance from raw data.

    Args:
        data (RTSPData): The raw data received from the RTSP stream.

    Returns:
        EyestateEyelidDualMonoGazeData:An instance of EyestateEyelidDualMonoGazeData
        with the parsed values.

    """
    (
        x,
        y,
        worn,
        pupil_diameter_left,
        eyeball_center_left_x,
        eyeball_center_left_y,
        eyeball_center_left_z,
        optical_axis_left_x,
        optical_axis_left_y,
        optical_axis_left_z,
        pupil_diam_right,
        eyeball_center_right_x,
        eyeball_center_right_y,
        eyeball_center_right_z,
        optical_axis_right_x,
        optical_axis_right_y,
        optical_axis_right_z,
        eyelid_angle_top_left,
        eyelid_angle_bottom_left,
        eyelid_aperture_left,
        eyelid_angle_top_right,
        eyelid_angle_bottom_right,
        eyelid_aperture_right,
        mono_left_x,
        mono_left_y,
        mono_right_x,
        mono_right_y,
    ) = struct.unpack("!ffBffffffffffffffffffffffff", data.raw)
    return cls(
        x,
        y,
        worn == 255,
        pupil_diameter_left,
        eyeball_center_left_x,
        eyeball_center_left_y,
        eyeball_center_left_z,
        optical_axis_left_x,
        optical_axis_left_y,
        optical_axis_left_z,
        pupil_diam_right,
        eyeball_center_right_x,
        eyeball_center_right_y,
        eyeball_center_right_z,
        optical_axis_right_x,
        optical_axis_right_y,
        optical_axis_right_z,
        eyelid_angle_top_left,
        eyelid_angle_bottom_left,
        eyelid_aperture_left,
        eyelid_angle_top_right,
        eyelid_angle_bottom_right,
        eyelid_aperture_right,
        mono_left_x,
        mono_left_y,
        mono_right_x,
        mono_right_y,
        data.timestamp_unix_seconds,
    )

You can learn more about the payload in Under the Hood.

Full Code Examples

Check the whole example code here
stream_gaze.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
from pupil_labs.realtime_api.simple import discover_one_device

# Look for devices. Returns as soon as it has found the first device.
print("Looking for the next best device...")
device = discover_one_device(max_search_duration_seconds=10)
if device is None:
    print("No device found.")
    raise SystemExit(-1)

# device.streaming_start()  # optional, if not called, stream is started on-demand

try:
    while True:
        print(device.receive_gaze_datum())
except KeyboardInterrupt:
    pass
finally:
    print("Stopping...")
    # device.streaming_stop()  # optional, if not called, stream is stopped on close
    device.close()  # explicitly stop auto-update