Skip to main content

rad-lab

CI Docs

A Python radar module for simulating pulse-Doppler returns, generating range-Doppler maps (RDMs), and forming synthetic aperture radar (SAR) images. Designed for radar engineers and students who want to build intuition for how RDMs and SAR images are formed, how waveforms affect resolution, and how DRFM electronic attack techniques appear in the RDMs.

Installation

Install from PyPI (library only)

pip install rad-lab

Clone for the full example apps

git clone https://github.com/JohnNehls/rad-lab
pip install -e ./rad-lab

A few exercises use LaTeX for plot labels — LaTeX must be installed for those to run.

Usage

RDM Generation

from rad_lab import rdm, Radar, Target, Return, barker_coded_waveform

radar = Radar(
    fcar=10e9,
    tx_power=1e3,
    tx_gain=10 ** (30 / 10),
    rx_gain=10 ** (30 / 10),
    op_temp=290,
    sample_rate=20e6,
    noise_factor=10 ** (8 / 10),
    total_losses=10 ** (8 / 10),
    prf=200e3,
    dwell_time=2e-3,
)

waveform = barker_coded_waveform(10e6, nchips=13)

return_list = [Return(target=Target(range=0.5e3, range_rate=1.0e3, rcs=1))]

rdm.gen(radar, waveform, return_list)

Other available waveforms: uncoded_waveform, random_coded_waveform, lfm_waveform. For additional RDM examples see apps/rdms, the gallery, or the API docs.

SAR Image Generation

rad-lab also supports stripmap and spotlight SAR image formation from point-target scenes:

For more SAR examples see apps/sar or the gallery.

Exercises

Many radar subsystems are demonstrated as standalone scripts in apps/exercises. Each file builds intuition for one concept and can be run directly. Topics covered include:

  • Range equation
  • Pulse-Doppler processing
  • Waveforms and cross-correlation
  • Ambiguity function
  • Datacube processing and windowing
  • Keystone formatting
  • Detection theory
  • Linear arrays and monopulse
  • Stripmap and spotlight SAR

Every figure these exercises produce can be browsed in the gallery.

Modeling assumptions

The RDM and SAR simulators in rad_lab use a few standard simplifications. They are noted here so it is clear which physical effects the simulator deliberately omits.

  • Stop-and-hop (start-stop) propagation. Within a single pulse the radar and target are treated as stationary; motion happens only between pulses. Round-trip delay and carrier phase are evaluated once per pulse, at the pulse-transmit instant, and the matched-filter template is a perfect replica of the transmitted pulse. This is the standard pulse-Doppler / SAR signal model (e.g. Richards, Fundamentals of Radar Signal Processing, §8). Consequences: no intra-pulse range walk and no Doppler time-scaling of the echo — all target motion appears as the pulse-to-pulse phase progression -4π f_c R(t_m)/c.
  • Point scatterers. Targets are ideal points with a scalar RCS; no glint, no extended-target spread.
  • No propagation medium effects. No atmospheric attenuation, no ionospheric dispersion, no multipath.
  • Ideal receiver chain. Linear, time-invariant, with thermal noise modeled from the receiver noise figure and operating temperature.

Contributing

Contributions are welcome. Please fork the repository and submit a pull request.

To run the test suite:

python -m pytest tests/ -v  # unit tests (fast; apps regression is deselected)
python -m pytest -m apps    # apps regression: run every apps/ script headless,
                            # comparing stdout against tests/app_baselines/ and
                            # each figure against tests/app_baselines/figures/

After an intentional change to a script's output or plots, refresh both the stdout and image baselines with:

RADLAB_UPDATE_APP_BASELINES=1 python -m pytest -m apps

New app scripts are picked up automatically. Seed any randomness (np.random.seed(0)) so the stdout and figure baselines are stable, or name the file *_no_test.py to have the regression skip it. Figure comparison is RMS-pixel based, so a matplotlib upgrade may require a baseline refresh.

License

This project is licensed under the GPL-3.0 License - see LICENSE for details.

Metadata

Release files for rad-lab 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rad-lab 0.0.6
File Size Uploaded Provenance Actions
rad_lab-0.0.6.tar.gz 5.8 MB With provenance Details for rad_lab-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rad-lab 0.0.6
File Interpreter ABI Platform Actions
rad_lab-0.0.6-py3-none-any.whl Python 3 none any Details for rad_lab-0.0.6-py3-none-any.whl

Total release size: 5.8 MB

Release files / rad_lab-0.0.6.tar.gz

Download URL rad_lab-0.0.6.tar.gz
Size 5.8 MB
Tags Source
SHA-256 checksum
How to use checksums
50fe22b2c58221769b6c6a0e74c853af807a21260a1f6d49ed369033cc2d665d
BLAKE2b-256 checksum
How to use checksums
400724fb552623f763f2a7ee608609df1307f8e496f00832aa77627efb87a0c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.

Transparency log

Release files / rad_lab-0.0.6-py3-none-any.whl

Download URL rad_lab-0.0.6-py3-none-any.whl
Size 69.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1a9a332451490a869c7e02180325e389dcf5cdf6e565c66f2659db163ec07f5
BLAKE2b-256 checksum
How to use checksums
f253cc4679c64c7876f462a923eaac9206134139091bc5ad3546a57d3c5b839a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.

Transparency log

Security for rad-lab 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rad_lab-0.0.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page