Motivation#
There are many tools for viewing HDF5 files, including several separate viewers written in Python. An incomplete list includes:
hdfview from the HDF Group, perhaps the default HDF5 viewer. This is a Java-based standalone application, and can be used to edit as well as view HDF5 files. The graphics are very limited at best, and often work poorly, and offer little interactivity.
silx a Python library with a viewing application, also using Python/Qt, and good support.
nexpy a Python library and viewing application, specifically for NeXus data, an important subset of HDF5, also using Python/Qt, with good support and many useful features.
myhdf5 a web-based browser for HDF5 files.
h5web the base code for myhdf5, that also includes an interface from Jupyter Lab.
argos a Python application, using Python/Qt.
hdf5view a Python application, also using Python/Qt.
hdf5-viewer a Python application, also using Python/Qt.
vibehdf5 a Python application, also using Python/Qt.
Several of the Python tools are very good, and may have some features that you may prefer over Sitka Spruce.
The number of viewers shows that the need for such tools is real, and strongly suggests that the officially supported hdfview from the HDF Group is unsuitable for serious data visulization and exploration. The fact that 6 independent projects implement “general HDF5 viewers” with Python/Qt is fascinating. Several of thse feel like exploratory projects, but some (including silx, nexpy) clearly have other important goals and are well supported. And several of these (nexpy, silx, h5web) are also associated with synchrotron data, which makes heavy use of HDF5 and NeXuS. Though we work in that same field, and many of these tools are very good, we hope we will be forgiven for thinking that there is room for one more viewer.
The features and points of emphasis that we think differentiate Sitka Spruce from the existing tools include, in no particular order:
Using wxPython. While this appears to be less popular than Qt, we think it is a good choice for a general-purpose GUI application, and have written and supported many complex wxPython applications over the years. It also avoids many conflicts that are inherent with two separate Qt libraries (PyQt and PySide). wxPython also uses a more permissive license than PyQt. We respect PyQt’s use of the GPL, and do not want to worry about such licensing issues.
Using wxPython will also allow Sitka to be used as a reader for tools in the xraylarch family, including the Larix application for XAS data. This is expected in the near future.
Using wxmplot gives publication-quality line plots and 2D images from matplotlib, and gives very good interactivity and customizability to the end user. In Sitka, Images and Plots are displayed in separate windows. This allows multiple datasets to be viewed at the same time and arranged as the user decides.
Supporting data in plain HDF5 (with h5py) and zarr stores. Sitka does not currently have special support for NeXus files, and treats them as plain HDF5 files – this is open for discussion and may change. The current release supports Zarr using Local File (i.e., Directory) Storage, and also SQLite storage, and other Zarr storage backends could be added if needed.
Having special support for displaying the metadata written to HDF5 files for Epics areaDetector files. At US synchrotron facilities, many such HDF5 files are generated. By improving the ability to view and use metadata from these files, we hope to encourage better use and attention to these metadata capabilities.
Making it very easy to extract data from the complex data files for downstream analysis by exporting either selected data arrays, the full addresses to data components, or saving extracted data to arrays in simpler HDF5 files.
Making a GUI that can be used as a general-purpose, standalone app for all users and also as an interactive application from a Python shell or Jupyter notebook, improving access to data within HDF5 files for exploratory data analysis.
We welcome feedback, comments, suggestions, and collaboration on all of these topics or any other differences with other visualization or data processing tools.