Smith Lab is an interactive Python/Tkinter desktop application for learning how impedance, reflection, matching networks, and S-parameters fit together on a Smith chart.
- Release:
0.1.0-beta - Primary tested platform: Windows 10/11
- Recommended Python: 3.12
This is a source beta for learners, radio hobbyists, students, and engineers who want to inspect the math behind the chart instead of treating it as a black box.
- Enter or drag a load and see normalized impedance, reflection coefficient, VSWR, return loss, and reflected power update together.
- Add series, shunt, and transmission-line matching steps, or synthesize an automatic two-component L match.
- Optionally search nearby E24 component values and compare the remaining mismatch with the ideal solution.
- Watch incident and reflected wavefronts form a standing wave on a simplified transmission line.
- Import Touchstone files and inspect S11, S22, S21, S12, differential/common reflections, differential transmission, and mode conversion.
- Link A/B markers across the Smith chart, return-loss/VSWR sweep, transmission plots, and the selected frequency.
- View the matching schematic and before/after 10 dB return-loss bandwidth.
- Save a portable
.smithlabproject and export publication-quality PNG, SVG, or PDF charts with concise values and matching context. - Open the calculation pane or hover over controls for plain-language help.
Install 64-bit Python 3.12 with Tkinter, then open PowerShell in the project folder and run:
py -3.12 -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
.\.venv\Scripts\python.exe main.pyIf py -3.12 reports that no matching Python is installed, install Python
3.12 or substitute a Python 3.10-3.12 executable after confirming its version
with python --version.
After .venv exists, python main.py also works: the launcher detects a
different interpreter and restarts with the project environment. Every path is
derived from the location of main.py; no username or machine-specific path
is embedded in the application.
- Open this folder in VS Code.
- Select
.venv\Scripts\python.exeas the Python interpreter. - Open Run and Debug.
- Choose Run Smith Lab.
The included launch settings and test discovery use paths relative to the workspace folder.
The full installation uses scikit-rf for Touchstone/network handling and pysmithchart with Matplotlib for publication exports.
- Touchstone import accepts
.s1p,.s2p, and higher-port.sNpfiles supported by scikit-rf. - Single-ended views expose available port reflections and transmissions.
- Even-port files can be converted to generalized mixed mode. Smith Lab pairs
adjacent physical ports as
(1,2),(3,4), and so on. - A pair of 50 ohm single-ended conductors naturally uses a 100 ohm differential reference and a 25 ohm common-mode reference.
- Transmission plots provide magnitude, unwrapped phase, and group delay.
- Unload removes imported data while preserving the selected impedance and matching network for manual study.
The examples folder contains synthetic matched, reactive, resonant, antenna,
cable, amplifier, filter, and balanced-pair sweeps. See
examples/README.md for the lesson behind each file.
These files are illustrative data, not hardware measurements.
- Enter an impedance manually or import a Touchstone measurement.
- Select a frequency directly, with the sweep slider, or with marker A/B.
- Add matching components manually or choose Auto match current point.
- Compare before/after return loss and bandwidth in the lower analysis tabs.
- Open Show math to inspect the equations and each matching step.
- Save the analysis as a
.smithlabproject or export a chart for a report.
Smith Lab performs its analysis locally and does not upload measurement data.
A .smithlab project embeds the original Touchstone bytes so the project can
be moved to another computer without depending on the original file path.
Treat a shared project as you would treat its source measurement.
Run the complete test suite from PowerShell:
.\.venv\Scripts\python.exe -m unittest -vThe tests cover Smith chart transforms, matching networks, fixed-component frequency behavior, project round trips, every bundled Touchstone example, mixed-mode conversion, publication exports, transmission math, and portable interpreter selection. GitHub Actions runs the suite on Python 3.10, 3.11, and 3.12 for Windows.
0.1.0-betais a source release; there is not yet a signed executable or installer. Windows with Python 3.12 is the primary tested setup.- Matching elements use ideal lumped-component and lossless-line models. E24 selection does not yet include tolerance, parasitics, Q, current/voltage limits, or manufacturer-specific values.
- The after-matching sweep describes input reflection. Smith Lab deliberately does not invent an after-match S21/S12 result without a complete two-port cascade model.
- Mixed-mode conversion assumes adjacent
+/-port ordering. Confirm the port order of real measurement files before interpreting differential results. - The included examples are synthetic educational fixtures. Smith Lab is not a substitute for VNA calibration, circuit simulation, or electromagnetic validation of real hardware.
- Numerical behavior is extensively unit tested, but automated end-to-end GUI interaction coverage is still limited.
Smith Lab is available under the MIT License. See
CHANGELOG.md for release history.
