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>
This commit is contained in:
Dmitry Butyugin
2024-12-06 11:54:26 +09:00
committed by GitHub
parent 7f89668d6c
commit 16b4b6b302
6 changed files with 171 additions and 51 deletions

View File

@@ -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]