# Sharper Graph Problem

**URL:** <https://klipper.discourse.group/t/sharper-graph-problem/11337>\
**Category:** General Discussion\
**Created:** [November 2, 2023, 7:25pm UTC](https://klipper.discourse.group/t/sharper-graph-problem/11337 "2023-11-02T19:25:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafi](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@Rafi](https://klipper.discourse.group/u/Rafi)\
**Post date:** [November 2, 2023, 7:25pm UTC](https://klipper.discourse.group/t/sharper-graph-problem/11337/1 "2023-11-02T19:25:11Z")

</div>

### Basic Information:

Printer Model: Ender 3  
 MCU / Printerboard: 1.1.4

### Describe your issue:

Hi i got problem with generating graph from resonance test.  
First i tried in WSL, then i installed Ubuntu Distro just to check whats going on.  
Same result:

When i type:  
SHAPER\_CALIBRATE AXIS=Y  
Klipper is creating file:/tmp/calibration\_data\_y\_20231102\_195232.csv  
And i get output from Klipper:

Recommended shaper\_type\_y = zv, shaper\_freq\_y = 42.8 Hz  
To avoid too much smoothing with ‘3hump\_ei’, suggested max\_accel \<= 1900 mm/sec^2  
Fitted shaper ‘3hump\_ei’ frequency = 53.0 Hz (vibrations = 21.7%, smoothing ~= 0.292)  
To avoid too much smoothing with ‘2hump\_ei’, suggested max\_accel \<= 2100 mm/sec^2  
Fitted shaper ‘2hump\_ei’ frequency = 44.2 Hz (vibrations = 22.5%, smoothing ~= 0.276)  
To avoid too much smoothing with ‘ei’, suggested max\_accel \<= 2100 mm/sec^2  
Fitted shaper ‘ei’ frequency = 33.4 Hz (vibrations = 27.8%, smoothing ~= 0.289)  
To avoid too much smoothing with ‘mzv’, suggested max\_accel \<= 3100 mm/sec^2  
Fitted shaper ‘mzv’ frequency = 32.2 Hz (vibrations = 27.5%, smoothing ~= 0.196)  
To avoid too much smoothing with ‘zv’, suggested max\_accel \<= 7100 mm/sec^2  
Fitted shaper ‘zv’ frequency = 42.8 Hz (vibrations = 45.6%, smoothing ~= 0.089)

But when i try to get graph with command:  
~/klipper/scripts/calibrate\_shaper.py /tmp/calibration\_data\_y\_20231102\_195232.csv /tmp/shaper\_calibrate\_y.png

I get error message:  
Traceback (most recent call last):  
File “/home/rafi/klipper/scripts/calibrate\_shaper.py”, line 174, in   
main()  
File “/home/rafi/klipper/scripts/calibrate\_shaper.py”, line 153, in main  
datas = [parse\_log(fn) for fn in args]  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/home/rafi/klipper/scripts/calibrate\_shaper.py”, line 153, in   
datas = [parse\_log(fn) for fn in args]  
^^^^^^^^^^^^^  
File “/home/rafi/klipper/scripts/calibrate\_shaper.py”, line 19, in parse\_log  
with open(logname) as f:  
^^^^^^^^^^^^^  
FileNotFoundError: [Errno 2] No such file or directory: ‘tmp/shaper\_calibrate\_y.png’

Anyone can tell me whats going on?  
I upgraded my printer base frame with strong 3d printed support.  
I do same commands like i did like a month ago, but i dont get graph png file because of that error.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [November 2, 2023, 7:49pm UTC](https://klipper.discourse.group/t/sharper-graph-problem/11337/2 "2023-11-02T19:49:05Z")

</div>

The correct command is:

```auto
~/klipper/scripts/calibrate_shaper.py /tmp/calibration_data_y_20231102_195232.csv -o /tmp/shaper_calibrate_y.png

```

---

<div class="post-metadata">

**Author:** ![Rafi](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@Rafi](https://klipper.discourse.group/u/Rafi)\
**Post date:** [November 2, 2023, 7:59pm UTC](https://klipper.discourse.group/t/sharper-graph-problem/11337/3 "2023-11-02T19:59:19Z")

</div>

I downgraded Python to 3.9.1(Was always working maybe that was an issue).

With that version with your command entered i have output:

Traceback (most recent call last):  
File “/home/rafi/klipper/scripts/calibrate\_shaper.py”, line 11, in   
import numpy as np, matplotlib  
ModuleNotFoundError: No module named ‘numpy’

I did already(versions are latest):  
sudo apt install python3-numpy python3-matplotlib libatlas-base-dev  
~/klippy-env/bin/pip install -v numpy

I reinstalled everything including klipper and got same message:/

Tried also:  
~/klippy-env/bin/python ~/klipper/scripts/calibrate\_shaper.py /tmp/calibration\_data\_y2.csv -o /tmp/shaper\_calibrate\_y.png

With same result.

---

<div class="post-metadata">

**Author:** ![Rafi](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@Rafi](https://klipper.discourse.group/u/Rafi)\
**Post date:** [November 2, 2023, 8:18pm UTC](https://klipper.discourse.group/t/sharper-graph-problem/11337/4 "2023-11-02T20:18:43Z")

</div>

If someone will read it some day i found a solution.

Solution was:

~/klippy-env/bin/pip install matplotlib

I messed up a bit made new distro in wsl and did everything properly now all works “out of the box”

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [December 3, 2023, 6:19am UTC](https://klipper.discourse.group/t/sharper-graph-problem/11337/5 "2023-12-03T06:19:04Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
