torchsig.utils.dsp.noise_generator¶
- torchsig.utils.dsp.noise_generator(N: int = 1024, power: float = 1.0, color: str = 'white', continuous: bool = True, rng: ~numpy.random._generator.Generator = Generator(PCG64) at 0x7694D3FA4E40) ndarray[source]¶
Generates additive complex noise of specified power and type.
- Parameters:
power (float) – Desired noise power (linear, positive). Defaults to 1.0 W (0 dBW).
color (str) – Noise color, supports ‘white’, ‘pink’, or ‘red’ noise frequency spectrum types. Defaults to ‘white’.
continuous (bool) – Sets noise to continuous (True) or impulsive (False). Defaults to True.
rng (np.random.Generator, optional) – Random number generator. Defaults to np.random.default_rng(seed=None).
- Raises:
ValueError – If invalid noise power specified.
ValueError – If unsupported noise type specified.
- Returns:
Complex noise samples with specified power.
- Return type:
np.ndarray