Oscilloscope
An oscilloscope for python that just works™
Features
Simple to use
import random
from time import sleep
from oscilloscope import Osc
osc = Osc()
@osc.signal
def simple_random_signal(state):
while True:
state.draw(random.random())
sleep(0.1)
osc.start()
Gives you this
Parallel compute
Each osc.signal gets it's own process.
import random
from time import sleep
from oscilloscope import Osc
osc = Osc(nrows=2, ncols=3)
@osc.signal
def signal1(state):
while True:
state.draw((random.random())
sleep(0.1)
@osc.signal
def signal2(state):
while True:
state.draw(random.random(), row=1, col=2)
sleep(0.1)
osc.start()
Gives you this
P.S. Don't worry about race conditions, state.draw() is atomic. (See zproc)
Dynamic axis scale
The Y-axis's scale is dynamic, meaning that the graph's y axis scales with your signal.
import random
from time import sleep
from oscilloscope import Osc
# adjust window_sec and intensity to improve visibility
osc = Osc(window_sec=10, intensity=1)
@osc.signal
def increasing_signal(state):
delta = 1
while True:
state.draw(random.randint(-delta, delta))
delta += 5
sleep(0.01)
osc.start()
Gives you this
Automatic normalization
import random
from time import sleep
from oscilloscope import Osc
# turn on normalization
osc = Osc(normalize=True)
@osc.signal
def increasing_signal(state):
delta = 1
while True:
state.draw(random.randint(-delta, delta))
delta += 5
sleep(0.01)
osc.start()
Gives you this
This was the same signal as the [earlier](#Automatic normalization) one, but it looks a lot like the simple example, because we turned on normalization!
The Y-axis will now show, % max-amplitude encountered at the time, not the raw value.
Install
pip install oscilloscope
MIT Licence
Python 3.6+ only.
Metadata
Release files for oscilloscope 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| oscilloscope-0.0.4.tar.gz | 5.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| oscilloscope-0.0.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 10.0 kB
Release files / oscilloscope-0.0.4.tar.gz
| Download URL | oscilloscope-0.0.4.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bcc9a2394b557b5a08899068ab18792c9fcf4d7356c9511fba9326d329a8173
|
|
BLAKE2b-256 checksum How to use checksums |
94825b81f23dbf7927e045ba36ba5ce2dc27b19dd7076580b189810c98cd12e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Release files / oscilloscope-0.0.4-py2.py3-none-any.whl
| Download URL | oscilloscope-0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3900208de87ddc09b9b5349c92191da4dc89c917a3b09f0b05727a7720d28a1f
|
|
BLAKE2b-256 checksum How to use checksums |
e9e291b975acdb6e864cebf283595eb18b6fa9f6160914b77dba7d5618dfe2d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Security for oscilloscope 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.