Skip to content

samueljackson92/xr-tui

Repository files navigation

xr-tui

CI GitHub stars GitHubIssues GitTutorial Ruff linting: pylint PyPI - Status

xr-tui is an interactive terminal user interface (TUI) for exploring and visualizing multi-dimensional datasets. It uses xarray to support loading NetCDF, Zarr and HDF5 tree structures, and provides a user-friendly interface for data exploration directly in the terminal.

Features

  • Interactive navigation through NetCDF, Zarr, and HDF5 datasets.
  • Visualization of 1D and 2D data using plotext for terminal-based plotting.
  • Support for slicing multi-dimensional data.
  • Easy-to-use command-line interface.
  • Displays dataset statistics and metadata.
  • Handles HDF5 files not formatted as xarray datasets.

Domain Specific Formats

xr-tui additionally supports domain specific formats such as the HDF5 NeXus format along with any custom xarray backends that supports datatrees. The list of actively supported xarray backends is as follows:

  • sdf-xarray - Used for loading the Particle-in-Cell code EPOCH's output files.

Installation

You can install xr-tui via pip:

pipx install xr-tui

Or as a uv tool:

uv tool install xr-tui

Usage

To start xr-tui, simply run the following command in your terminal:

xr <filename>

This will launch the TUI, allowing you to explore the contents of filename.

You can also specify a particular group within a file to load:

xr <filename> --group summary

xr-tui also works with remote datasets accessible via HTTP:

xr http://example.com/data.zarr

Key Command Reference

Key Action
q Quit the application.
h Show help menu.
e Expand all nodes in the dataset tree.
space Collapse all nodes in the dataset tree.
Arrow keys Navigate through the dataset.
Enter Select an item or open a variable
s Show statistics of the selected variable.
p Plot the selected variable.

About

A TUI for viewing netcdf, zarr, and hdf files.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages