DatasetPaths#

class pymovements.DatasetPaths(*, root: str | Path = 'data', dataset: str | None = None, raw: str = 'raw', events: str = 'events', precomputed_events: str = 'precomputed_events', precomputed_reading_measures: str = 'precomputed_reading_measures', preprocessed: str = 'preprocessed', downloads: str = 'downloads', stimuli: str = 'stimuli')[source]#

Defines the paths of a dataset.

root#

The root path of the dataset.

Type:

Path

dataset#

The path to the dataset directory.

Type:

Path

events#

The path to the event data directory.

Type:

Path

preprocessed#

The path to the preprocessed gaze data directory.

Type:

Path

raw#

The path to the raw data directory.

Type:

Path

precomputed_events#

The path to the precomputed event data directory.

Type:

Path

precomputed_reading_measures#

The path to the precomputed reading measures directory.

Type:

Path

downloads#

The path to the downloads directory.

Type:

Path

stimuli#

The path to the stimuli directory.

Type:

Path

Parameters:
  • root (str | Path) – Path to the root directory of the dataset. (default: ‘data’)

  • dataset (str | None) – Dataset directory name under root path. Can be . if dataset is located in root path. (default: None)

  • raw (str) – Name of directory under dataset path that contains raw data. Can be . if raw data is located in dataset path. We advise the user to keep the original raw data separate from the preprocessed / event data. (default: ‘raw’)

  • events (str) – Name of directory under dataset path that will be used to store event data. We advise the user to keep the event data separate from the original raw data. (default: ‘events’)

  • precomputed_events (str) – Name of directory under dataset path that contains precomputed event data. Can be . if precomputed event data is located in dataset path. We advise the user to keep the original precomputed event data separate from the preprocessed / event data. (default: ‘precomputed_events’)

  • precomputed_reading_measures (str) – Name of directory under dataset path that contains precomputed reading measure data. Can be . if precomputed event data is located in dataset path. We advise the user to keep the original precomputed event data separate from the preprocessed / event data. (default: ‘precomputed_reading_measures’)

  • preprocessed (str) – Name of directory under dataset path that will be used to store preprocessed data. We advise the user to keep the preprocessed data separate from the original raw data. (default: ‘preprocessed’)

  • downloads (str) – Name of directory to store downloaded data. (default: ‘downloads’)

  • stimuli (str) – Name of directory under dataset path that will be used to store stimuli data. Can be . if stimuli data is located in dataset path.

Methods

__init__(*[, root, dataset, raw, events, ...])

fill_name(name)

Fill dataset directory name with dataset name.

get_preprocessed_filepath(raw_filepath, *[, ...])

Get preprocessed filepath in accordance to filepath of the raw file.

raw_to_event_filepath(raw_filepath, *[, ...])

Get event filepath in accordance to filepath of the raw file.