{"id":19839416,"url":"https://github.com/scientifichackers/oscilloscope","last_synced_at":"2025-05-01T19:30:20.287Z","repository":{"id":45841460,"uuid":"144414185","full_name":"scientifichackers/oscilloscope","owner":"scientifichackers","description":"An oscilloscope for python that just works™","archived":false,"fork":false,"pushed_at":"2022-12-08T01:14:32.000Z","size":40,"stargazers_count":27,"open_issues_count":7,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T19:56:55.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scientifichackers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-11T19:51:21.000Z","updated_at":"2025-02-20T17:33:05.000Z","dependencies_parsed_at":"2023-01-25T02:30:56.883Z","dependency_job_id":null,"html_url":"https://github.com/scientifichackers/oscilloscope","commit_stats":null,"previous_names":["devxpy/oscilloscope"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientifichackers%2Foscilloscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientifichackers%2Foscilloscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientifichackers%2Foscilloscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientifichackers%2Foscilloscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scientifichackers","download_url":"https://codeload.github.com/scientifichackers/oscilloscope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251932513,"owners_count":21667157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T12:22:20.844Z","updated_at":"2025-05-01T19:30:19.858Z","avatar_url":"https://github.com/scientifichackers.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oscilloscope\n**An oscilloscope for python that just works™**\n\n## Features\n\n### Simple to use\n\n[*This*](examples/simple_signal.py)\n```python3\nimport random\nfrom time import sleep\n\nfrom oscilloscope import Osc\n\nosc = Osc()\n\n\n@osc.signal\ndef simple_random_signal(state):\n    while True:\n        state.draw(random.random())\n        sleep(0.1)\n\n\nosc.start()\n```\n*Gives you this*\n\n\u003cimg src=\"https://i.imgur.com/BMeYoXG.png\" height=\"300\" /\u003e\n\n### Parallel compute\n\nEach `osc.signal` gets it's own process.\n\n[*This*](examples/parallel_signals.py)\n```python3\nimport random\nfrom time import sleep\n\nfrom oscilloscope import Osc\n\n\nosc = Osc(nrows=2, ncols=3)\n\n\n@osc.signal\ndef signal1(state):\n    while True:\n        state.draw((random.random())\n        sleep(0.1)\n\n\n@osc.signal\ndef signal2(state):\n    while True:\n        state.draw(random.random(), row=1, col=2)\n        sleep(0.1)\n\n\nosc.start()\n```\n*Gives you this*\n\n\u003cimg src=\"https://i.imgur.com/PPC7z4m.png\" height=\"300\" /\u003e\n\nP.S. Don't worry about race conditions, `state.draw()` is atomic. (See [zproc](https://github.com/pycampers/zproc))\n\n### Dynamic axis scale\n\nThe Y-axis's scale is dynamic, meaning that the graph's y axis scales with your signal.\n\n[*This*](examples/increasing.py)\n```python3\nimport random\nfrom time import sleep\n\nfrom oscilloscope import Osc\n\n\n# adjust window_sec and intensity to improve visibility\nosc = Osc(window_sec=10, intensity=1)\n\n\n@osc.signal\ndef increasing_signal(state):\n    delta = 1\n\n    while True:\n        state.draw(random.randint(-delta, delta))\n        delta += 5\n        sleep(0.01)\n\n\nosc.start()\n```\n*Gives you this*\n\n\u003cimg src=\"https://i.imgur.com/r1vHcKH.png\" height=\"300\" /\u003e\n\n### Automatic normalization\n\n[*This*](examples/normalized.py)\n```python3\nimport random\nfrom time import sleep\n\nfrom oscilloscope import Osc\n\n\n# turn on normalization\nosc = Osc(normalize=True)\n\n\n@osc.signal\ndef increasing_signal(state):\n    delta = 1\n\n    while True:\n        state.draw(random.randint(-delta, delta))\n        delta += 5\n        sleep(0.01)\n\n\nosc.start()\n```\n*Gives you this*\n\n\u003cimg src=\"https://i.imgur.com/Dlve8rJ.png\" height=\"300\" /\u003e\n\nThis was the same signal as the [earlier](#Automatic normalization) one, \nbut it looks a lot like the simple example, because we turned on normalization! \n\nThe Y-axis will now show, % max-amplitude encountered at the time, not the raw value.\n\n\n## Install\n\n\n[![PyPI](https://img.shields.io/pypi/v/oscilloscope.svg?style=for-the-badge)](https://pypi.org/project/oscilloscope/)\n\n\n`pip install oscilloscope`\n\nMIT Licence\u003cbr\u003e\nPython 3.6+ only.\n\n---\n\n[🐍🏕️](http://www.pycampers.com/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscientifichackers%2Foscilloscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscientifichackers%2Foscilloscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscientifichackers%2Foscilloscope/lists"}