pyspeckle is a Python library for generating and analyzing laser speckle fields. It provides reproducible numerical implementations of physically motivated speckle models used in optical metrology, coherent imaging, and biomedical photonics.
The methods implemented in this package are derived from Duncan & Kirkpatrick (Algorithms for simulation of speckle (laser and otherwise), Proc. SPIE 6855, 2008). These algorithms unify a variety of simulation approaches across:
objective speckle (non-imaged fields),
subjective speckle (imaged fields),
static speckle, and
dynamic speckle including translation, strain, boiling, and decorrelation.
Scientific Context
Coherent imaging systems—including SAR, OCT, ultrasound, ESPI, and laser speckle contrast imaging—produce granular interference patterns defined by the random phase relationships of scattered waves.
Representative Outputs
1D speckle
2D speckle
Documentation
Full documentation and algorithm demonstrations are available at:
https://pyspeckle2.readthedocs.io
Try in JupyterLite (no install required):
Installation
pip:
pip install pyspeckle
conda:
conda install -c conda-forge pyspeckle
Citation
If you use pyspeckle in academic, instructional, or applied technical work, please cite:
Prahl, S. (2025). pyspeckle: Tools for objective and subjective laser speckle analysis (Version 0.6.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.8311677
BibTeX
@software{pyspeckle_prahl_2025,
author = {Scott Prahl},
title = {pyspeckle: Tools for objective and subjective laser speckle analysis},
year = {2025},
version = {0.6.0},
doi = {10.5281/zenodo.8311677},
url = {https://github.com/scottprahl/pyspeckle},
publisher = {Zenodo}
}
License
pyspeckle is released under the MIT License. Contributions are welcome.
Release files for pyspeckle 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyspeckle-0.6.1.tar.gz | 15.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyspeckle-0.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.8 kB
Release files / pyspeckle-0.6.1.tar.gz
| Download URL | pyspeckle-0.6.1.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5b3077914969ec6c6873906b5172732614b68c027735bfd7f2e0bca7892177c
|
|
BLAKE2b-256 checksum How to use checksums |
3cf879757c048344518f2f148bfcc7a1fa16220dc8af482c2b8dd80c4b53300b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 5, 2026.
Transparency logRelease files / pyspeckle-0.6.1-py3-none-any.whl
| Download URL | pyspeckle-0.6.1-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
064938d19a6fa4a9db13719f4185f33983175b2a23e5b91369e05ab09d04ed2e
|
|
BLAKE2b-256 checksum How to use checksums |
8250a2bfcddee71bd6c957771c0f59b1ff035f66967af1ce79185db207cf155d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 5, 2026.
Transparency log