1from typing import Callable, List
2
3import numpy as np
4
5from colosseum.noises.base import Noise
6
7
8class GaussianUncorrelated(Noise):
9 """
10 The class that creates Gaussian uncorrelated noise.
11 """
12
13 def _sample_noise(self, n: int) -> np.ndarray:
14 return self._rng.normal(loc=0, scale=self._scale, size=(n, *self.shape))
15
16 def __init__(self, seed: int, shape_f: Callable[[], List[int]], scale: float = 0.1):
17 """
18 Parameters
19 ----------
20 seed : int
21 The random seed.
22 shape_f : Callable[[], List[int]]
23 The function that returns the shape of the emission map.
24 scale : float
25 The scale parameter for Gaussian noise. By default, it is 0.1.
26 """
27 super(GaussianUncorrelated, self).__init__(seed, shape_f)
28
29 self._scale = scale