Skip to content

Quickstart

The fastest path needs nothing but Docker — the published image serves the full workbench, no install (new in v0.34):

Terminal window
docker run --rm -p 8000:8000 stevenmburns/antennaknobs:latest
# -> http://localhost:8000

(See DOCKER.md for compose, mounting your own designs, and the optional NEC2 engine.)

To use the library — or hack on designs in your editor — install from PyPI. antennaknobs and its engine momwire ship prebuilt wheels, so a plain install needs no compiler:

Terminal window
python3 -m venv .venv && source .venv/bin/activate
pip install --upgrade pip
pip install "antennaknobs[web]"

Every release from v0.73.0 ships a frozen workbench for Windows, antennaknobs-workbench-windows.zip, on the latest release. Unzip it anywhere, double-click antennaknobs-workbench.exe, and a console window opens the server on this computer and your browser at it. Nothing is installed; delete the folder to remove it, and keep the folder together (the program needs _internal beside it). It is the same program as the pip install below, packaged, with momwire’s C++ solver inside.

The Windows workbench covers it properly — the options, the self-test, and how to point it at a licensed NEC-5 engine (if you run EZNEC Pro+ you already have one, in EZNEC’s Docs folder rather than under Program Files).

The same install in PowerShell. Use Python 3.12 — it is the version every antennaknobs test lane runs — or 3.14, which was exercised by hand on Windows for v0.72.0 (wheels exist for 3.10 through 3.15). If py -3.12 reports nothing, install 3.12 from python.org and tick Add python.exe to PATH.

Terminal window
py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install "antennaknobs[web]"
python -m uvicorn antennaknobs.web.server:app # then open http://127.0.0.1:8000

If PowerShell refuses to run Activate.ps1, allow scripts for your user once: Set-ExecutionPolicy -Scope CurrentUser RemoteSigned. Always run pip as python -m pip so it installs into the venv you just activated and not into whichever Python is first on PATH. If python prints nothing at all, it is not Python: in a window where the venv is not active, Windows routes python to a Microsoft Store stub (Get-Command python shows a path under WindowsApps). Activate the venv in that window, run the venv’s interpreter by path (.\.venv\Scripts\python.exe -m uvicorn antennaknobs.web.server:app), or use py -3.12; to be rid of the stub, switch off python.exe and python3.exe under Settings › Apps › Advanced app settings › App execution aliases. If the install seems to compile for minutes, pip did not pick a wheel — stop and paste the output of python -m pip debug --verbose into an issue, with python -X faulthandler -c "import antennaknobs; print('IMPORT OK')" after it. With a licensed NEC-5, see NEC-5 for the one variable that adds it as a solver.

This install serves the same web workbench as the Docker image:

Terminal window
uvicorn antennaknobs.web.server:app # then open http://127.0.0.1:8000

Pick a design from the dropdown and drag its knobs — the pattern, SWR, and impedance re-solve live.

Every design is an AntennaBuilder. Wrap one in an Antenna and ask for its feed-point impedance:

from antennaknobs import Antenna
from antennaknobs.designs.dipoles.invvee import Builder
ant = Antenna(Builder()) # an inverted-vee dipole, default parameters
print(ant.impedance()) # -> [(55.1-10.1j)] ohms in free space, one entry per feed port

Tune a knob and re-solve — parameters are plain attributes:

b = Builder()
b.length_factor = 1.0 # stretch the arms
print(Antenna(b).impedance()) # -> [(60.5+32.3j)]
# over real earth — the workbench's default soil:
print(Antenna(b, ground=("finite", 13.0, 0.005)).impedance()) # -> [(53.6+34.1j)]

Antenna also gives you the far-field pattern, a frequency sweep of the impedance, and the current distribution:

ant.far_field() # full-sphere far-field rings
ant.impedance_sweep(...) # impedance across a frequency range

By default Antenna uses a finite ground; pass ground="free" (or a ("finite", eps_r, sigma) tuple) to change it.