myoverse.datasets.filters.spatial.ApplyFunctionSpatialFilter._filter#

ApplyFunctionSpatialFilter._filter(input_array, **kwargs)[source]#

Apply the selected differential spatial filter to the input array.

Parameters:
  • input_array (np.ndarray) – The input EMG data to filter.

  • **kwargs – Additional keyword arguments from the Data object, including: - grid_layouts: List of 2D arrays specifying electrode arrangements - sampling_frequency: The sampling frequency of the EMG data

Returns:

The filtered EMG data, with dimensions depending on the filter size and convolution mode. The number of electrodes will typically be reduced.

Return type:

np.ndarray

Raises:

AttributeError – If the grid_layouts are not provided in kwargs.