UniformNoise

Contents

UniformNoise#

class tonic.transforms.UniformNoise(sensor_size: tuple[int, int, int], n: int | tuple[int, int])[source]#

Adds a fixed number of n noise events that are uniformly distributed across sensor size dimensions such as x, y, t and p. Not applied if the input is empty.

Parameters:
  • sensor_size (tuple[int, int, int]) – a 3-tuple of x,y,p for sensor_size

  • n (int | tuple[int, int]) – Number of events that are added. Can be a tuple of integers, so that n is sampled from a range.

Example

>>> transform = tonic.transforms.UniformNoise(sensor_size=(340, 240, 2), n=3000)