pymovements.gaze.experiment.Experiment#
- class pymovements.gaze.experiment.Experiment(screen_width_px: int, screen_height_px: int, screen_width_cm: float, screen_height_cm: float, distance_cm: float, origin: str, sampling_rate: float)[source]#
Experiment class for holding experiment properties.
- sampling_rate#
Sampling rate in Hz
- Type:
float
- __init__(screen_width_px: int, screen_height_px: int, screen_width_cm: float, screen_height_cm: float, distance_cm: float, origin: str, sampling_rate: float)[source]
Initializes Experiment.
- Parameters:
screen_width_px (int) – Screen width in pixels
screen_height_px (int) – Screen height in pixels
screen_width_cm (float) – Screen width in centimeters
screen_height_cm (float) – Screen height in centimeters
distance_cm (float) – Eye-to-screen distance in centimeters
origin (str) – Specifies the screen location of the origin of the pixel coordinate system.
sampling_rate (float) – Sampling rate in Hz
Examples
>>> experiment = Experiment( ... screen_width_px=1280, ... screen_height_px=1024, ... screen_width_cm=38, ... screen_height_cm=30, ... distance_cm=68, ... origin='lower left', ... sampling_rate=1000.0, ... ) >>> print(experiment) Experiment(screen=Screen(width_px=1280, height_px=1024, width_cm=38, height_cm=30, distance_cm=68, origin=lower left, x_max_dva=15.60, y_max_dva=12.43, x_min_dva=-15.60, y_min_dva=-12.43), sampling_rate=1000.00)
Methods
__init__(screen_width_px, screen_height_px, ...)Initializes Experiment.
pos2vel(arr[, method])Compute velocity time series from 2-dimensional position time series.