tonic.functional.drop_pixel
#
Module Contents#
Functions#
|
Identifies pixels that fire above above a certain frequency, averaged across whole event |
|
Identifies pixels that fire above a certain predefined spike amount, supports both. |
|
Drops events for pixel locations that fire. |
|
Drops events for pixel locations. |
- tonic.functional.drop_pixel.identify_hot_pixel(events: numpy.ndarray, hot_pixel_frequency: float)[source]#
Identifies pixels that fire above above a certain frequency, averaged across whole event recording. Such _hot_ pixels are sometimes caused by faulty hardware.
- Parameters:
events (numpy.ndarray) – ndarray of shape [num_events, num_event_channels]
hot_pixel_frequency (float) – number of spikes per pixel allowed for the recording, any pixel firing above that number will be deactivated.
- Returns:
list of (x/y) coordinates for excessively firing pixels.
- tonic.functional.drop_pixel.identify_hot_pixel_raster(events: numpy.ndarray, hot_pixel_frequency: float)[source]#
Identifies pixels that fire above a certain predefined spike amount, supports both.
- Parameters:
events (numpy.ndarray) – ndarray of shape [P, H, W] or [T, P, H, W]
hot_pixel_frequency (float) – number of spikes per pixel allowed for the recording, any pixel firing above that number will be deactivated.
- Returns:
list of (x/y) coordinates for excessively firing pixels.
- tonic.functional.drop_pixel.drop_pixel_numpy(events: numpy.ndarray, coordinates)[source]#
Drops events for pixel locations that fire.
- Parameters:
events (numpy.ndarray) – ndarray of shape [num_events, num_event_channels]
coordinates – list of (x,y) coordinates for which all events will be deleted.
- Returns:
subset of original events.
- tonic.functional.drop_pixel.drop_pixel_raster(raster: numpy.ndarray, coordinates)[source]#
Drops events for pixel locations.
- Parameters:
raster (numpy.ndarray) – ndarray of shape [p, h, w] or [t, p, h, w]
coordinates – list of (x,y) coordinates for which all events will be deleted.
- Returns:
The filtered raster or frame