A simple GUI for monitoring waveforms.
Project description
Wave Monitor
A simple GUI for monitoring waveforms. It plots waveforms with PyQtGraph in a separate process. The GUI is built with PySide6.
The WaveMonitor
class is the main interface. It provides methods for adding and removing waveforms from the plot, clearing the plot, and etc.
In GUI, right click to show the menu. Keyboard shortcuts are also supported.
Installation
pip install WaveMonitor
or install from source.
pip install git+https://github.com/Qiujv/WaveMonitor.git
Usage
Avoid calling clear
if you only want to update the plot. It is more efficient to update the plot with add_wfm
.
from wave_monitor import WaveMonitor
import numpy as np
monitor = WaveMonitor()
monitor.autoscale()
# monitor.clear()
t = np.linspace(0, 1, 1_000_001) # 1m pts ~= 1ms for 1GSa/s.
n = 20
i_waves = [np.cos(2 * np.pi * f * t) for f in range(1, n + 1)]
q_waves = [np.sin(2 * np.pi * f * t) for f in range(1, n + 1)]
for i, (i_wave, q_wave) in enumerate(zip(i_waves, q_waves)):
monitor.add_wfm(f"wave_{i}", t, [i_wave, q_wave])
monitor.autoscale()
monitor.add_wfm("wave_1", t, [i_waves[-1], q_waves[-1]]) # Replaces previous wfm.
monitor.remove_wfm("wave_10")
Thanks
This project is derived from WaveViewer.
The icon is downloaded from https://www.freepik.com/icons/oscilloscope and made by piksart.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for wavemonitor-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2bf7f02df1011df3bc90067e070a4b05c45ad6d9de7a12c427317d11cee7275 |
|
MD5 | 57a8cb6e8b07689d12c3ac0e910c463d |
|
BLAKE2b-256 | 00d896b64a8a1a8635be9890cf9a76685f2d13e950786cdf954c191c2cbcef4c |