floodlight.transforms

Collection of data transformation and processing functions.

Filter

butterworth_lowpass

Applies a digital Butterworth lowpass-filter to an XY data object.

savgol_lowpass

Applies a Savitzky-Golay lowpass-filter to an XY data object.

fir_lowpass

Applies a FIR lowpass-filter to an XY data object.

kalman

Applies a forward Kalman filter to an XY data object.

wiener

Applies a Wiener filter to an XY data object.

Spatial

subtract_centroid

Subtracts the per-frame team centroid from all player positions.

min_max_normalize

Min-max normalizes an (N, 2) formation array to [0, 1] per axis.

Permutation

assign_roles

Assigns consistent roles to players across frames using the Hungarian algorithm.

Interpolation

interpolate_linear

Linearly interpolates gaps in XY tracking data along the temporal axis.

interpolate_polynomial

Interpolates gaps in XY tracking data using piecewise polynomial interpolation along the temporal axis.

interpolate_spline

Interpolates gaps in XY tracking data using spline interpolation along the temporal axis.

Temporal

resample

Resample a floodlight core object to a new framerate.