small bug-fixes and greek alphabet for paired peaks

This commit is contained in:
Félix Boisselier committed 2024-05-19 13:02:56 +02:00
1 parent 4f100eac8f
commit 1d4c68265d
7 files changed
+11 -7

No files matched your search

@@ -57,6 +57,7 @@ def axes_shaper_calibration(gcmd, config, st_thread: ShakeTuneThread) -> None:
point = (x, y, z)
toolhead.manual_move(point, feedrate_travel)
toolhead.dwell(0.5)
# Configure the graph creator
creator = st_thread.get_graph_creator()
@@ -56,6 +56,7 @@ def compare_belts_responses(gcmd, config, st_thread: ShakeTuneThread) -> None:
point = (x, y, z)
toolhead.manual_move(point, feedrate_travel)
toolhead.dwell(0.5)
# Configure the graph creator
motors_config_parser = MotorsConfigParser(config, motors=None)
+1
View File
@@ -50,6 +50,7 @@ def excitate_axis_at_freq(gcmd, config) -> None:
point = (x, y, z)
toolhead.manual_move(point, feedrate_travel)
toolhead.dwell(0.5)
min_freq = freq - 1
max_freq = freq + 1
+2 -2
View File
@@ -22,7 +22,7 @@ matplotlib.use('Agg')
from ..helpers.common_func import detect_peaks, parse_log, setup_klipper_import
from ..helpers.console_output import ConsoleOutput
ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' # For paired peaks names
ALPHABET = 'αβγδεζηθικλμνξοπρστυφχψω' # For paired peak names (using the Greek alphabet to avoid confusion with belt names)
PEAKS_DETECTION_THRESHOLD = 0.1 # Threshold to detect peaks in the PSD signal (10% of max)
DC_MAX_PEAKS = 2 # Maximum ideal number of peaks
@@ -524,7 +524,7 @@ def belts_calibration(
# Adding Shake&Tune version in the top right corner
if st_version != 'unknown':
fig.text(0.995, 0.985, st_version, ha='right', va='bottom', fontsize=8, color=KLIPPAIN_COLORS['purple'])
fig.text(0.995, 0.980, st_version, ha='right', va='bottom', fontsize=8, color=KLIPPAIN_COLORS['purple'])
return fig
@@ -111,6 +111,7 @@ class BeltsGraphCreator(GraphCreator):
)
fig = belts_calibration(
lognames=[str(path) for path in lognames],
kinematics=self._kinematics,
klipperdir=str(self._config.klipper_folder),
accel_per_hz=self._accel_per_hz,
st_version=self._version,
+3 -3
View File
@@ -381,9 +381,9 @@ def shaper_calibration(
title_line4 = ''
title_line5 = ''
fig.text(0.12, 0.957, title_line2, ha='left', va='top', fontsize=16, color=KLIPPAIN_COLORS['dark_purple'])
fig.text(0.58, 0.965, title_line3, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
fig.text(0.58, 0.951, title_line4, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
fig.text(0.58, 0.919, title_line5, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
fig.text(0.58, 0.963, title_line3, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
fig.text(0.58, 0.948, title_line4, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
fig.text(0.58, 0.933, title_line5, ha='left', va='top', fontsize=10, color=KLIPPAIN_COLORS['dark_purple'])
# Plot the graphs
plot_freq_response(