pyimgal
Python bindings for the imgal image algorithm and processing library. Visit imgal.org for more information.
Installation
pyimgal from PyPI
You can install the pyimgal package from PyPI with:
$ pip install pyimgal
The pyimgal package is compatible with Python >=3.8 and the following architectures.
| Operating System | Architecture |
|---|---|
| Linux | amd64, aarch64 |
| macOS | intel, arm64 |
| Windows | amd64 |
Alternatively, you can install pyimagal from source by building the imgal_python repository. See the next section for instructions.
Build pyimgal from source
To build the pyimgal Python package from source, use the maturin build tool (this requires the Rust toolchain to build the imgal core library).
If you're using uv to manage your Python virtual environments (venv) add maturin to your environment and run the maturin develop --release
command in the imgal_python directory of the imgal repository with your selected venv activated:
$ source ~/path/to/myenv/.venv/bin/activate
$ (myenv) cd imgal_python
$ maturin develop --release
Alternatively, if you're using conda or mamba you can do the following:
$ cd imgal_python
$ mamba activate myenv
(myenv) $ mamba install maturin
...
(myenv) $ maturin develop --release
This will install pyimgal in the currently active Python environment.
Usage
Using pyimgal
Once imgal_python has been installed in a compatible Python environment, imgal will be available to import. The example below demonstrates how
to obtain a colocalization z-score (i.e. colocalization and anti-colocalization strength) using the Spatially Adaptive Colocalization Analysis (SACA)
framework. The two number values after the channels are threshold values for channels a and b respectively.
Note: This example assumes you have 3D data (row, col, ch) to perform colocalization analysis and the tifffile package in your environment.
import imgal.colocalization as coloc
from tifffile import imread
# load some data
image = imread("path/to/data.tif")
# slice channels to perform colocalization analysis
ch_a = image[:, :, 0]
ch_b = image[:, :, 1]
# compute colocalization z-score with SACA 2D with 4 parallel threads
zscore = coloc.saca_2d(ch_a, ch_b, 525, 400, threads=4)
# apply Bonferroni correction and compute significant pixel mask
mask = coloc.saca_significance_mask(z_score)
Documentation
Each function in imgal is documented and published on docs.rs.
License
Imgal is a dual-licensed project with your choice of:
- MIT License (see LICENSE-MIT)
- The Unlicense (see LICENSE-UNLICENSE)
Metadata
Release files for pyimgal 0.3.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 | |
|---|---|---|---|
| pyimgal-0.3.1.tar.gz | 37.6 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pyimgal-0.3.1-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details |
| pyimgal-0.3.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| pyimgal-0.3.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| pyimgal-0.3.1-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details |
| pyimgal-0.3.1-cp38-abi3-macosx_10_12_x86_64.whl | CPython 3.8 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 10.6 MB
Release files / pyimgal-0.3.1.tar.gz
| Download URL | pyimgal-0.3.1.tar.gz |
|---|---|
| Size | 37.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
494062d21434a5ffcaa5fad7be0278291419709662acef9fd1e35a8e61f3ccb1
|
|
BLAKE2b-256 checksum How to use checksums |
366d69c4394d1d4489195cdb66e34125c765d77d74766144cb5451a99ca92873
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 20, 2026.
Transparency logRelease files / pyimgal-0.3.1-cp38-abi3-win_amd64.whl
| Download URL | pyimgal-0.3.1-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
6ea25a1b0bb8b0dcda92002444635c7e3a612db9e326490b2a614265e6393d77
|
|
BLAKE2b-256 checksum How to use checksums |
906db88997b88555d623677d3c4553e5b57ec52c58fc2ff6d60b657a8e263606
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 20, 2026.
Transparency logRelease files / pyimgal-0.3.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyimgal-0.3.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
1a113f5853b85a5dc2a90232a48f54e59d2e3fc5008c3558019defec67c02ed9
|
|
BLAKE2b-256 checksum How to use checksums |
06aa212b8e1ab2e03da176402b26d43e33245df1f14128ce6b00338248346258
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 20, 2026.
Transparency logRelease files / pyimgal-0.3.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pyimgal-0.3.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
2243b9b869d8b53b5ba8fc136e8311d694b475af21ef5c9ae56d4d76350c2480
|
|
BLAKE2b-256 checksum How to use checksums |
385984ad7ab281dda4d6ed6ab6a70c0af3cdcc9d966125f3ae349a580c86a3d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 20, 2026.
Transparency logRelease files / pyimgal-0.3.1-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | pyimgal-0.3.1-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
bff923c1ebaec3545a176637a2c49a3aa0e1604815ec86363c65ffafa05cbc08
|
|
BLAKE2b-256 checksum How to use checksums |
1ddeb0cfdb27b86450f36b8262ec84c277e61af848969096b5ff7d9b8b2b5a64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 20, 2026.
Transparency logRelease files / pyimgal-0.3.1-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | pyimgal-0.3.1-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
f8749c6829195081cee1fd16aaf452458529e591babe49603dc15718b69da299
|
|
BLAKE2b-256 checksum How to use checksums |
6f973148700354c1377d42d0134d4408696066c5a7e46958f34de6355387a5e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 20, 2026.
Transparency log