From 339e8a6d7cd2a0d3c6e3b0ea4d7d681014a3b399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Thu, 23 May 2024 23:07:52 +0200 Subject: [PATCH] fixed belt similarity and MHI for corexz printers --- shaketune/post_processing/graph_belts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shaketune/post_processing/graph_belts.py b/shaketune/post_processing/graph_belts.py index 94a04e2..0f2ac61 100644 --- a/shaketune/post_processing/graph_belts.py +++ b/shaketune/post_processing/graph_belts.py @@ -22,7 +22,9 @@ matplotlib.use('Agg') from ..helpers.common_func import detect_peaks, parse_log, setup_klipper_import from ..helpers.console_output import ConsoleOutput -ALPHABET = 'αβγδεζηθικλμνξοπρστυφχψω' # For paired peak names (using the Greek alphabet to avoid confusion with belt 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 @@ -503,7 +505,7 @@ def belts_calibration( # We add the estimated similarity and the MHI value to the title only if the kinematics is CoreXY # as it make no sense to compute these values for other kinematics that doesn't have paired belts - if kinematics == 'corexy': + if kinematics in ['corexy', 'corexz']: title_line3 = f'| Estimated similarity: {similarity_factor:.1f}%' title_line4 = f'| {mhi} (experimental)' fig.text(0.55, 0.985, title_line3, ha='left', va='top', fontsize=14, color=KLIPPAIN_COLORS['dark_purple'])