h5tui

A terminal user interface (TUI) application for navigating and viewing HDF5 files.

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

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.

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