From c39f0fe7813c6a71d480a48ab75d8c51381e5e53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= <f.boisselier@irepa-laser.com>
Date: Thu, 26 Oct 2023 18:18:18 +0200
Subject: [PATCH] bugfixes

---
 K-ShakeTune/scripts/graph_shaper.py     | 4 ++--
 K-ShakeTune/scripts/graph_vibrations.py | 2 +-
 README.md                               | 6 +++++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/K-ShakeTune/scripts/graph_shaper.py b/K-ShakeTune/scripts/graph_shaper.py
index 88a3d98..987c51c 100755
--- a/K-ShakeTune/scripts/graph_shaper.py
+++ b/K-ShakeTune/scripts/graph_shaper.py
@@ -315,8 +315,8 @@ def shaper_calibration(lognames, klipperdir="~/klipper", max_smoothing=None, max
     fig.text(0.12, 0.965, title_line1, ha='left', va='bottom', fontsize=20, color=KLIPPAIN_COLORS['purple'], weight='bold')
     try:
         filename_parts = (lognames[0].split('/')[-1]).split('_')
-        dt = datetime.strptime(f"{filename_parts[3]} {filename_parts[4].split('.')[0]}", "%Y%m%d %H%M%S")
-        title_line2 = dt.strftime('%x %X') + ' -- ' + filename_parts[2].upper() + ' axis'
+        dt = datetime.strptime(f"{filename_parts[1]} {filename_parts[2]}", "%Y%m%d %H%M%S")
+        title_line2 = dt.strftime('%x %X') + ' -- ' + filename_parts[3].upper().split('.')[0] + ' axis'
     except:
         print("Warning: CSV filename look to be different than expected (%s)" % (lognames[0]))
         title_line2 = lognames[0].split('/')[-1]
diff --git a/K-ShakeTune/scripts/graph_vibrations.py b/K-ShakeTune/scripts/graph_vibrations.py
index fde75d8..f9875b3 100755
--- a/K-ShakeTune/scripts/graph_vibrations.py
+++ b/K-ShakeTune/scripts/graph_vibrations.py
@@ -348,7 +348,7 @@ def setup_klipper_import(kdir):
     shaper_calibrate = importlib.import_module('.shaper_calibrate', 'extras')
 
 
-def vibrations_calibration(lognames, klipperdir="~/klipper", axisname=None, max_freq=200., remove=0):
+def vibrations_calibration(lognames, klipperdir="~/klipper", axisname=None, max_freq=1000., remove=0):
     setup_klipper_import(klipperdir)
 
     # Parse the raw data and get them ready for analysis
diff --git a/README.md b/README.md
index f7a7585..db1cbae 100644
--- a/README.md
+++ b/README.md
@@ -39,12 +39,16 @@ For those not using the full [Klippain](https://github.com/Frix-x/klippain), fol
      managed_services: klipper
      install_script: install.sh
      ```
+   
+   > **Note**:
+   >
+   > If already using my old IS workflow scripts, please remove everything before installing this new module. This include the macros, the Python scripts, the `plot_graph.sh` and the `[gcode_shell_command plot_graph]` section.
 
 ## Usage
 
 Ensure your machine is homed, then invoke one of the following macros as needed:
   - `BELTS_SHAPER_CALIBRATION` for belt resonance graphs, useful for verifying belt tension and differential belt paths behavior.
-  - `AXES_SHAPER_CALIBRATION` for input shaper graphs to mitigate ringing/ghosting by tuning Klipper's `[input_shaper]` system.
+  - `AXES_SHAPER_CALIBRATION` for input shaper graphs to mitigate ringing/ghosting by tuning Klipper's input shaper system.
   - `VIBRATIONS_CALIBRATION` for machine vibration graphs to optimize your slicer speed profiles.
   - `EXCITATE_AXIS_AT_FREQ` to sustain a specific excitation frequency, useful to let you inspect and find out what is resonating.