pymovements.datasets.GazeBase#
- class pymovements.datasets.GazeBase(name: str = 'GazeBase', mirrors: tuple[str] = ('https://figshare.com/ndownloader/files/', ), resources: tuple[dict[str, str]] = ({'filename': 'GazeBase_v2_0.zip', 'md5': 'cb7eb895fb48f8661decf038ab998c9a', 'resource': '27039812'}, ), experiment: Experiment = <pymovements.gaze.experiment.Experiment object>, filename_format: str = 'S_{round_id:1d}{subject_id:d}_S{session_id:d}_{task_name}.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: 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)#
GazeBase dataset [Griffith et al., 2021].
This dataset includes monocular (left eye) eye tracking data from 322 participants captured over a period of 37 months. Participants attended up to 9 rounds during this time frame, with each round consisting of two contiguous sessions.
Eye movements are recorded at a sampling frequency of 1000 Hz using an EyeLink 1000 video-based 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, including a fixation task (FIX), a horizontal saccade task (HSS), a random saccade task (RAN), a reading task (TEX), two free viewing video tasks (VD1 and VD2) and a gaze-driven gaming task (BLG).
Check the respective paper for details [Griffith et al., 2021].
- 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:
- 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 theGazeBase
definition:>>> import pymovements as pm >>> >>> dataset = pm.Dataset("GazeBase", path='data/GazeBase')
Download the dataset resources:
>>> dataset.download()
Load the data into memory:
>>> dataset.load()
- __init__(name: str = 'GazeBase', mirrors: tuple[str] = ('https://figshare.com/ndownloader/files/', ), resources: tuple[dict[str, str]] = ({'filename': 'GazeBase_v2_0.zip', 'md5': 'cb7eb895fb48f8661decf038ab998c9a', 'resource': '27039812'}, ), experiment: Experiment = <pymovements.gaze.experiment.Experiment object>, filename_format: str = 'S_{round_id:1d}{subject_id:d}_S{session_id:d}_{task_name}.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: 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, mirrors, resources, ...])Attributes
acceleration_columns
distance_column
pixel_columns
position_columns
time_column
time_unit
trial_columns
velocity_columns