- class tonic.transforms.Downsample(time_factor: float = 1, spatial_factor: float = 1)#
Multiplies timestamps and spatial pixel coordinates with separate factors. Useful when the native temporal and/or spatial resolution of the original sensor is too high for downstream processing, notably when converting to dense representations of some sort. This transform does not drop any events.
time_factor (float) – value to multiply timestamps with. Default is 1.
spatial_factor (float) – value to multiply pixel coordinates with. Default is 1. Note that when using subsequential transforms that require sensor_size, you must change the spatial values for the later transformation.
>>> from tonic.transforms import Downsample >>> transform1 = Downsample(time_factor=0.001) # change us to ms >>> transform2 = Downsample(spatial_factor=0.25) # reduce focal plane to 1/4.