Some useful functions for Data Analysis
Project description
pybhu
pybhu currently exposes a desktop scientific image viewer for 2D and 3D array data. This README is intentionally focused on the public img_viewer interface.
Highlights
- Interactive PyQt6 viewer for 2D and 3D image stacks
- Support for
.npy,.npz, and.pkldatasets - Layer navigation, colormap selection, histogram-based contrast control, colorbar display, and FFT analysis
Repository Structure
.
|-- __init__.py
|-- img_viewer/
| |-- api.py
| |-- viewer.py
| |-- loader.py
| |-- state.py
| |-- histogram_dialog.py
| |-- colorbar_dialog.py
| |-- fft.py
| `-- fft_dialog.py
`-- README.md
Public Interface
img_viewer
The main application in this repository is a PyQt6 + Matplotlib scientific viewer for array-based data. It is designed for quick inspection of 2D images and 3D stacks, with built-in tools for:
- browsing layers in a stack
- switching colormaps and inverting palettes
- adjusting intensity limits from a histogram window
- displaying a separate colorbar window
- computing forward or inverse 2D FFTs with selectable window functions
Requirements
The repository currently ships as source code and does not yet include packaging metadata such as pyproject.toml. Install dependencies manually before use.
The examples below assume the package is available as pybhu, either because the project folder is named pybhu or because you install/package it that way.
Core viewer dependencies:
pip install numpy scipy matplotlib pyqt6
Quick Start
Launch the image viewer from a NumPy array
import numpy as np
from pybhu import img_viewer
data = np.random.rand(256, 256, 16)
viewer = img_viewer(data, colormap_name="viridis", initial_layer=0)
viewer.app.exec()
If you are already inside an environment that owns the Qt event loop, you may not need to call viewer.app.exec().
Open data directly from file
from pybhu import img_viewer
viewer = img_viewer("example_stack.npz")
viewer.app.exec()
Supported viewer file types:
.npy.npz.pkl
For .npz and .pkl, the loader searches recursively for 2D or 3D arrays and lets you choose among multiple datasets when needed.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybhu-0.1.5.tar.gz.
File metadata
- Download URL: pybhu-0.1.5.tar.gz
- Upload date:
- Size: 58.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfff7b6571cc47062f80569c2d855632a126f01e3322288084812d55821ab4ab
|
|
| MD5 |
878c031346a9b87729c165375ec86237
|
|
| BLAKE2b-256 |
dc2b6e7c9bdf7a956410ebd5a66e259a341393e4ffd95c984b7f1daee05dab5a
|
Provenance
The following attestation bundles were made for pybhu-0.1.5.tar.gz:
Publisher:
workflow.yml on Korbinhu/pybhu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pybhu-0.1.5.tar.gz -
Subject digest:
dfff7b6571cc47062f80569c2d855632a126f01e3322288084812d55821ab4ab - Sigstore transparency entry: 1126418693
- Sigstore integration time:
-
Permalink:
Korbinhu/pybhu@5183ec94f368cc18a9e3b0c8e3177e9d471dba33 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/Korbinhu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@5183ec94f368cc18a9e3b0c8e3177e9d471dba33 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pybhu-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pybhu-0.1.5-py3-none-any.whl
- Upload date:
- Size: 67.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bee6679b43c108c85d682867a2a3711ac452b6cdf8732873bd83171fa0bf3320
|
|
| MD5 |
395c90e52b5f024657420a79da45e2ab
|
|
| BLAKE2b-256 |
80a589d3a134350fbc42791b77c034d24e8a515b521293c2a1d620268d98b38b
|
Provenance
The following attestation bundles were made for pybhu-0.1.5-py3-none-any.whl:
Publisher:
workflow.yml on Korbinhu/pybhu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pybhu-0.1.5-py3-none-any.whl -
Subject digest:
bee6679b43c108c85d682867a2a3711ac452b6cdf8732873bd83171fa0bf3320 - Sigstore transparency entry: 1126418932
- Sigstore integration time:
-
Permalink:
Korbinhu/pybhu@5183ec94f368cc18a9e3b0c8e3177e9d471dba33 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/Korbinhu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@5183ec94f368cc18a9e3b0c8e3177e9d471dba33 -
Trigger Event:
push
-
Statement type: