(self)
| 35 | self.current_noise_mean = -0.001 # random.gauss(0.05,0.02) |
| 36 | |
| 37 | def get_noise(self): |
| 38 | |
| 39 | if self.noise_type == 'Spike' or self.noise_type == 'Throttle': |
| 40 | if self.current_noise_mean > 0: |
| 41 | |
| 42 | return min(0.55, |
| 43 | self.current_noise_mean + ( |
| 44 | time.time() - self.noise_start_time) * 0.03 * self.intensity) |
| 45 | else: |
| 46 | |
| 47 | return max(-0.55, |
| 48 | self.current_noise_mean - ( |
| 49 | time.time() - self.noise_start_time) * 0.03 * self.intensity) |
| 50 | |
| 51 | def get_noise_removing(self): |
| 52 | # print 'REMOVING' |