get_tobii_pos

get_tobii_pos(win, p, units=None)

Convert PsychoPy coordinates to Tobii ADCS coordinates.

Transforms coordinates from PsychoPy’s coordinate system to Tobii’s Active Display Coordinate System (ADCS). This conversion is essential for sending calibration target positions to the Tobii eye tracker during calibration procedures.

ADCS uses normalized coordinates where (0,0) is top-left and (1,1) is bottom-right, regardless of screen size or resolution. This provides a hardware-independent coordinate system for eye tracking data.

Parameters

Name Type Description Default
win psychopy.visual.Window The PsychoPy window which provides information about units and size. Window properties determine the source coordinate system. required
p tuple The PsychoPy coordinates to convert as (x, y) in specified units. required
units str The units of the input PsychoPy coordinates. If None, uses the window’s default units. Supported: ‘norm’, ‘height’, ‘pix’, ‘cm’, ‘deg’, ‘degFlat’, ‘degFlatPos’. None

Returns

Name Type Description
tuple The converted Tobii ADCS coordinates as (x, y) where both values are in range [0, 1]. (0, 0) is top-left, (1, 1) is bottom-right.

Raises

Name Type Description
ValueError If the provided units are not supported.

Notes

This function is the inverse of get_psychopy_pos() and is primarily used during calibration to inform the eye tracker where calibration targets are displayed on screen.

Back to top