read_tobii_prolab#

pypillometry.read_tobii_prolab(fname)[source]#

Read a data export of Tobii Pro Lab (recordings of Tobii Pro Glasses).

The export (“Data Export” in Tobii Pro Lab) is one table with one row per sample of one of the sensors (eye tracker, gyroscope, accelerometer, magnetometer) or per event. This function splits it into one table per sensor.

Reading Excel files requires the optional package openpyxl and is slow (about half a minute for a three-minute recording); exports as tab-separated text (.tsv) are read much faster.

Parameters:

fname (str) – filename of the export: an Excel file (.xlsx) or a tab-separated text file (any other extension)

Return type:

dict[str, Any]

Returns:

  • "eye": pandas.DataFrame with the samples of the eye tracker: time (ms) and the gaze and pupil columns of the export under their original names (e.g., "Gaze point X", "Pupil diameter left")

  • "gyro", "acc", "mag": DataFrames with the samples of the gyroscope (deg/s), accelerometer (m/s²) and magnetometer (µT): time (ms), x, y, z; empty if the export has no such data

  • "events": DataFrame with time (ms) and label

  • "info": dict that describes the recording (e.g., "participant", "recording", "date")

See also

pypillometry.HeadMountedEyeData.from_tobii_prolab

create a data object from the export