From 67db53e4a9f67913a3559e6df636e0d299f8f665 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Tue, 29 Aug 2023 12:37:00 +0200 Subject: [PATCH] New Noise: ShortPink --- priorConditionedAnnealing/noise.py | 5 +++++ priorConditionedAnnealing/pca.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/priorConditionedAnnealing/noise.py b/priorConditionedAnnealing/noise.py index a1cbdfc..03a01c3 100644 --- a/priorConditionedAnnealing/noise.py +++ b/priorConditionedAnnealing/noise.py @@ -31,6 +31,11 @@ class Pink_Noise(Colored_Noise): super().__init__(known_shape=known_shape, beta=1, num_samples=num_samples, random_state=random_state) +class shortPink_Noise(Colored_Noise): + def __init__(self, known_shape=None, num_samples=1000, random_state=None): + super().__init__(known_shape=known_shape, beta=1, num_samples=num_samples, random_state=random_state) + + class White_Noise(): def __init__(self, known_shape=None): self.known_shape = known_shape diff --git a/priorConditionedAnnealing/pca.py b/priorConditionedAnnealing/pca.py index f17c130..e90f8ad 100644 --- a/priorConditionedAnnealing/pca.py +++ b/priorConditionedAnnealing/pca.py @@ -53,10 +53,11 @@ class Avaible_Noise_Funcs(Enum): HARMONICPERLIN = 4 DIRTYPERLIN = 5 SDE = 6 + SHORTPINK = 7 def get_func(self): # stil aaaaaaaa - return [noise.White_Noise, noise.Pink_Noise, noise.Colored_Noise, noise.Perlin_Noise, noise.Harmonic_Perlin_Noise, noise.Dirty_Perlin_Noise, noise.SDE_Noise][self.value] + return [noise.White_Noise, noise.Pink_Noise, noise.Colored_Noise, noise.Perlin_Noise, noise.Harmonic_Perlin_Noise, noise.Dirty_Perlin_Noise, noise.SDE_Noise, noise.shortPink_Noise][self.value] def cast_to_enum(inp, Class):