From 6d0d2cb253932bfc2e8f722cdab60fbbe381b807 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 12 Jan 2020 19:32:38 +0800 Subject: [PATCH] fixes --- noptica.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noptica.py b/noptica.py index 3da4fd3..b8130bf 100644 --- a/noptica.py +++ b/noptica.py @@ -66,8 +66,8 @@ class Stabilizer: true_i, amplitude = parabolic(spectrum, i) freq = 0.5 * self.freq_sample * true_i / len(spectrum) - if amplitude > threshold: - tuning = (freq - target_freq)*k + if amplitude > self.amp_threshold: + tuning = (freq - self.freq_target)*self.k else: tuning = 0.0 self.tuner.set(tuning)