Poisson#

class deeptrack.noises.Poisson(*args, snr: float | Callable[[...], float] = 100, background: float | Callable[[...], float] = 0, max_val=100000000.0, **kwargs)#

Bases: Noise

Adds Poisson-distributed noise to an image.

Parameters#

snrfloat

Signal-to-noise ratio of the final image. The signal is determined by the peak value of the image.

backgroundfloat

Value to be be used as the background. This is used to calculate the signal of the image.

max_valfloat, optional

Maximum allowable value to prevent overflow in noise computation. Default is 1e8.

Methods Summary

get(image, snr, background, max_val, **kwargs)

Transform an image [abstract method].

Methods Documentation

get(image, snr, background, max_val, **kwargs)#

Transform an image [abstract method].

Abstract method that defines how the feature transforms the input. The current value of all properties will be passed as keyword arguments.

Parameters#

image: np.ndarray or list of np.ndarray or Image or list of Images

The image or list of images to transform.

**kwargs: dict of str to Any

The current value of all properties in properties, as well as any global arguments passed to the feature.

Returns#

Image or list of Images

The transformed image or list of images.

Raises#

NotImplementedError

Raised if this method is not overridden by subclasses.