Skip to main content

TUI application for navigating and viewing HDF5 files

Project description

Description

h5tui is a terminal user interface (TUI) application that facilitates the viewing of the contents of HDF5 files. Its design is inspired by vim-motion enabled terminal file managers, such as ranger, lf and yazi. This choice is quite natural since the HDF5 file format also adopts a directory structure for storing the data.

Demo

https://github.com/user-attachments/assets/11085d02-2857-4d9f-aac1-b403630b8ead

Installation

The package is hosted and PyPI and can be installed using pip:

pip install h5tui

Usage

Simply launch the application with an HDF5 file as an argument:

h5tui file.h5

File Navigation

h5tui starts at the root of the file and displays the contents of the directory. The file can be navigated using the arrow or standard vim motion keys, with the up/down (j/k) moving the cursor inside the list, and left/right (h/l) for going to the parent or child HDF5 group. If the selected element is not an HDF5 group but an HDF5 dataset, then the contents of the dataset are displayed. If the data does not fit on one screen, it can be scrolled using the up/down j/k keybindings.

Plotting

h5tui provides simple plotting facilities straight in the terminal using the Plotext library. 1D arrays are displayed as scatter plots, and 2d arrays are shown as heatmaps. Higher dimensional tensors are not currently supported. The plotting can be toggled through the p keybinding while viewing a dataset.

Aggregation

h5tui also has the functionality for performing limited data aggregation for summarizing the data. This can be activated through the a keybinding while viewing a dataset. Currently, this option will compute the min, max, and mean of the dataset but further statistics may be added in the future.

Dataset Format Options

The formatting of the dataset may be controlled using a couple of keybindings. Since HDF5 files can often contain large datasets, by default, if the number of elements exceeds 1000, the output will be truncated. This behavior can be toggled using the t keybinding. Note that, as of yet, this operation is blocking, and therefore huge datasets might take some time to load In addition, the s key toggles the scientific notation on and off.

Formatting keybindings:

  • t: toggle output truncation
  • s: toggle scientific notation

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

h5tui-0.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

h5tui-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file h5tui-0.1.0.tar.gz.

File metadata

  • Download URL: h5tui-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for h5tui-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fbff34637e188cbbeca77aebe383c6ad26298a67da6950f1504c26b267a4a89e
MD5 d81ce308c5975ad103d62d8082ca7c3e
BLAKE2b-256 aecc8e12cc62f7472c8e89bf6e24e8d381f183a092586cc6c47acca03c32d3c3

See more details on using hashes here.

File details

Details for the file h5tui-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: h5tui-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for h5tui-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a9f6cf67f361a104de016866813826481f0aef2557fcdae2266cc49b11d5f33
MD5 69424124e05f76b969909263257f474d
BLAKE2b-256 6162c1940be2260757fb302f2ce63f4d84e457ea59704c5cf38dd0df7e88a85e

See more details on using hashes here.

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