pymovements.datasets.public_dataset.PublicDataset#
- class pymovements.datasets.public_dataset.PublicDataset(root: str, download: bool = False, extract: bool = False, remove_finished: bool = False, **kwargs)[source]#
Extends the Dataset base class with functionality for downloading and extracting public datasets.
To implement this abstract base class for a new dataset, the attributes/properties _mirrors and _resources must be implemented.
- __init__(root: str, download: bool = False, extract: bool = False, remove_finished: bool = False, **kwargs)[source]
Initialize dataset.
If desired, dataset resources will be downloaded and extracted.
- Parameters:
download (bool) – Download all dataset resources.
extract (bool) – Extract dataset archive files.
remove_finished (bool) – Remove archive files after extraction.
Methods
__init__(root[, download, extract, ...])Initialize dataset.
detect_events(method[, eye, verbose])Detect events by applying a specific event detection method.
download()Download dataset.
extract([remove_finished])Extract dataset archives.
Infer information from filepaths and filenames.
load([events, preprocessed, subset])Parse file information and load all gaze files.
Load all available event files.
load_gaze_files([preprocessed])Load all available gaze data files.
pix2deg([verbose])Compute gaze positions in degrees of visual angle from pixel coordinates.
pos2vel([method, verbose])Compute gaze velocites in dva/s from dva coordinates.
save([verbose])Save preprocessed gaze and event files.
save_events([verbose])Save events to files.
save_preprocessed([verbose])Save preprocessed gaze files.
take_subset([subset])Take a subset of the dataset.
Attributes
events_rootpathGet the path to the directory of the event data.
preprocessed_rootpathGet the path to the directory of the preprocessed gaze data.
raw_rootpathGet the path to the directory of the raw data.
rootpathGet the path to the dataset directory.