Skip to main content

tnia-python

A collection of useful python utilities from True North Intelligent Algorithms

If you need support for the library please post a question on the Image.sc Forum.

This project started as a means for me to test ideas and try out new python libraries. As the number of experiments grew I started organizing things into packages. The library is still in the very early stages of development, and is still lacking documentation, however it's at the point where I find it useful for prototyping bio-image processing protocols.

For now, the user-base of the library is mostly people I am working with directly, teaching to in a course, or discussing image processing problems with online. The helper functions make it quick for me to provide examples of image processing issues I am discussing.

There are useful helper function to

  • show max, sum and slice projections of 3D arrays
  • Generate PSFs with simple API to psfmodels and sdeconv
  • Extract PSFs from a bead image
  • Draw circles and spheres in images to create phantom images
  • Apply a forward imaging model (convolution + noise)

In the coming months and years I plan to keep iterating on the library and making it more usable. Please reach out to me if you have any questions.

Installation

The library covers a lot of ground and most people need one corner of it, so the base install is deliberately small and you add only the parts you want.

pip install tnia-python

That gives you the library and numpy, and nothing else. Pick the extras for the code you actually plan to run:

pip install "tnia-python[plotting]"

(Quotes matter on zsh and macOS, which otherwise treat the brackets as a glob.)

extra installs for
plotting matplotlib, scipy, scikit-image tnia.plotting — xy/zy/xz slices and projections. Also what tnia.deconvolution and tnia.segmentation draw with
io tifffile, scikit-image tnia.io — tiff and raw readers
simulation raster-geometry, scikit-image tnia.simulation — phantoms and test images
deeplearning albumentations, raster-geometry, matplotlib, scikit-image tnia.deeplearning — patch extraction, augmentation, SAM and stardist helpers
machinelearning scikit-image tnia.machinelearning — random forest feature extraction
wavelets PyWavelets tnia.wavelets

Combine them with commas, or take everything at once:

pip install "tnia-python[plotting,io]"
pip install "tnia-python[all]"

[all] is the right choice if you are following along with the notebooks and would rather not work out which example needs what.

If you are upgrading from 0.1.x, [all] is the one you want. Before 0.2.0 every install behaved like [all], so upgrading in place can leave imports failing until you add the extras you need.

Some heavier optional pieces are still installed by hand, because they are platform specific and not on every user's path — clij2-fft and psfmodels for deconvolution and PSF generation, stardist and cellpose for segmentation.

Full instructions, including editable installs and installing from git, are in docs/install.md.

Metadata

Release files for tnia-python 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tnia-python 0.2.4
File Size Uploaded Provenance Actions
tnia_python-0.2.4.tar.gz 111.7 kB Without provenance Details for tnia_python-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tnia-python 0.2.4
File Interpreter ABI Platform Actions
tnia_python-0.2.4-py3-none-any.whl Python 3 none any Details for tnia_python-0.2.4-py3-none-any.whl

Total release size: 247.2 kB

Release files / tnia_python-0.2.4.tar.gz

Download URL tnia_python-0.2.4.tar.gz
Size 111.7 kB
Tags Source
SHA-256 checksum
How to use checksums
14b9aeb7b383955d2d167e839acf4bf5b0492686ae923c59858cb043d01f8886
BLAKE2b-256 checksum
How to use checksums
a8dc34afe501e3476930f02a962f9a04ebc496ce7eb68a705bced7c7048ace59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / tnia_python-0.2.4-py3-none-any.whl

Download URL tnia_python-0.2.4-py3-none-any.whl
Size 135.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be80f1375b4538eeeee3a8726ca1421847065f910f25aaed2bc5f3c6c0dc9c97
BLAKE2b-256 checksum
How to use checksums
2056f80ebf5f5a8c79725df50a5ce7a69b362a3cd09ceef1c619c97927a7217d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for tnia-python 0.2.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page