(self)
| 24 | self.current_noise_mean = 0 |
| 25 | |
| 26 | def set_noise(self): |
| 27 | |
| 28 | if self.noise_type == 'Spike' or self.noise_type == 'Throttle': |
| 29 | |
| 30 | # flip between positive and negative |
| 31 | coin = random.randint(0, 1) |
| 32 | if coin == 0: # negative |
| 33 | self.current_noise_mean = 0.001 # -random.gauss(0.05,0.02) |
| 34 | else: # positive |
| 35 | self.current_noise_mean = -0.001 # random.gauss(0.05,0.02) |
| 36 | |
| 37 | def get_noise(self): |
| 38 |