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
- Website: https://adctoolbox.tokenzhang.com/
- Docs: https://adctoolbox.tokenzhang.com/doc/
- GitHub: https://github.com/Arcadia-1/ADCToolbox
- PyPI: https://pypi.org/project/adctoolbox/
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.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| adctoolbox-0.9.3.tar.gz | 364.9 kB | Without provenance | Details for adctoolbox-0.9.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adctoolbox-0.9.3-py3-none-any.whl | Python 3 | none | any | Details for adctoolbox-0.9.3-py3-none-any.whl |
Total release size: 886.7 kB
Release files / adctoolbox-0.9.3.tar.gz
| Download URL | adctoolbox-0.9.3.tar.gz |
|---|---|
| Size | 364.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11219299be504641ba7fe6bb8be04fa09e2137ac04a00cb584bf7fdf4e3befde
|
|
BLAKE2b-256 checksum How to use checksums |
fe430042c26046c559954d0d0e5066f37aa84209a28ff6f2d4aaf46115b1aa12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.18
|
Release files / adctoolbox-0.9.3-py3-none-any.whl
| Download URL | adctoolbox-0.9.3-py3-none-any.whl |
|---|---|
| Size | 521.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78210fb93e0e8544f5f61eb0137ff33b485bd28d7ad5d1a8ea7cc898eb1aaf4f
|
|
BLAKE2b-256 checksum How to use checksums |
1601344d86bceafbf4e6c9885923564369e96d331e9ed6dfbb318ee721539372
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.18
|
Security for adctoolbox 0.9.3
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.