NImA
A library and a command-line interface (CLI) designed to assist with image analysis tasks using scipy.ndimage and scikit-image.
Features
- Bias and Flat Correction
- Automatic Cell Segmentation
- Multi-Ratio Ratiometric Imaging, enabling users to analyze multiple ratios with ease.
Installation
You can get the library directly from PyPI
using pip:
pip install nima
Alternatively, you can use pipx to install it in an isolated environment:
pipx install nima
To enable auto completion for the nima command, follow these steps:
-
Generate the completion script by running the following command:
_CLOP_COMPLETE=bash_source nima > ~/.local/bin/nima-complete.bash -
Source the generated completion script to enable auto completion:
source ~/.local/bin/nima-complete.bash
Usage
Library
To use nima in your python code, import it as follows:
from nima import nima, generat, utils
Command-Line Interface (CLI)
The CLI for this project provides two main commands: nima and bima. You can
find detailed usage information and examples in the
documentation. Here are some
examples of how to use each command:
nima
The nima command is used to perform multi-ratio ratiometric imaging analyses
on multi-channel TIFF time-lapse stacks.
To perform multi-ratio ratiometric imaging analyses on a multichannel TIFF time-lapse stack, use the following command:
nima <TIFFSTK> CHANNELS
Replace <TIFFSTK> with the path to the TIFF time-lapse stack file, and CHANNELS
with the channel names. By default, the channels are set to ["G", "R", "C"].
bima
The bima command is used to compute bias, dark, and flat corrections.
To estimate the detector bias frame:
bima bias <FPATH>
Replace <FPATH> with the paths to the bias stack (Light Off - 0 acquisition time).
To estimate the system dark (multi-channel) frame:
bima dark <FPATH>
Replace <FPATH> with the paths to the dark stack (Light Off - Long acquisition time).
Note: The estimation of the system dark may be removed in future versions because it risks being redundant with the flat estimation. It is likely to be removed soon.
To estimate the system flat (multi-channel) frame:
bima flat --bias <BIAS_PATH> <FPATH>
Replace <FPATH> with the path to the tf8 stack and <BIAS_PATH> with the path to the bias image.
TODO
- jaxtyping
ImFrame: TypeAlias = Float32[Array, "height width"] # noqa: F722
ImSequence: TypeAlias = Float32[Array, "time height width"] # noqa: F722
DIm: TypeAlias = dict[str, ImSequence]
Contributing
Contributions to the project are welcome!
If you are interested in contributing to the project, please read our contributing and development environment guides, which outline the guidelines and conventions that we follow for contributing code, documentation, and other resources.
License
We use a shared copyright model that enables all contributors to maintain the copyright on their contributions - see the revised BSD license for details.
Acknowledgments
Special thanks to the developers of scipy.ndimage and scikit-image for their invaluable contributions to image processing in Python.
Metadata
Release files for nima 0.11.9
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 |
|---|---|---|---|---|
| nima-0.11.9.tar.gz | 7.8 MB | Without provenance | Details for nima-0.11.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nima-0.11.9-py3-none-any.whl | Python 3 | none | any | Details for nima-0.11.9-py3-none-any.whl |
Total release size: 7.9 MB
Release files / nima-0.11.9.tar.gz
| Download URL | nima-0.11.9.tar.gz |
|---|---|
| Size | 7.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38903bfbd1259c2e9f142c696168939ab43708a23fc50d4fba0f285643319d0c
|
|
BLAKE2b-256 checksum How to use checksums |
18133649249b33e579d7291d82ce6f08986dae4ae465791b9b0a042a5ab4e4ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.19
|
Release files / nima-0.11.9-py3-none-any.whl
| Download URL | nima-0.11.9-py3-none-any.whl |
|---|---|
| Size | 32.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3278f34876cfb3f1dcc991925699f6447cfc288b1dd08854f906229033b56d20
|
|
BLAKE2b-256 checksum How to use checksums |
61e7e9ec29ca6b634a7ea1c69a02ed3bbf0919d99209ebf0cc4ce78b3366e5e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.19
|
Security for nima 0.11.9
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.