spyrit.core.noise.Poisson
- class spyrit.core.noise.Poisson(alpha: float = 1.0)[source]
Bases:
ModuleSimulate measurements corrupted by Poisson noise
\[y \sim \mathcal{P}\left(\alpha z\right), \quad \text{with }z\ge 0\]where \(\mathcal{P}\) is the Poisson distribution and \(\alpha\) represents the intensity of the noiseless measurements \(z\).
The class is constructed from the intensity \(\alpha\).
- Args:
alpha(float): The intensity of the measurements. Defaults to 1.- Attributes:
alpha(float): Intensity of the measurements.- Example:
>>> noise = Poisson(10.0) >>> z = torch.tensor([1, 3, 6]) >>> y = noise(z) >>> print(y) tensor([...])
Methods
forward(z)Corrupt measurement by Poisson noise