Skip to main content

A JupyterLab extension to explore and visualize HDF5 file contents.

Project description

jupyterlab-h5web

Github Actions Status PyPI version Binder

This extension is still in active development. Please report any encountered issue.

Demo

jupyterlab-h5web is a JupyterLab extension to explore and visualize HDF5 file contents, using the web-based viewer h5web. h5web supports the NeXus format.

See Usage for more details.

Requirements

  • JupyterLab 2 (JupyterLab 3 can be used but is not officially supported).

Install

Note: You will need NodeJS to install the extension.

pip install jupyterlab_h5web
jupyter lab build

To enable support for additional filters such as blosc or bitshuffle:

pip install jupyterlab_h5web[full]
jupyter lab build

This will install hdf5plugin in addition to the extension.

Usage

This extension enables opening HDF5 files in a JupyterLab tab and exploring HDF5 files in Jupyter notebooks.

In JupyterLab

You can double-click on an HDF5 file or right-click Open with -> h5web to launch a tab.

This tab is composed of a sidebar, where you can explore the structure of the HDF5 file, and of a main area where the visualization of the selected entity takes place. This visualization is controlled by the upper-right button that can toggle between:

  • Display: visualize datasets using Line, Heatmap or Matrix visualizations.
  • Inspect: show the metadata and attributes of any entity

Note: Opening a file this way will fetch the whole file. This is a limitation for heavy files and should be fixed soon.

In Jupyter notebooks

To open a HDF5 file with H5Web, use the H5Web widget in a notebook cell:

from jupyterlab_h5web import H5Web

H5Web('<path to the HDF5 file>')

An example is provided in example.ipynb.

Note: The limitation of the JupyterLab tab does not apply here: the widget will only fetch HDF5 contents on-demand.

Supported file formats

jupyter-h5web detects HDF5 files based on their file extensions. The viewer works for the following extensions:

  • "Classic" HDF5: .h5, .hdf5
  • NeXus: .nexus, .nx, .nxs
  • CXI: .cxi

For other types of files, you can change the extension to one of the supported extensions or, if it is widespread, open an issue to discuss its support.

Changelog

See https://github.com/silx-kit/jupyterlab-h5web/releases.

Troubleshoot

Check the server extension

If you are seeing the frontend extension but it is not working, check that jupyterlab_hdf is installed and enabled.

It should be listed when running:

jupyter serverextension list

If jupyterlab_hdf does not appear, try to install it manually:

pip install jupyterlab_hdf

and to enable it:

jupyter serverextension enable jupyterlab_hdf

Check the frontend extension

If jupyterlab_hdf is installed and enabled but you are not seeing the frontend, check the frontend is installed:

jupyter labextension list

If it is installed, try:

jupyter lab clean
jupyter lab build

Uninstall

pip uninstall jupyterlab_h5web
jupyter labextension uninstall jupyterlab-h5web

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

jupyterlab_h5web-0.0.7.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

jupyterlab_h5web-0.0.7-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file jupyterlab_h5web-0.0.7.tar.gz.

File metadata

  • Download URL: jupyterlab_h5web-0.0.7.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13

File hashes

Hashes for jupyterlab_h5web-0.0.7.tar.gz
Algorithm Hash digest
SHA256 b6c8b8fb5c70cfd1f3ff3c347873d139bb023d9c6de25973356a65dd2204d13d
MD5 0140df1dbb5bb059ac651ffceb70799c
BLAKE2b-256 896c59f4db7cfc1e392e6ab67e04c45df5da2d38633d75d374e5075aeef4d7fc

See more details on using hashes here.

File details

Details for the file jupyterlab_h5web-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: jupyterlab_h5web-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13

File hashes

Hashes for jupyterlab_h5web-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 00b0bb75a179fc25c02c11ba8f1ebbed209bf0dd2d0a8a41f3fbb825f0bf5fe9
MD5 ddeadb586182a19c4cb32120fdb643a3
BLAKE2b-256 bbc79a3cf1e9c90697724779b2caa62897fde2a2b701fdc9448d26916c97701d

See more details on using hashes here.

Supported by

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