Skip to main content

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

Below is a simple example of how to use the WaveViewer class. Avoid calling clear if you only want to update the plot. It is more efficient to update the plot with add_line.

from wave_viewer import WaveViewer
import numpy as np


# This if statement is required for multiprocessing on Windows
if __name__ == "__main__":
    # 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()

Release files for wave-viewer 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wave-viewer 0.2.2
File Size Uploaded
wave_viewer-0.2.2.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wave-viewer 0.2.2
File Interpreter ABI Platform
wave_viewer-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / wave_viewer-0.2.2.tar.gz

Download URL wave_viewer-0.2.2.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e18405682a4ec389f1bc85dcddba5d6918f157d5175956905703667b9d490b9d
BLAKE2b-256 checksum
How to use checksums
4686accbc8963545acaa8e7c1e21bd2825f88d61a7cd564d0ce5fb3788b94340
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.10 Windows/10

Release files / wave_viewer-0.2.2-py3-none-any.whl

Download URL wave_viewer-0.2.2-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7a6fe1e8f576e04452acc7cdc645c2b9909b8795c4b0d6019d4d93fe90f522f
BLAKE2b-256 checksum
How to use checksums
a1b0de54379dbf74f662cde042184eeac493423035947eb871d257cf6cb1bbf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.10 Windows/10

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page