pyhdfview (0.9.0.post1.dev28+ge0a48f3)

Published 2023-06-01 07:53:31 +00:00 by calipp

Installation

pip install --index-url  pyhdfview

About this package

An HDF5 viewer in python

========= PyHDFView

.. image:: src/pyhdfview/icons/splash.png :width: 500px :align: center

PyHDFView is a viewer for hierarchical data.

It is written in Python and based on Qt (PySide/PyQt). It can display various filetypes that can in some way be represented as hierarchical data (most importantly HDF5). Readily available file formats are hdf5, csv, images, json, matlab, numpy (npz, npy). Due to a simple plugin system for file types this list can easily be extended.

Features

  • Only load parts of datasets into memory (loads more as you scroll) (if allowed by used filetype plugin)
  • Plots using PyQtGraph_ or matplotlib_.
  • Plot 1d and 2d data
  • Plot selection of data
  • Plot any slice in 3D data
  • Plot xy with arbitrary datasets for x and y (if length matches)
  • Plot windows can be docked to main window
  • Plots can be saved
  • Rolling mean on PyQtGraph Plots
  • File formats as plugins, can easily be extended (Included plugins for hdf5, csv, images, json, matlab, numpy (npz, npy))
  • Endless possibilities with plugins
  • Embedded python console
  • Open multiple files (configurable)
  • Open files in tabs (configurable)
  • Show attributes (if filetype plugin implements them) including dataset shape and storage size
  • Search in attributes
  • Fast startup
  • Possibility of single instance with multiple windows (almost instant startup)
  • Copy or Export Selection as tab separated values
  • Jump to rows or columns directly without manual scrolling
  • Squeezes single entry dimensions for best handling

.. _PyQtGraph: https://www.pyqtgraph.org .. _matplotlib: https://matplotlib.org

Installation

Installation without optional packages::

python3 -m pip install .

Installation with optional packages (in this case 'ipyconsole') with pip::

python3 -m pip install ".[ipyconsole]"

This will add the entry script to "~/.local/bin". In order to run PyHDFView you need to add this path to the PATH variable. This can be done e.g. by adding

export PATH=$PATH:$HOME/.local/bin

to your .bashrc (for bash) or .zshrc (for zsh) or the respective configuration file of your shell.

Note on virtual environments and PEP 668

When installing consider the use case and filetypes you want to use. If external packages will be used in the console or a plugin (either filetype or normal) these packages need to be available. This means they need to be reachable from the virtual environment of PyHDFView if you decide to install in one.

If PEP 668 is enabled on your system there are multiple options. The recommendation is to use a virtualenv or pipx. The downside of this might be that external packages are not reachable. But since with PEP 668 'global' packages are disabled anyway this is happens in any case.

Please note that depending on your installation routine, the entry script might be located inside the virtual environment and the respective path has to be added to the PATH variable in order to use pyhdfview without having the virtual environment activated.

It would also be possible to use '--break-system-packages'. However this only 'helps' if other packages are installed in this way as well.

Note: One benefit of this method (using '--break-system-packages') would be to reuse the system Qt version which might result in better integration in the desktop environment.

Windows

On Windows it is possible to add desktop and start menu links by running pyhdfview once and in settings->core clicking on the corresponding buttons. There it is also possibility to create a .bat file that can be used as "open with" program (creates on desktop, can be moved)

Quickstart

After installation::

pyhdfview [path to file]

Run without installation::

python src/run.py

Screenshots

.. image:: docs/screenshots/base.png :width: 500px

.. image:: docs/screenshots/base_light.png :width: 500px

.. image:: docs/screenshots/lineplot.png :width: 500px

.. image:: docs/screenshots/2dplot.png :width: 500px

Note on Version Numbers

The version numbers for PyHDFView look like semantic versioning (Major.Minor.Patch). However, as a desktop application which is not used in dependency management and that does not really have an API, strict semantic versioning is neither necessary nor possible.

Therefore the versioning uses a "significance" scheme:

  • Patch numbers increase for bug fixes and minor enhancements.
  • Minor numbers increase for new features and larger enhancements. Multiple features and changes might be combined in a minor release.
  • Major numbers are used to label a version with a significant number of features and enhancements.. This means features are "collected" in minor versions of the previous major version. At some point when the previous major version is stable and contains a significant number of features and enhancements a new major version is created. Version Ma.0.0 might be the same as (Ma-1).Mi.Pa and just serve as a label. It does not make sense for PyHDFView to hold off on features until the next major version and features are released early. This is basically a rolling release model.

Requirements

Requires Python: >3.5
Details
PyPI
2023-06-01 07:53:31 +00:00
2
mit
18 MiB
Assets (1)
Versions (4) View all