barc4dip
barc4dip is a Python package for digital image processing, with a focus on scientific images and beam diagnostics.
It provides utilities for image I/O, preprocessing, signal analysis, plotting, and compact reporting, with current emphasis on speckle and sharpness metrics for 2D images and image stacks.
Features
- Read and write scientific images (
TIFF,EDF,HDF5) - Compute image statistics and distribution moments
- Compute speckle metrics on single images and stacks
- Compute sharpness metrics on single images and stacks
- Apply basic preprocessing tools such as flat-field correction and PSF deconvolution
- Perform FFT / PSD / correlation / translation tracking operations
- Plot images, histograms, tile maps, stack metrics, and displacements
- Export compact Markdown logbook reports
- Run a small CLI for speckle-image reporting
Installation
Local installation from source:
git clone https://github.com/barc4/barc4dip.git
cd barc4dip
pip install -e .
pip install barc4dip is planned, but not available yet.
Main modules
barc4dip.io– image reading and writingbarc4dip.preprocessing– flat-field correction, deconvolutionbarc4dip.metrics– speckle, sharpness, and distribution metricsbarc4dip.signal– FFT, PSD, correlation, and tracking helpersbarc4dip.plotting– plotting API for images and stack metricsbarc4dip.report– Markdown logbook summariesbarc4dip.geometry/maths/utils– supporting tools
Quick example
import barc4dip as dip
img = dip.read_image("image.tif")
stats = dip.sharpness_stats(img)
report = dip.logbook_report(stats)
print(stats["full"])
print(report)
For stacks:
import barc4dip as dip
stack = dip.read_image("scan.h5")
stats = dip.sharpness_stack_stats(stack)
Command line
A small CLI is currently available for speckle-image analysis:
barc4dip-speckles -s speckles.tif -o report.md
Optional flat and dark images can also be provided.
Status
This project is under active development.
- PyPI distribution: coming soon
- More examples: coming soon
- Full documentation: coming soon
The repository already contains early notebooks and generated report examples that illustrate the intended workflow.
License
CeCILL-2.1
Metadata
Release files for barc4dip 2026.3.31
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 | |
|---|---|---|---|---|
| barc4dip-2026.3.31.tar.gz | 82.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| barc4dip-2026.3.31-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 185.3 kB
Release files / barc4dip-2026.3.31.tar.gz
| Download URL | barc4dip-2026.3.31.tar.gz |
|---|---|
| Size | 82.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f92e867775482d9aad57948eab4cdb07a9472cf70f87aa0484b1174c304bbec
|
|
BLAKE2b-256 checksum How to use checksums |
618089ebdcbf70ebcdbb8f5f20bd5cb3b4f10876dab9e179370f9bb3aac3005f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / barc4dip-2026.3.31-py3-none-any.whl
| Download URL | barc4dip-2026.3.31-py3-none-any.whl |
|---|---|
| Size | 102.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f6f6dbb3a9437a6d1dc96afa76289a3efd50b6de481535a857ca3d1a7797a07
|
|
BLAKE2b-256 checksum How to use checksums |
d2f351ce8178126a4209013667be8c7727fc09a8c74e9517f86443293bf36857
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for barc4dip 2026.3.31
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.