Skip to main content

ADCToolbox

A Python toolbox for ADC characterization, calibration, modeling, and visualization.

ADCToolbox provides spectrum analysis, sine fitting, analog error diagnostics, digital bit-weight calibration, SAR behavioral models, time-interleaved ADC helpers, and ready-to-run examples.

Installation

pip install adctoolbox

Check the installed version:

python -c "import adctoolbox; print(adctoolbox.__version__)"

Quick Start

import numpy as np
from adctoolbox import analyze_spectrum, find_coherent_frequency

fs = 800e6
n_fft = 2**13
fin, _ = find_coherent_frequency(fs=fs, fin_target=80e6, n_fft=n_fft)

t = np.arange(n_fft) / fs
signal = 0.49 * np.sin(2 * np.pi * fin * t)

result = analyze_spectrum(signal, fs=fs, max_scale_range=(-0.5, 0.5))
print(f"ENOB: {result['enob']:.2f} bits")
print(f"SNDR: {result['sndr_dbc']:.2f} dBc")

Examples

Copy the full example tree into your workspace:

adctoolbox-get-examples
cd adctoolbox_examples
python 01_basic/exp_b01_environment_check.py
python 02_spectrum/exp_s01_analyze_spectrum_simplest.py

The package ships runnable examples across spectrum analysis, signal generation, analog debug, digital calibration, toolset dashboards, unit conversions, time-interleaved ADC analysis, oversampling, and Dither calibration.

For PN injection, identification, fixed-point HDC and architecture-specific controls, open 11_calibration/DITHER_GUIDE.md in the copied examples. These are behavioral research examples with explicit physical and statistical limits. DitherGainTracker, apply_dither_gain and DitherHDCTracker are public APIs; plants and the dedicated sine-fit baseline remain in the examples. Install adctoolbox[accel] to run the HDC tracker's per-sample loop with Numba.

Common APIs

from adctoolbox import (
    analyze_spectrum,
    fit_sine_4param,
    analyze_error_pdf,
    analyze_error_by_phase,
    analyze_inl_from_sine,
    calibrate_weight_sine,
    sar_convert,
    sar_reconstruct,
    sar_apply_cap_mismatch,
)

Most modern APIs return dictionaries with stable snake_case keys. For example, analyze_spectrum(...) returns metrics such as enob, sndr_dbc, snr_dbc, sfdr_dbc, thd_dbc, sig_pwr_dbfs, and nsd_dbfs_hz.

Codex Skills

ADCToolbox also ships bundled Codex skills. Install them into an explicit destination:

adctoolbox-install-skill --dest ~/.codex/skills
adctoolbox-install-skill --status --dest ~/.codex/skills

For local skill development:

adctoolbox-install-skill --dev --editable --force --dest ~/.codex/skills

Documentation

License

MIT License.

Citation

@software{adctoolbox2025,
  author = {Zhang, Zhishuai and Lu, Jie},
  title = {ADCToolbox: Comprehensive ADC Characterization and Analysis Toolkit},
  year = {2025},
  url = {https://github.com/Arcadia-1/ADCToolbox}
}

Supervised foreground correction

The packaged 12_foreground/ examples cover polynomial/MLP fitting, frozen inference, original repository error models, SNDR/SFDR comparisons and combined bit-weight/nonlinearity correction. Read their README and theory before choosing reference captures or interpreting learned parameters.

Metadata

Release files for adctoolbox 0.9.2

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

Source distribution (sdist)

Source distribution for adctoolbox 0.9.2
File Size Uploaded Provenance Actions
adctoolbox-0.9.2.tar.gz 356.9 kB Without provenance Details for adctoolbox-0.9.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for adctoolbox 0.9.2
File Interpreter ABI Platform Actions
adctoolbox-0.9.2-py3-none-any.whl Python 3 none any Details for adctoolbox-0.9.2-py3-none-any.whl

Total release size: 868.9 kB

Release files / adctoolbox-0.9.2.tar.gz

Download URL adctoolbox-0.9.2.tar.gz
Size 356.9 kB
Tags Source
SHA-256 checksum
How to use checksums
86bea9e635ca2d23963f9c31a21ed5e3be62a3aeff95841bdaaed8e82344f1ec
BLAKE2b-256 checksum
How to use checksums
56c87d96f7c78e8173be016cb0194754b826f61399d3b48f25867a6f2a5d251f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / adctoolbox-0.9.2-py3-none-any.whl

Download URL adctoolbox-0.9.2-py3-none-any.whl
Size 512.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac8d4e1c3e54799e8cbab4ac7914df1acedb503892dd4c9b825f64b421982e85
BLAKE2b-256 checksum
How to use checksums
ecd2b4b0b13bef5feccb586ccae9d30422c9e519a9edb5cf5ed303238e6c7b37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for adctoolbox 0.9.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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