This commit is contained in:
Sebastien Bourdeauducq 2020-01-12 19:32:38 +08:00
parent dcd8babc67
commit 6d0d2cb253
1 changed files with 2 additions and 2 deletions

View File

@ -66,8 +66,8 @@ class Stabilizer:
true_i, amplitude = parabolic(spectrum, i) true_i, amplitude = parabolic(spectrum, i)
freq = 0.5 * self.freq_sample * true_i / len(spectrum) freq = 0.5 * self.freq_sample * true_i / len(spectrum)
if amplitude > threshold: if amplitude > self.amp_threshold:
tuning = (freq - target_freq)*k tuning = (freq - self.freq_target)*self.k
else: else:
tuning = 0.0 tuning = 0.0
self.tuner.set(tuning) self.tuner.set(tuning)