GazeGraph#

class pymovements.datasets.GazeGraph(name: str = 'GazeGraph', long_name: str = 'GazeGraph dataset', mirrors: dict[str, Sequence[str]] = <factory>, resources: ResourceDefinitions = <factory>, experiment: Experiment = <factory>, extract: dict[str, bool] | None = None, custom_read_kwargs: dict[str, 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, filename_format: dict[str, str] | None = None, filename_format_schema_overrides: dict[str, dict[str, type]] | None = None)[source]#

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

long_name#

The entire name of the dataset.

Type:

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:

ResourceDefinitions

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] | None

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]] | None

trial_columns#

The name of the trial columns in the input data frame. If the list is empty or None, the input data frame is assumed to contain only one trial. If the list is not empty, the input data frame is assumed to contain multiple trials and the transformation methods will be applied to each trial separately.

Type:

list[str]

time_column#

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

Type:

Any

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:

Any

pixel_columns#

The name of the pixel position columns in the input data frame. These columns will be nested into the column pixel. If the list is empty or None, the nested pixel 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 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()

Methods

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

from_yaml(path)

Load a dataset definition from a YAML file.

to_dict(*[, exclude_private, exclude_none])

Return dictionary representation.

to_yaml(path, *[, exclude_private, exclude_none])

Save a dataset definition to a YAML file.

Attributes

acceleration_columns

distance_column

extract

filename_format

filename_format_schema_overrides

has_resources

Checks for resources in resources.

long_name

name

pixel_columns

position_columns

time_column

time_unit

trial_columns

velocity_columns

resources

experiment

column_map

custom_read_kwargs

mirrors