pymovements.datasets.GazeGraph#

class pymovements.datasets.GazeGraph(name: str = 'GazeGraph', mirrors: tuple[str, ...] = ('https://codeload.github.com/GazeGraphResource/GazeGraph/zip/refs/heads/',), resources: tuple[dict[str, str], ...] = ({'filename': 'gaze_graph_data.zip', 'md5': '181f4b79477cee6e0267482d989610b0', 'resource': 'master'},), experiment: Experiment = <pymovements.gaze.experiment.Experiment object>, filename_format: str = 'P{subject_id}_{task}.csv', filename_format_dtypes: dict[str, type] = <factory>, custom_read_kwargs: dict[str, Any] = <factory>, column_map: dict[str, str] = <factory>, trial_columns: list[str] = <factory>, time_column: Any = None, time_unit: Any = None, pixel_columns: list[str] = <factory>, position_columns: list[str] | None = None, velocity_columns: list[str] | None = None, acceleration_columns: list[str] | None = None, distance_column: str | None = None)#

GazeGraph dataset [Lan et al., 2020].

The dataset is collected from eight subjects (four female and four male, aged between 24 and 35) using the Pupil Core eye tracker. During data collection, the subjects wear the eye tracker and sit in front of the computer screen (a 34-inch display) at a distance of approximately 50cm. We conduct the manufacturer’s default on-screen five-points calibration for each of the subjects. Note that we have done only one calibration per subject, and the subjects can move their heads and upper bodies freely during the experiment. The gaze is recorded at a 30Hz sampling rate.

Check the respective paper for details [Lan et al., 2020].

name#

The name of the dataset.

Type:

str

mirrors#

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

Type:

tuple[str, …]

resources#

A tuple of dataset 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:

tuple[dict[str, str], …]

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:

str

filename_format_dtypes#

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, type], optional

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, Any], optional

Examples

Initialize your PublicDataset object with the GazeGraph definition:

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

Download the dataset resources:

>>> dataset.download()

Load the data into memory:

>>> dataset.load()
__init__(name: str = 'GazeGraph', mirrors: tuple[str, ...] = ('https://codeload.github.com/GazeGraphResource/GazeGraph/zip/refs/heads/',), resources: tuple[dict[str, str], ...] = ({'filename': 'gaze_graph_data.zip', 'md5': '181f4b79477cee6e0267482d989610b0', 'resource': 'master'},), experiment: Experiment = <pymovements.gaze.experiment.Experiment object>, filename_format: str = 'P{subject_id}_{task}.csv', filename_format_dtypes: dict[str, type] = <factory>, custom_read_kwargs: dict[str, Any] = <factory>, column_map: dict[str, str] = <factory>, trial_columns: list[str] = <factory>, time_column: Any = None, time_unit: Any = None, pixel_columns: list[str] = <factory>, position_columns: list[str] | None = None, velocity_columns: list[str] | None = None, acceleration_columns: list[str] | None = None, distance_column: str | None = None) None

Methods

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

Attributes

acceleration_columns

distance_column

experiment

filename_format

mirrors

name

pixel_columns

position_columns

resources

time_column

time_unit

trial_columns

velocity_columns

filename_format_dtypes

column_map

custom_read_kwargs