pymovements.transforms

Transforms module.

Functions

consecutive

Split array into groups of consecutive numbers.

cut_into_subsequences

Example: if old seq len was 7700, window_size=1000: Input arr has: 144 x 7700 x n_channels Output arr has: 144*8 x 1000 x n_channels The last piece of each trial 7000-7700 gets padded with first 300 of this piece to be 1000 long

downsample

Downsamples array by integer factor.

norm

Takes the norm sqrt(x^2 + y^2).

pix2deg

Converts pixel screen coordinates to degrees of visual angle.

pos2vel

Compute velocity time series from 2-dimensional position time series.