:py:mod:`tonic.functional.drop_pixel`
=====================================

.. py:module:: tonic.functional.drop_pixel


Module Contents
---------------


Functions
~~~~~~~~~

.. autoapisummary::

   tonic.functional.drop_pixel.identify_hot_pixel
   tonic.functional.drop_pixel.identify_hot_pixel_raster
   tonic.functional.drop_pixel.drop_pixel_numpy
   tonic.functional.drop_pixel.drop_pixel_raster



.. py:function:: identify_hot_pixel(events: numpy.ndarray, hot_pixel_frequency: float)

   Identifies pixels that fire above above a certain frequency, averaged across whole event
   recording. Such _hot_ pixels are sometimes caused by faulty hardware.

   :param events: ndarray of shape [num_events, num_event_channels]
   :param hot_pixel_frequency: 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.


.. py:function:: identify_hot_pixel_raster(events: numpy.ndarray, hot_pixel_frequency: float)

   Identifies pixels that fire above a certain predefined spike amount, supports both.

   :param events: ndarray of shape [P, H, W] or [T, P, H, W]
   :param hot_pixel_frequency: 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.


.. py:function:: drop_pixel_numpy(events: numpy.ndarray, coordinates)

   Drops events for pixel locations that fire.

   :param events: ndarray of shape [num_events, num_event_channels]
   :param coordinates: list of (x,y) coordinates for which all events will be deleted.

   :returns: subset of original events.


.. py:function:: drop_pixel_raster(raster: numpy.ndarray, coordinates)

   Drops events for pixel locations.

   :param raster: ndarray of shape [p, h, w] or [t, p, h, w]
   :param coordinates: list of (x,y) coordinates for which all events will be deleted.

   :returns: The filtered raster or frame


