Skip to main content

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 .pkl datasets
  • 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

pybhu-0.1.5.tar.gz (58.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pybhu-0.1.5-py3-none-any.whl (67.1 kB view details)

Uploaded Python 3

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

Hashes for pybhu-0.1.5.tar.gz
Algorithm Hash digest
SHA256 dfff7b6571cc47062f80569c2d855632a126f01e3322288084812d55821ab4ab
MD5 878c031346a9b87729c165375ec86237
BLAKE2b-256 dc2b6e7c9bdf7a956410ebd5a66e259a341393e4ffd95c984b7f1daee05dab5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pybhu-0.1.5.tar.gz:

Publisher: workflow.yml on Korbinhu/pybhu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pybhu-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bee6679b43c108c85d682867a2a3711ac452b6cdf8732873bd83171fa0bf3320
MD5 395c90e52b5f024657420a79da45e2ab
BLAKE2b-256 80a589d3a134350fbc42791b77c034d24e8a515b521293c2a1d620268d98b38b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pybhu-0.1.5-py3-none-any.whl:

Publisher: workflow.yml on Korbinhu/pybhu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page