python signal generator
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-08 22:47:15 +02:00
.github/workflows ci: use the container's system Python (venv) for Linux test jobs 2026-09-13 21:45:20 +00:00
doc feat(round-11): |IQ| in the preview time plot + full-scale final normalization + per-tone LFM comb scaling 2026-10-07 21:33:16 +00:00
gensig fix(idft comb): fix wrong dft generation 2026-10-08 22:47:15 +02:00
manual_tests test(integration): protected bands round close-out (ticket 46) 2026-09-28 18:50:58 +00:00
tests feat(round-11): |IQ| in the preview time plot + full-scale final normalization + per-tone LFM comb scaling 2026-10-07 21:33:16 +00:00
.gitignore build(uv): add uv.lock to .gitignore 2026-09-06 11:17:27 +02:00
AGENTS.md ci: Forgejo compatibility — FORGEJO_TOKEN release flow, workflow docs 2026-09-13 21:28:59 +00:00
LICENSE docs: add MIT license (retrieved from main branch) 2026-09-01 08:54:40 +00:00
manual_tests.md feat(chirp): end-to-end integration + manual explorer (ticket 37) 2026-09-09 13:55:38 +00:00
pyproject.toml chore(compat): drop zip(strict=True) for py3.9 + widen the output-path entry 2026-09-07 10:01:37 +00:00
README.md feat(model): rename waveform Chirp -> Up Chirp (ticket 39) + repair PR #33 fallout 2026-09-27 13:12:00 +00:00

GenSig

RF signal generation application (Python port of the MATLAB GenSig app). See doc/spec.md for the application specification (v1.1) and doc/sigv3.md for the SigV3.1 output format.

Status: the full v1 generation chain is live — project model + JSON persistence, validation engine, global settings, the main-window UI (panels, model binding, dynamic enable/disable rules, frequency-bands table, load/save/new/close), and the headless generate chain (generate() → post-processing → SigV3.1 write → spectrum preview) for five waveforms (AGWN, Frequency Comb, Frequency Comb IQ, Up Chirp; Multi IQ / Other IQ still show the not-implemented notice). Remaining: the Multi IQ / Other IQ generators, memory/performance hardening and the later post-processing rounds.

Requirements

  • Python ≥ 3.10 (3.12 recommended)

  • NumPy, SciPy, Matplotlib

  • Tkinter (bundled with the standard Windows and macOS Python installers; on Debian/Ubuntu it is a system package, not a pip package):

    sudo apt install python3-tk
    

Setup

The project is a standard Python package — it works with either uv or plain pip.

uv venv
uv pip install -e ".[dev]"

With pip only (no uv) — e.g. a Windows machine

:: 1) create and activate a virtual environment (optional but recommended)
python -m venv .venv
.venv\Scripts\activate

:: 2) install the app + its dependencies
pip install -e ".[dev]"

:: 3) run it
python -m gensig.app

No setuptools/wheel install step is needed — modern pip (≥ 21.3) builds editable installs automatically. On the Windows installer build of Python, Tkinter is included out of the box, so nothing extra is required.

The [dev] extra (pytest, ruff, mypy, hypothesis, pytest-cov) is optional — for running the app only: pip install -e .

Run

uv run gensig          # or: python -m gensig.app        (opens the window)

Without a display or Tkinter, gensig exits with code 2 and an explanatory message instead of a traceback.

Test

uv run pytest
uv run ruff check gensig tests && uv run ruff format --check gensig tests
uv run mypy gensig

pytest runs the suite with coverage (gate: 85%). The GUI entry and the placeholder areas (signal processing, IQ I/O, settings, UI panels) are excluded from the coverage gate until their tickets land.

Build binaries (GitHub Actions)

.github/workflows/build.yml builds a one-file executable for Linux and Windows with PyInstaller. It runs on push to main/master or manual dispatch, and on v* tags additionally publishes a GitHub release with both binaries. Tkinter is supplied by the system python3-tk package on the Linux runner and by the setup-python build on Windows.

Local (Linux/macOS) equivalent:

pip install pyinstaller
pyinstaller --noconfirm --clean --onefile --windowed --name gensig --collect-all gensig gensig/app.py

Layout

gensig/
├── app.py            # GUI entry point (window shell in this round)
├── core/
│   ├── model.py      # ProjectData + Band (single source of state)
│   ├── validation.py # spec §7 limits/derived checks
│   ├── units.py      # UI-unit ↔ core-unit converters
│   ├── constants.py  # memory budget & limits
│   └── io/           # project JSON persistence (sig I/O later)
└── ui/               # panels arrive in later tickets