Skip to content

PyTestLab playground

Edit Python, run a simulated measurement and inspect the data in your browser.

Education ↗

Python loads on your first run.

First-order RC transfer function · virtual frequency bench

Where does the signal start to fall?

Change resistance_ohm or capacitance_f in bench.yaml. Run again and compare the cutoff, gain and phase.

The diagram shows the experiment setup. Your Python code sets the parameters; the results come from PyTestLab’s models.

Virtual benchReady to run
Virtual Function generator connected to a RC low-pass filter and Oscilloscope. Simulated equipment only; no physical instruments are connected.SOURCEFunction generatorSINE INPUTDEVICE UNDER TESTRC low-pass filterFirst-order RC modelREADOUTOscilloscopeVirtual Function generator connected to a RC low-pass filter and Oscilloscope. Simulated equipment only; no physical instruments are connected.SOURCEFunction generatorSINE INPUTDEVICE UNDER TESTRC low-pass filterFirst-order RC modelREADOUTOscilloscope

Virtual instruments · simulated results only

Project files

PyTestLab 0.3.0

Measurement procedure: configure instruments, acquire readings and plot the results.Ctrl / ⌘ + Enter runs experiment.py with all three files. Tab moves focus; use Indent for spaces. Drafts stay in this browser.

Results

Run to measure

Run an experiment

The plots, sample data and Python output will appear here. Edit a parameter to see how the outcome changes.

First run downloads Python and its scientific packages. Later runs reuse the worker.

What runs in this browser?

Real Python and PyTestLab 0.3.0 run locally through Pyodide. The examples use PyTestLab’s single-pole circuit models and its stateful PSU twin. They model circuit behaviour and instrument limits; they do not connect to physical hardware or run native ngspice.

Your code can use Python, NumPy, Pydantic, YAML, the included PyTestLab modules, and playground_output.plot. The experiment imports its bench from simulator.py; bench.yaml configures the instruments and device. Edit any file, then run experiment.py to measure the updated bench. Native hardware drivers, subprocess simulators and packages not loaded here need a local Python installation.

Each run reloads all three project files and the simulator module. Library modules stay warm until Reset Python. Stop and the 20-second execution limit terminate the worker. All project files are saved in this browser. Download file saves the selected file; Download CSV saves the plotted data.

Read the bench setup code ↗Source snapshot ↗Apache 2.0 licence ↗

Ready to write a procedure for your bench? Check instrument profiles and configuration in the documentation.

Read the PyTestLab documentation ↗