pymovements.datasets.base.PublicDataset
- class pymovements.datasets.base.PublicDataset(root: str, download: bool = False, remove_finished: bool = False, **kwargs)[source]
Extends the Dataset abstract base class with functionality for downloading in extracting.
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, remove_finished: bool = False, **kwargs)[source]
Initialize the dataset object.
- Parameters:
root (str, Path) – Path to the root directory of the dataset.
experiment (Experiment) – The experiment definition.
filename_regex (str) – Regular expression which needs to be matched before trying to read the file. Named groups will appear in the fileinfo dataframe.
filename_regex_dtypes (dict[str, type], optional) – If named groups are present in the filename_regex, this makes it possible to cast specific named groups to a particular datatype.
custom_read_kwargs (dict[str, Any], optional) – If specified, these keyword arguments will be passed to the file reading function.
Methods
__init__(root[, download, remove_finished])Initialize the dataset object.
download([remove_finished])Download dataset.
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.
read()Parse file information and read all gaze files.
Parse file information from filepaths and filenames.
Read all available gaze data files.
Attributes
dirpathGet the path to the dataset directory.
raw_dirpathGet the path to the directory of the raw data.