Skip to main content

An oscilloscope for python that just works™

Project description

Oscilloscope

An oscilloscope for python that just works™

It's fucking simple to use

This

import random
from time import sleep

from oscilloscope import Osc


osc = Osc()

@osc.signal
def random_signal(update):
    while True:
        update(random.random())
        sleep(0.1)

osc.start()

Gives you this

Parallel compute

Each osc.signal gets it's own process.

This

import random
from time import sleep

from oscilloscope import Osc


osc = Osc(nrows=2, ncols=3)

@osc.signal
def signal1(update):
    while True:
        update(random.random())
        sleep(0.1)

@osc.signal
def signal2(update):
    while True:
        update(random.random(), row=1, col=2)
        sleep(0.1)

osc.start()

Gives you this

Automatic normalization

This

import random
from time import sleep

from oscilloscope import Osc


# increase the time scale so we can see clearly
osc = Osc(time_axis_sec=10)

@osc.signal
def irregular_signal(update):
    for _ in range(10):
        update(random.randint(0, 1))
        sleep(0.1)

    update(0.5)

    print("so I'm totally gonna fuck up after 5 sec")
    sleep(5)

    while True:
        update(random.randint(0, 1000))
        sleep(0.1)

osc.start()

Gives you this

After the 5 sec pause, the signal range changes drastically, but the graph still retains its coherence!

(The Y-axis is basically the % of the max value encountered at the time)

Install

pip install oscilloscope[pyqt5]

Install using the pyQt5 backend. (tkinter by default)

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

oscilloscope-0.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

oscilloscope-0.0.1-py2.py3-none-any.whl (3.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file oscilloscope-0.0.1.tar.gz.

File metadata

  • Download URL: oscilloscope-0.0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for oscilloscope-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2dec0a5cd595a322e22f9cd0d6c1e4b1a7c558cbf2f21ea20b04e3562183a1d9
MD5 bfdb569a34e3870e7005f5aacbeaf74d
BLAKE2b-256 20b478a6edf88219fcaa0a0d72be3cd8c56bb5a4fa53651d9fcfea7f50736a4b

See more details on using hashes here.

File details

Details for the file oscilloscope-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: oscilloscope-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for oscilloscope-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 53dfedeefe4e35894ce4885f4dd80fc8763f2be55717e7f90de15e0e2a7f0a55
MD5 98d85d16a901a7bc988fe2080400104f
BLAKE2b-256 30919d3eb6a6088015ed79aadc2e3a91ab3df1638cdbf1923f2991bbaffa1b02

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