pymovements.datasets.GazeBaseVR#

class pymovements.datasets.GazeBaseVR(name: str = 'GazeBaseVR', has_files: dict[str, bool] = <factory>, mirrors: dict[str, list[str]] = <factory>, resources: dict[str, list[dict[str, str]]] = <factory>, experiment: Experiment = <factory>, extract: dict[str, bool] = <factory>, filename_format: dict[str, str] = <factory>, filename_format_schema_overrides: dict[str, dict[str, type]] = <factory>, custom_read_kwargs: dict[str, dict[str, Any]] = <factory>, column_map: dict[str, str] = <factory>, trial_columns: list[str] | None = None, time_column: str = 'n', time_unit: str = 'ms', pixel_columns: list[str] | None = None, position_columns: list[str] = <factory>, velocity_columns: list[str] | None = None, acceleration_columns: list[str] | None = None, distance_column: str | None = None)#

GazeBaseVR dataset [Lohr et al., 2023].

This dataset includes binocular plus an additional cyclopian eye tracking data from 407 participants captured over a 26-month period. Participants attended up to 3 rounds during this time frame, with each round consisting of two contiguous sessions.

Eye movements are recorded at a sampling frequency of 250 Hz a using SensoMotoric Instrument’s (SMI’s) tethered ET VR head-mounted display based on the HTC Vive (hereon called the ET-HMD) eye tracker and are provided as positional data in degrees of visual angle.

In each of the two sessions per round, participants are instructed to complete a series of tasks, a vergence task (VRG), a smooth pursuit task (PUR), a video viewing task (VID), a reading task (TEX), and a random saccade task (RAN).

Check the respective paper for details [Lohr et al., 2023].

name#

The name of the dataset.

Type:

str

has_files#

Indicate whether the dataset contains ‘gaze’, ‘precomputed_events’, and ‘precomputed_reading_measures’.

Type:

dict[str, bool]

mirrors#

A list of mirrors of the dataset. Each entry must be of type str and end with a ‘/’.

Type:

dict[str, list[str]]

resources#

A list of dataset gaze_resources. Each list entry must be a dictionary with the following keys: - resource: The url suffix of the resource. This will be concatenated with the mirror. - filename: The filename under which the file is saved as. - md5: The MD5 checksum of the respective file.

Type:

dict[str, list[dict[str, str]]]

extract#

Decide whether to extract the data.

Type:

dict[str, bool]

experiment#

The experiment definition.

Type:

Experiment

filename_format#

Regular expression which will be matched before trying to load the file. Namedgroups will appear in the fileinfo dataframe.

Type:

dict[str, str]

filename_format_schema_overrides#

If named groups are present in the filename_format, this makes it possible to cast specific named groups to a particular datatype.

Type:

dict[str, dict[str, type]]

time_column#

The name of the timestamp column in the input data frame. This column will be renamed to time.

Type:

str

time_unit#

The unit of the timestamps in the timestamp column in the input data frame. Supported units are ‘s’ for seconds, ‘ms’ for milliseconds and ‘step’ for steps. If the unit is ‘step’ the experiment definition must be specified. All timestamps will be converted to milliseconds.

Type:

str

position_columns#

The name of the dva position columns in the input data frame. These columns will be nested into the column position. If the list is empty or None, the nested position column will not be created.

Type:

list[str]

column_map#

The keys are the columns to read, the values are the names to which they should be renamed.

Type:

dict[str, str]

custom_read_kwargs#

If specified, these keyword arguments will be passed to the file reading function.

Type:

dict[str, dict[str, Any]]

Examples

Initialize your Dataset object with the GazeBaseVR definition:

>>> import pymovements as pm
>>>
>>> dataset = pm.Dataset("GazeBaseVR", path='data/GazeBaseVR')

Download the dataset resources:

>>> dataset.download()

Load the data into memory:

>>> dataset.load()
__init__(name: str = 'GazeBaseVR', has_files: dict[str, bool] = <factory>, mirrors: dict[str, list[str]] = <factory>, resources: dict[str, list[dict[str, str]]] = <factory>, experiment: Experiment = <factory>, extract: dict[str, bool] = <factory>, filename_format: dict[str, str] = <factory>, filename_format_schema_overrides: dict[str, dict[str, type]] = <factory>, custom_read_kwargs: dict[str, dict[str, Any]] = <factory>, column_map: dict[str, str] = <factory>, trial_columns: list[str] | None = None, time_column: str = 'n', time_unit: str = 'ms', pixel_columns: list[str] | None = None, position_columns: list[str] = <factory>, velocity_columns: list[str] | None = None, acceleration_columns: list[str] | None = None, distance_column: str | None = None) None

Methods

__init__([name, has_files, mirrors, ...])

from_yaml(path)

Load a dataset definition from a YAML file.

to_yaml(path)

Save a dataset definition to a YAML file.

Attributes