A simple GUI for viewing waveforms.
Project description
Wave Viewer
A simple GUI for viewing waveforms. It plots the waveform with vispy in a separate process. The GUI is built with PySide6.
The WaveViewer
class is the main interface for the wave_viewer package. It
provides methods for adding and removing lines from the plot, clearing the plot,
and closing the GUI.
Installation
pip install wave-viewer
Usage
from wave_viewer import WaveViewer
import numpy as np
# Create the viewer
viewer = WaveViewer()
# Add a line to the plot
x = np.arange(100000) / 2e9
y = np.exp(1j * 2 * np.pi * 1e6 * x)
ys = [y.real, y.imag]
viewer.add_line("line1", x, ys, offset=0)
# Add another line to the plot
viewer.add_line("line2", x, ys, offset=2)
# Auto scale the plot
viewer.autoscale()
# Remove the first line
viewer.remove_line("line1")
# Replace the second line
y = np.exp(1j * 2 * np.pi * 2e6 * x)
ys = [y.real, y.imag]
viewer.add_line("line2", x, ys, offset=2)
# Clear the plot
viewer.clear()
# Close the GUI
viewer.close()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wave_viewer-0.2.0.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for wave_viewer-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef2ac3d1681132cf3a8a0137102048461d2a262236f83b1ff5a53f6950e49868 |
|
MD5 | 1c6a5ffade10b438a54f78a212a226ed |
|
BLAKE2b-256 | 01c09a72ab2740768b4278ce9a0b4daf1bfdffd42fbf452f3063a82ab6022713 |