NanoImagingPack
This is a package for simple image processing. It is oriented on the DIP-Image package, which is available for Matlab. The goal is to keep things simple and make it available for a broad community.
Installation
- Download Anaconda https://docs.anaconda.com/anaconda/install/
- Open an anaconda prompt
- create a new environment (tested in Python 3.8)
conda create --name nanoimaging python=3.8 anaconda tifffile - Activate
conda activate nanoimaging - Install this feature branch of NanoImagingPack
pip install git+https://gitlab.com/bionanoimaging/nanoimagingpack
Getting started
Start an ipython shell
ipython
Load and view a sample image
import NanoImagingPack as nip
import napari
img = nip.readim("erika")
nip.vv(img)
The created image is of type "image"
Gain calibration from an inhomogenous stack
Perform a gain calibration using simulated data.
import NanoImagingPack as nip
import numpy as np
# define the input parameters
NPHOT = 100 # max number of photons in simulation
OFFSET = 100 # black level offset
READNOISE = 4 # read noise to simulate
STACK_SIZE = 30
img = nip.readim("MITO_SIM")[0] # load the first frame from the MITO_SIM sample
fg = np.tile(img,(STACK_SIZE,1,1)) # make a stack of frames
fg = nip.poisson(fg, NPhot=NPHOT) # simulate poissonian shot noise
fg = fg + np.random.normal(loc=OFFSET, scale=READNOISE, size=fg.shape) # add gaussian noise
bg = np.random.normal(loc=OFFSET, scale=READNOISE, size=fg.shape) # generate background stack
# perform a calibration and plot the results
nip.cal_readnoise(fg, bg, brightness_blurring=False)
Notes
- the command nip.lookfor('some string') allows you to search for functions and methods
- nip.view() or nip.vv() provides an image viewer
- The default viewer is currently Napari, but this can be changed by nip.setDefault('IMG_VIEWER',myViewer) with myViewer being one of 'NIP_VIEW', 'VIEW5D','NAPARI','INFO'
- in NIP_VIEW press 'h' to get help. In VIEW5d press "?"
- graph() provides a simple viewer for 2D graphs -> you can add lists for multiple graphs
Features
- multidimensional fft/ifft
- image alignment
- finding for SLM based SIM images
- Controlling Hamamatsu LCOS SLM
- Creating OTFs, PSFs etc.
- Image manipulation (convolution, (simple) EdgeDamping, extracting, concattenating, Fourier-space extractions and padding)
- helper functions such as ramps, xx, yy, zz, freq/realspace coord transforms
See "dependencies.txt" for help required dependencies
Metadata
Release files for NanoImagingPack 2.1.5
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 |
|---|---|---|---|---|
| nanoimagingpack-2.1.5.tar.gz | 5.1 MB | Without provenance | Details for nanoimagingpack-2.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nanoimagingpack-2.1.5-py3-none-any.whl | Python 3 | none | any | Details for nanoimagingpack-2.1.5-py3-none-any.whl |
Total release size: 10.2 MB
Release files / nanoimagingpack-2.1.5.tar.gz
| Download URL | nanoimagingpack-2.1.5.tar.gz |
|---|---|
| Size | 5.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6857ff5c037418de9703b4b9908c7bfe9770f5b8e47ac51fa5fc63553ee751b7
|
|
BLAKE2b-256 checksum How to use checksums |
28214ff6f22688995e3a7acf5685e370edb202fd267c28ce4cc6f12acbb06e33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / nanoimagingpack-2.1.5-py3-none-any.whl
| Download URL | nanoimagingpack-2.1.5-py3-none-any.whl |
|---|---|
| Size | 5.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f96c19673634ecb7918d674831162e10a10538411a40a1a2bdbbd397708ec7a6
|
|
BLAKE2b-256 checksum How to use checksums |
84add16654c93133989dd156d7a5d5d5b88d52b7912ac8c09973242c7e7f58f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for NanoImagingPack 2.1.5
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.