RicianNoise#
- class deepinv.physics.RicianNoise(sigma=0.1, rng=None)[source]#
Bases:
NoiseModel
RicianNoise: \(y = \sqrt{(x + \sigma \epsilon_1)^2 + (\sigma \epsilon_2)^2}\)
where \(\epsilon_1\sim\mathcal{N}(0,I)\) and \(\epsilon_2\sim\mathcal{N}(0,I)\)
This noise model is often used in MRI imaging and has the property of keeping pixel intensities \(\geq 0\)
Warning
All pixel intensities will become positive: this noise model may not be suited for data with negative intensities.
- Parameters:
sigma (Union[float, torch.Tensor]) – Standard deviation used.
rng (torch.Generator, None) – (optional) a pseudorandom random number generator for the parameter generation.
- forward(x, sigma=None, seed=None)[source]#
Adds the noise to measurements x
- Parameters:
x (torch.Tensor) – measurements
sigma (float, torch.Tensor, None) – standard deviation to be used. If not
None
, it will overwrite the current noise level.seed (int, None) – the seed for the random number generator.
- Returns:
noisy measurements