aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/shaper_calibrate.py
diff options
context:
space:
mode:
authorDmitry Butyugin <dmbutyugin@google.com>2024-12-06 11:54:26 +0900
committerGitHub <noreply@github.com>2024-12-05 21:54:26 -0500
commit16b4b6b302ac3ffcd55006cd76265aad4e26ecc8 (patch)
tree15e598c259b1b30ee5fe1fefa97ae32f8bc1899c /klippy/extras/shaper_calibrate.py
parent7f89668d6c069deaa02d6479e073d11a2389a948 (diff)
downloadkutter-16b4b6b302ac3ffcd55006cd76265aad4e26ecc8.tar.gz
kutter-16b4b6b302ac3ffcd55006cd76265aad4e26ecc8.tar.xz
kutter-16b4b6b302ac3ffcd55006cd76265aad4e26ecc8.zip
resonance_tester: Added a new sweeping_vibrations resonance test method (#6723)
This adds a new resonance test method that can help if a user has some mechanical problems with the printer. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Diffstat (limited to 'klippy/extras/shaper_calibrate.py')
-rw-r--r--klippy/extras/shaper_calibrate.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/klippy/extras/shaper_calibrate.py b/klippy/extras/shaper_calibrate.py
index 6891fefb..f497171f 100644
--- a/klippy/extras/shaper_calibrate.py
+++ b/klippy/extras/shaper_calibrate.py
@@ -48,7 +48,9 @@ class CalibrationData:
# Avoid division by zero errors
psd /= self.freq_bins + .1
# Remove low-frequency noise
- psd[self.freq_bins < MIN_FREQ] = 0.
+ low_freqs = self.freq_bins < 2. * MIN_FREQ
+ psd[low_freqs] *= self.numpy.exp(
+ -(2. * MIN_FREQ / (self.freq_bins[low_freqs] + .1))**2 + 1.)
def get_psd(self, axis='all'):
return self._psd_map[axis]