pymovements.dataset.Dataset#

class pymovements.dataset.Dataset(definition: str | DatasetDefinition | type[DatasetDefinition], path: str | Path | DatasetPaths)#

Dataset base class.

Initialize the dataset object.

Parameters:
__init__(definition: str | DatasetDefinition | type[DatasetDefinition], path: str | Path | DatasetPaths)

Methods

__init__(definition, path)

apply(function, *[, verbose])

Apply preprocessing method to all GazeDataFrames in Dataset.

clear_events()

Clear event DataFrame.

clip(lower_bound, upper_bound, *, ...[, verbose])

Clip gaze signal values.

compute_event_properties(event_properties[, ...])

Calculate an event property for and add it as a column to the event dataframe.

compute_properties(event_properties[, name, ...])

Calculate an event property for and add it as a column to the event dataframe.

deg2pix([pixel_origin, position_column, ...])

Compute gaze positions in pixel coordinates from degrees of visual angle.

detect(method, *[, eye, clear, verbose])

Detect events by applying a specific event detection method.

detect_events(method, *[, eye, clear, verbose])

Detect events by applying a specific event detection method.

download(*[, extract, remove_finished, verbose])

Download dataset resources.

extract([remove_finished, remove_top_level, ...])

Extract downloaded dataset archive files.

load(*[, events, preprocessed, subset, ...])

Parse file information and load all gaze files.

load_event_files([events_dirname, extension])

Load all available event files.

load_gaze_files([preprocessed, ...])

Load all available gaze data files.

load_precomputed_events()

Load precomputed events.

load_precomputed_reading_measures()

Load precomputed events.

pix2deg([verbose])

Compute gaze positions in degrees of visual angle from pixel coordinates.

pos2acc(*[, degree, window_length, padding, ...])

Compute gaze accelerations in dva/s^2 from dva coordinates.

pos2vel([method, verbose])

Compute gaze velocites in dva/s from dva coordinates.

resample(resampling_rate[, columns, ...])

Resample a DataFrame to a new sampling rate by timestamps in time column.

save([events_dirname, preprocessed_dirname, ...])

Save preprocessed gaze and event files.

save_events([events_dirname, verbose, extension])

Save events to files.

save_preprocessed([preprocessed_dirname, ...])

Save preprocessed gaze files.

scan()

Infer information from filepaths and filenames.

split_gaze_data(by)

Split gaze data into separated GazeDataFrame's.

split_precomputed_events(by)

Split precomputed event data into seperated PrecomputedEventDataFrame's.

Attributes

path

The path to the dataset directory.