SpatialFilterGridAware#

class myoverse.datasets.filters.spatial.SpatialFilterGridAware(input_is_chunked=None, allowed_input_type='both', grids_to_process='all', is_output=False, name=None, run_checks=True)[source]#

Base class for spatial filters that need to be grid-aware.

This class provides methods for handling multiple electrode grids in spatial filters. It allows applying filters to specific grids and optionally preserving unprocessed grids.

Parameters:
  • input_is_chunked (bool) – Whether the input is chunked or not.

  • allowed_input_type (Literal["chunked", "non_chunked", "both"]) – Type of input this filter accepts.

  • grids_to_process (Union[Literal["all"], List[int]]) –

    Specifies which grids to apply the filter to:

    • ”all”: Process all grids (default)

    • List[int]: Process only the grids with these indices

  • is_output (bool, optional) – Whether the filter is an output filter.

  • name (str, optional) – Name of the filter.

  • run_checks (bool, optional) – Whether to run validation checks when filtering.

Methods

__init__([input_is_chunked, ...])

_filter(input_array, **kwargs)

Apply the filter to the input array.

_get_grids_to_filter(grid_layouts)