HDFCOMPASS(1)
๐ฆ HDFCOMPASS(1) ๐ฆ
the HDF Compass manual, part 1 of 2 โจ
โจ NAME โจ
hdfcompass - HDF Compass Documentation ๐
Okay bestie, this doc is all about the HDF Compass app ๐ง It's basically the official info dump, and it's giving everything you need to know.
โจ IN BRIEF โจ
So HDF Compass is an experimental viewer program for HDF5 and related formats ๐ It's built to complement the bigger, more complex apps like HDFView, not replace them. The vibe is clean, minimal design ๐ค with maximum extensibility through a plugin system for new formats. Literally so customizable ๐
HDF Compass is written in Python, but it ships as a native application on Windows, OS X, and Linux ๐ฅ๏ธ It gets packaged up with PyInstaller and Py2App so you don't have to set up Python yourself. Lowkey so convenient ๐ธ
โจ CONTENTS โจ
Requirements
TBD ๐ซ Still cooking, bestie.
License
Application License
Copyright Notice and License Terms for HDF Compass - Viewer for HDF5 and other file formats ๐
HDF Compass Copyright 2014-2016 by The HDF Group. ๐
All rights reserved. ๐
Okay so the redistribution rules are very simple to vibe with ๐ฆ Redistribution and use in source and binary forms, with or without modification, are permitted for any purpose (including commercial purposes) provided that these conditions are met:
- Source code redistributions have to keep the above copyright notice, this list of conditions, and the following disclaimer ๐
- Binary redistributions have to reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or materials provided with the distribution ๐ฆ
- On top of that, redistributions of modified forms of the source or binary code must carry prominent notices stating that the original code was changed and the date of the change ๐๏ธ
- All publications or advertising materials that mention features or use of this software are asked, but not required, to acknowledge that it was developed by The HDF Group and credit the contributors ๐
- You can't use the name of The HDF Group, or the name of any Contributor, to endorse or promote products derived from this software without specific prior written permission from The HDF Group or the Contributor, respectively ๐ซ
DISCLAIMER: THIS SOFTWARE IS PROVIDED BY THE HDF GROUP AND THE CONTRIBUTORS "AS IS" WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. In no event shall The HDF Group or the Contributors be liable for any damages suffered by the users arising out of the use of this software, even if advised of the possibility of such damage. ๐
Translation: it comes "AS IS" with zero warranty, and nobody's on the hook for damages from using it, even if they were warned that could happen ๐ซถ
Additional Copyright and License Information
Copyright and license terms for the following software can be found in the adjacent subdirectory Additional_Legal/ ๐ This info was pulled from sources provided by each software package provider at the location listed under "Original source:", and it was current as of 19 December 2014 ๐
HDF Compass uses selected icons from the following icon sets ๐จ
- KDE Oxygen icon set
- Provided by: KDE Community
- Copyright and license information:
additional_legal/KDE_Oxygen_Icon_Set_Copyright_and_License.txt - Original source:
<http://www.gnu.org/copyleft/lesser.html>(via link from<https://techbase.kde.org/Projects/Oxygen/Licensing>) - License type: GNU LGPL version 3 license
- HydroPro icon set
- Provided by: Ben Fleming via MediaDesign
- Copyright and license information:
additional_legal/HydroPro_Icons_Terms.txt - Original source:
<http://www.iconarchive.com/icons/media-design/hydropro/readme.txt> - License type: Freeware
Pre-built HDF Compass binaries include the following software ๐ฆ None of this software is present in whole or in part in the HDF Compass source code, so no drama there โจ
- Python interpreter
- Provided by: Python Software Foundation
- Copyright and license information:
additional_legal/Python_Copyright_and_License.txt - Original source:
<https://docs.python.org/3/license.html> - License type: BSD-style license
- wxPython GUI layer
- Provided by: Julian Smart, Vadim Zeitlin, Stefan Csomor, Robert Roebling, and other members of the wxWidgets team
- Copyright and license information:
additional_legal/wxWidgets_Copyrights_and_Licenses.txt - Original source:
<http://docs.wxwidgets.org/3.0/page_copyright.html> - License type: GNU LGPL version 2 license with exception
- PyInstaller runtime support code (Windows & Linux only)
- Provided by: PyInstaller Development Team
- Copyright and license information:
additional_legal/PyInstaller_Copyrights_and_Licenses.txt - Original source:
<https://github.com/pyinstaller/pyinstaller/blob/develop/COPYING.txt> - License type: GNU GPL version 2 license with exception
- HDF5 for Python (h5py)
- Provided by: Andrew Collette and contributors
- Copyright and license information:
additional_legal/h5py_Copyrights_and_Licenses.txt - Original source:
<http://docs.h5py.org/en/latest/licenses.html> - License type: BSD-style license
- HydrOffice BAG (hyo2.bag)
- Provided by: G.Masetti, B.R.Calder, and contributors
- Copyright and license information:
additional_legal/hydroffice_bag_Copyrights_and_Licenses.txt - Original source:
<https://bitbucket.org/ccomjhc/hyo_bag/raw/tip/COPYING.txt> - License type: BSD-style license
- NumPy
- Provided by: NumPy Developers
- Copyright and license information:
additional_legal/NumPy_Copyright_and_License.txt - Original source:
<http://www.numpy.org/license.html> - License type: BSD-style license
- matplotlib
- Provided by: Matplotlib Development Team
- Copyright and license information:
additional_legal/matplotlib_Copyright_and_License.txt - Original source:
<http://matplotlib.org/users/license.html> - License type: BSD-style license
- PyDAP
- Provided by: Roberto De Almeida
- Copyright and license information:
additional_legal/PyDAP_Copyright_and_License.txt - Original source:
<http://www.pydap.org/license.html> - License type: BSD-style license
- ADIOS
- Provided by: ADIOS Developers (ORNL), and contributors
- Copyright and license information:
additional_legal/ADIOS_Copyrights_and_Licenses.txt - Original source:
<https://www.olcf.ornl.gov/center-projects/adios/> - License type: BSD-style license
ngl this license section is a lot, but every single credit matters ๐ Stay tuned for part 2! ๐ง
Store.__contains__(key)โ (Abstract) okay so this one checks if thekeyis in the store ๐ It gives backTrueif it's there andFalseif it isn't ๐static Store.canhandle(url)โ (Abstract) this is the vibe check for a class. It returnsTrueif the class can make sense ofurl, andFalseotherwise ๐ฅ The GUI uses it to decide which Store implementation to grab when opening a file. For example, the HDF5 plugin usesh5py.is_hdf5(filename)๐ฆStore.__init__(url)โ (Abstract) makes a brand new store instance from the data aturlโจ URLs are written in thescheme://locatorstyle. Like, an HDF5 file might live atfile:///path/to/file.hdf5๐ธStore.close():โ (Abstract) cuts off access to the data store ๐Store.get_parent(key)โ (Abstract) returns the object that containskey, orNoneif there's no such object ๐งStore.urlโ (Abstract) the URL that was used to open the store ๐Store.displaynameโ (Abstract) a short name for the store, likebasename(filepath)๐Store.rootโ (Abstract) aNodeinstance that marks the starting point in the file ๐ For hierarchical formats, that's the root container. For scalar formats (FITS, for example), it could be something like anArrayorImageinstance ๐Store.file_extensionsโ for plugins that support local file access, this is a dictionary mapping file kinds to lists of extensions in "glob" format, e.g.{'HDF5 File': ['.h5', '.hdf5']}๐ It's used to fill the filter in the file-open dialog, among other things โจ
๐ฆ Nodes ๐ฆ
A "node" is any object that lives in the data store ๐ธ The Node class is the base class for the more interesting abstract classes, like containers and arrays. It defines a lot of the interface ๐
class Nodeโ base class for all objects that live in a data store ๐ You generally shouldn't inherit fromNodedirectly. Go for one of the more usefulNodesubclasses in this file instead. DirectNodesubclasses can't do anything interesting in the GUI, they just show up in the browser ๐Node.iconsโ a class attribute holding a dict for icon support ๐ The keys should be integers giving the icon size, and the values should be a callable that returns a byte string with PNG image data. Example:icons = {16: get_png_16, 32: get_png_32}๐ผ๏ธ Icons are a pain to handle, so default icons are provided bycompass_model, and this attribute is optional ๐ซถNode.classkindโ (Abstract) a short string (2 or 3 words) describing what the class represents ๐ It shows up in places like the "Open As" context menu. Examples:"HDF5 Image"or"Swath"โจstatic Node.canhandle(store, key)โ (Abstract) figures out whether this class can usefully represent the object ๐ Keep in mind that keys aren't technically required to be strings ๐งNode.__init__(store, key):โ (Abstract) creates a new instance representing the object thatkeypoints to instore๐งNode.keyโ (Abstract) a unique key that identifies this object in the store ๐ Keys can be any hashable object, though strings are the most common ๐Node.storeโ (Abstract) the data store that the object belongs to ๐Node.displaynameโ (Abstract) a short name for display purposes, around 16 chars or so. Anything longer gets ellipsized ๐Node.descriptionโ (Abstract) a descriptive string, which can be multi-line ๐
๐ท Containers ๐ท
class Container(Node)โ represents an object that holds other objects, like an HDF5 group or a filesystem directory ๐ Implementations get displayed in the browser view ๐Container.__len__()โ (Abstract) gets the number of objects directly attached to the container ๐ขContainer.__getitem__(index)โ (Abstract) retrieves the node atindex. Heads up, this returns aNodeinstance, not a key ๐ซถ
๐ Arrays ๐
class Array(Node)โ represents a multidimensional array, with an interface inspired by Numpy arrays ๐ Implementations get displayed in a spreadsheet-style viewer with controls for subsetting and plotting ๐Array.shapeโ the shape of the array, as a Python tuple ๐Array.dtypeโ a NumPy data type object representing the type of the array ๐งฎArray.__getitem__(indices)โ retrieves data from the array using the standard array-slicing syntax:data = array[idx1, idx2, idx3]โ๏ธindicesare the slicing arguments. Only integer indexes and slice objects (representing ranges) are supported ๐
๐ซง Key-Value lists ๐ซง
class KeyValue(Node)โ represents an object that holds a sequence ofkey: valueattributes ๐ Keys must be strings. Values can be Python or NumPy objects ๐ฅ Implementations get displayed using a list-like control ๐KeyValue.keysโ (Abstract) a list containing all of the (string) keys in the object ๐๏ธKeyValue.__getitem__(name)โ (Abstract) retrieves the value associated with the stringname๐
๐ผ๏ธ Images ๐ผ๏ธ
class Image(Node)โ represents an image ๐จ The current interface only supports true-color RGB images with the origin at upper left. It could easily be extended to more complex formats, including RGBA or palette-based images ๐ Implementations get displayed in an image viewer ๐Image.widthโ image width in pixels ๐Image.heightโ image height in pixels ๐Image.dataโ the image data. Right now it's RGB, pixel-interlaced ๐ธ
๐ง Top-level functions ๐ง
One public function is defined in compass_model:
push(storeclass)โ registers a new Store subclass with HDFCompass ๐ When a URL is being opened, the class gets queried (viastoreclass.canhandle) to see if it can make sense of the URL ๐
๐ How to release [developer] ๐
๐ Versioning ๐
The following files need updating for each new release:
HDFCompass.1file.specHDFCompass.1folder.specsetup.cfgsetup.pyspec.jsondocs/conf.pyhdf_compass/utils/__init__.py
๐ง PyInstaller ๐ง
For the HDFCompass.1file.spec file, you need to verify that the following parameters are passed to the EXE() function:
console=Falseโ this avoids a console window opening at run-time for standard I/O ๐debug=Falseโ this avoids the boot-loader issuing progress messages while it initializes and starts the bundled app ๐คซ
๐ ๏ธ How to freeze [developer] ๐ ๏ธ
TBD
- Index
<> - Module Index
<> - Search Page
<>
โจ Author โจ
The HDF Group
โจ Copyright โจ
2017, The HDF Group
Okay bestie, that's the whole page! ๐ Version 0.7 from Jan 21, 2026 is the one we're talking about here, so you're all caught up ๐ Go forth and freeze, release, and slay responsibly ๐ โจ๐ฆ
๐ฆ where this page comes from
- ubuntu resolute: hdf-compass 0.7~b15-1build1 ยท BSD-HDF-Group
- ubuntu stonking: hdf-compass 0.7~b15-1build1 ยท BSD-HDF-Group
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms