From 16b4b6b302ac3ffcd55006cd76265aad4e26ecc8 Mon Sep 17 00:00:00 2001 From: Dmitry Butyugin Date: Fri, 6 Dec 2024 11:54:26 +0900 Subject: 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 --- klippy/extras/shaper_calibrate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'klippy/extras/shaper_calibrate.py') 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] -- cgit v1.2.3-70-g09d2