Skip to main content

Python spectogram plotted using pyqtgraph.

Project description

pyqtspecgram

Python spectogram plotted using pyqtgraph

Pyqtplot allows significantly faster navigation and zooming for larger scale waterfalls compared to pyplots specgram method.

See more on https://github.com/epeters13/pyqtspecgram

Author: Edwin G.W. Peters

Requirements

  • scipy
  • pyqtgraph

Installation

pip install pyqtspecgram

or

python setup.py install

Usage

Check "test_pyqtspecgram" for an example

Plot a waterfall

from pyqtspecgram import pyqtspecgram
import numpy as np

Fs = 1e6
t = 5  # sec
N = int(t * Fs)
sigma_noise_2 = 0.1
NFFT = 4096

a = np.exp(1j * 2 * np.pi * 150e3 / Fs * np.arange(N))
a += np.exp(-1j * 2 * np.pi * 298e3 / Fs * np.arange(N))
a += np.sqrt(sigma_noise_2) / 2 * (np.random.randn(N) + 1j * np.random.randn(N))

Sxx, f_a, t_a, fig = pyqtspecgram(a, NFFT, Fs, Fc=0)

Todo

  • Prevent garbage collection when returning from main thread to allow figure to remain open in the background in an interactive ipython console
  • Export coordinates in graph to console with double or right click
  • Allow dynamic time-averaged spectrogramming for very large data sets

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

pyqtspecgram-0.1.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

pyqtspecgram-0.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file pyqtspecgram-0.1.0.tar.gz.

File metadata

  • Download URL: pyqtspecgram-0.1.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for pyqtspecgram-0.1.0.tar.gz
Algorithm Hash digest
SHA256 268a66441e37617e9d7cf3e94b1bf9dd156b3061f127014ccc001c2d6acf1ca4
MD5 9a5574b6b9de9b8ad22d36d13a371081
BLAKE2b-256 66fb74a1208da4d0dade79f8f72c5858145f9bfa7c82d808a3ca0d2b2efd073b

See more details on using hashes here.

File details

Details for the file pyqtspecgram-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyqtspecgram-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for pyqtspecgram-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5bf98a4e6d7fa873451e55b1fdf535999d40231595772d67471db4bf99e8464d
MD5 d1b0f1c20c8a4141ae3f13e97c4f27b1
BLAKE2b-256 f9a9e473d41b4e10a63efb7da6ec098bc3bd449075c66c3447f1a33c6b25f6e7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page