HDF5 Browser¶
The HDF5 Browser is a custom Igor Pro tool for exploring, browsing, and transferring data between HDF5 files and Igor Pro experiments. It provides a Data Browser-style two-pane interface where each pane independently displays either an HDF5 file or the current Igor experiment’s data folder hierarchy.
Key features:
Two independent panes: simultaneously browse two HDF5 files, or one HDF5 file and the Igor experiment
Collapsible tree navigation: expand/collapse groups to navigate hierarchies
Value preview widget: inline display of scalar values, text strings, and previews of 1D/2D arrays
Attribute display: view metadata (HDF5 attributes, Igor wave notes, folder attributes)
Copy operations: transfer datasets/groups between panes and into/out of Igor Pro
Drag-and-drop: intuitively move or copy items using mouse drag
Right-click context menu: quick access to copy, inspect, plot, and folder management functions
Attribute preservation: round-trip HDF5 attributes through Igor experiment exports/imports via wave notes and sidecar waves
File types and data sources¶
Supported HDF5 file formats¶
The browser accepts standard HDF5 files and Igor experiment files (which can embed HDF5):
.h5 — Standard HDF5 file format
.h5xp — Igor Pro experiment file containing HDF5 data (read/write)
.pxp — Igor Pro experiment file (readable as HDF5 via Igor’s native HDF5 interface)
Igor experiment as data source¶
Each pane can also browse the current Igor experiment directly by clicking the “Igor” button. This displays:
Folders — mapped from Igor data folders
Waves — individual Igor waves (numeric or text)
Variables — scalar numeric values
Strings — text variables
Attributes — wave notes and folder sidecar attributes (see Attribute preservation below)
Data type mappings¶
HDF5 to Igor¶
When copying data from HDF5 to Igor:
HDF5 Element |
Igor Equivalent |
Notes |
|---|---|---|
Group ( |
Data Folder |
Recursive: all subgroups and datasets copied |
Dataset (scalar, rank 0) |
1D Wave [1 pt] |
Numeric or text depending on HDF5 type |
Dataset (1D array) |
1D Wave |
Length matches HDF5 dimension |
Dataset (2D array) |
2D Wave |
Dimensions match HDF5 shape |
Dataset (≥3D array) |
Not copied (bulk) |
Can view preview only |
Attribute (on dataset) |
Wave note |
Encoded as |
Attribute (on group) |
Sidecar wave |
Stored as |
Enumeration type |
Numeric Wave |
Integer values; enum labels stored as note |
Variable-length string |
Text Wave |
(if |
Igor to HDF5¶
When copying data from Igor to HDF5:
Igor Element |
HDF5 Equivalent |
Notes |
|---|---|---|
Data Folder |
Group |
Recursive: sub-folders and waves copied |
1D Wave |
Dataset (1D) |
Data type matches Igor wave type |
2D Wave |
Dataset (2D) |
Dimensions preserved |
Numeric Variable |
Dataset (scalar) |
Float64 in HDF5 |
String Variable |
Dataset (scalar) |
Fixed-length text in HDF5 |
Wave note |
Attributes |
Parsed as |
Folder sidecar |
Group attributes |
Contents of |
Copy operations¶
You can transfer data in all four directions:
HDF5 → HDF5 (between two open HDF5 files)
HDF5 → Igor (from an HDF5 file into the current Igor experiment)
Igor → HDF5 (from Igor into an open HDF5 file)
Igor → Igor (within the current Igor experiment)
Initiating a copy¶
Method 1: Right-click context menu
Right-click any node in the tree.
Select “Copy to other pane” or “Copy to Igor” (HDF5 nodes only).
Method 2: Drag-and-drop
Click and hold on a node.
Move the mouse ≥4 pixels (threshold to distinguish drag from click).
A ghost TitleBox follows the cursor showing source and destination.
Release over a target group/folder in the other pane (or same pane).
Copy semantics¶
Name collisions — existing items at the destination are silently overwritten. There is no undo.
Recursive copy — copying a group or folder copies all child groups, subgroups, and datasets recursively, preserving the full subtree structure.
Same-pane drag-and-drop — this is a MOVE: the source is copied to the destination, then deleted. Moving into a descendant of the source is prevented.
Cross-pane drag-and-drop — this is a COPY: the source remains unchanged.
Read-only panes — copy and modify operations are disabled for read-only files.
Attribute preservation¶
HDF5 attributes → Igor¶
When copying from HDF5 to Igor:
Dataset attributes are encoded into the wave note of the destination Igor wave as
key=value;pairs. Example:Q_resolution=0.001; units=1/Angstrom; sample_name=SiO2 powder;Group attributes are stored in a sidecar wave named
Igor___folder_attributesinside the destination folder. This matches the CanSAS/HDF5gateway convention.Multi-value attributes (arrays) are encoded as comma-separated lists in brackets. Example:
wavelengths=[0.7, 1.5, 2.3];
Igor → HDF5 attributes¶
When copying from Igor to HDF5:
Wave notes are parsed and converted back into HDF5 attributes on the dataset. Free-form text (no
key=structure) is stored as a singleIgorWaveNoteattribute.Folder attributes (from
Igor___folder_attributes) are converted to HDF5 group attributes.Text values are preserved as HDF5 string attributes.
Numeric values are preserved with their original precision.
Drag-and-drop mechanics¶
A drag is recognized only when the mouse moves ≥4 pixels from the initial click position. While dragging:
A ghost TitleBox follows the cursor showing the source node and target.
The target tree has a focus ring to indicate the drop destination.
You can drop onto any group (HDF5) or folder (Igor), including the root group
(/). You cannot drop into your own descendant or into a read-only pane.
After a successful drop: - Both trees refresh to show the updated structure. - If the operation was a MOVE (same pane), the source item is removed. - If it was a COPY (cross-pane), the source remains.
Supported data types¶
Numeric types¶
int8, int16, int32, int64 — signed integers
uint8, uint16, uint32, uint64 — unsigned integers (stored as signed in Igor; values >2:sup:`31`−1 overflow)
float32, float64 — single and double precision floats
Complex64, Complex128 — stored as 2-column waves in Igor
Text types¶
Fixed-length strings — stored as text waves
ASCII and UTF-8 — both supported
Unsupported or limited types¶
Compound types — not supported; use raw HDF5 access
Variable-length strings — limited support
Opaque types — not supported
≥3D arrays — metadata viewable but no bulk load or preview
References (HDF5 region/object) — not dereferenced automatically
Limitations and troubleshooting¶
File access issues¶
“file opened READ-ONLY” — the file is on a read-only volume or lacks write permissions. Read and copy operations still work; write operations are disabled. To fix: copy the file to a writable location or change permissions.
“could not open file” or FileID = −1 — the file is locked by another process (HDF5View, Python, another Igor instance). Close the file elsewhere and try again.
Stale FileID errors after restart — if Igor crashes with an HDF5 file open,
stale references may appear on the next launch. Kill and reopen the browser
panel; IR3HB_InitPackage() resets all file IDs to −1.
Data type conversion issues¶
Unsigned integer overflow — Igor Pro waves use signed integers only. Unsigned values >2:sup:`31`−1 will overflow in signed representation. For high-bit- depth unsigned data, use Python or raw HDF5 tools.
Text vs. numeric ambiguity — datasets containing only numbers but stored as
strings (e.g., "123") are imported as text waves to preserve fidelity.
Large arrays¶
Igor allocates the entire array in RAM. If an HDF5 dataset exceeds available memory, loading will fail. Solutions: increase system RAM, load a data slab via Python, or use an external HDF5 viewer.
Previews are limited to 50 rows (and 10 columns for 2D). To inspect the full data, copy the wave to Igor and use the Data Browser, or use an external tool.
Attribute round-tripping¶
Wave notes (containing encoded attributes) travel with an Igor wave when it is copied. However, if the destination wave already exists and is overwritten, the old note is lost.
The sidecar wave Igor___folder_attributes uses a special naming convention
to avoid collisions. Avoid naming your Igor folder items starting with
Igor___.
Example workflows¶
Workflow 1: Import calibration data from a beamline HDF5 file¶
Open the browser: Macros → HDF5 Browser (or call
IR3HB_HDF5Browser()).Click “Open Left File…” and select the HDF5 file.
Expand the tree to find the calibration dataset.
Right-click and select “Copy to Igor Experiment”.
The wave appears in your Igor root data folder. Inspect the preview and attributes; rename or move as needed.
Workflow 2: Compare two datasets from different HDF5 files¶
Open the browser.
Click “Open Left File…” and select the first HDF5 file.
Click “Open Right…” and select the second HDF5 file.
Navigate to the datasets in each pane and click to preview them side by side.
Inspect Type/Shape/DType and attributes. Drag cross-pane to copy if needed.
Workflow 3: Reorganize an HDF5 file structure¶
Open the browser and open an HDF5 file with write access.
Right-click a parent group and select “Create Group” to add new groups.
Drag datasets to their new locations within the same pane (same-pane = MOVE).
Right-click and select “Delete” to remove misplaced items.
Changes are written to disk automatically.
Workflow 4: Export an Igor experiment folder to HDF5¶
Open the browser. Open a target HDF5 file on the right; click “Igor” on the left.
In the left pane, find the Igor folder to export.
Right-click and select “Copy to Other Pane”.
Select the destination group in the right pane.
The entire folder with all waves, sub-folders, and attributes is recursively copied into the HDF5 file.
Technical details¶
Browser state storage¶
All browser state is stored under:
root:Packages:Irena:HDF5Browser:Left/Right:
FilePath, FileName (SVAR: file path and name)
FileID (NVAR: HDF5 file ID, -1 if closed)
IsReadOnly (NVAR: 1 if read-only, 0 if read-write)
SourceType (SVAR: "HDF5" or "Igor" or "" if closed)
SelectedFullTreeIdx (NVAR: index into FullTreeText of selected node)
SelectedPath (SVAR: full HDF5 or Igor path of selected node)
SelectedKind (SVAR: "G" for group/folder, "D" for dataset/wave)
SelectedDType (SVAR: HDF5 datatype class or Igor wave type)
SelectedShape (SVAR: shape string, e.g., "50 x 10" or "scalar")
FullTreeText (text wave, 3 cols: path, name, kind)
FullTreeMeta (numeric wave, 3 cols: depth, parentRow, hasChildren)
ExpandedState (numeric 0/1 wave: expanded or collapsed per node)
VisibleRows (numeric wave: indices into FullTree of visible rows)
TreeListWave (text wave, 2 cols: marker + node name)
TreeSelWave (numeric wave: ListBox selection bitmap)
ScalarValueStr (SVAR: display string for scalar value preview)
PreviewListWave (text wave: preview rows for 1D/2D array display)
AttrListWave (text wave, 2 cols: attr name, attr value)
Tree data structure¶
FullTreeText: one row per node; columns: full path, short name, kind (
"G"or"D")FullTreeMeta: parallel numeric wave; columns: depth, parentRow index, hasChildren flag
ExpandedState: 0/1 parallel to FullTree (0 = collapsed, 1 = expanded)
VisibleRows: indices into FullTree for currently visible rows (rebuilt on expand/collapse)
TreeListWave: text fed to the ListBox (
+/-marker + indented name)
Getting help and reporting bugs¶
In Igor: click the red “Get Help” button in the browser window.
Documentation: this page serves as the primary reference.
Bug reports or feature requests: contact the Irena development team or file an issue on the project repository.
Version history¶
- v1.04 (2026-05-13)
Drag-and-drop between tree panes and within the same pane. Cross-pane drag = COPY; same-pane drag = MOVE. Movement threshold 4 px. Drop into own descendant is prevented. Ghost TitleBox visual feedback.
- v1.03 (2026-05-12)
HDF5 attribute preservation across all copy directions. Dataset attributes encoded as wave notes (
key=value;format). Group attributes stored as sidecar waveIgor___folder_attributes(CanSAS-compatible). Multi-value attributes as[v1,v2,v3]in notes.- v1.02 (2026-05-12)
Copy buttons and right-click context menu. All four copy directions; recursive group/folder copy; silent overwrite. Context menu: copy, create group, delete, show metadata, plot 1D.
- v1.01 (2026-05-12)
Igor experiment as a data source (per-pane toggle). Walks Igor data folders, waves, variables, and strings.
- v1.00 (2026-05-12)
Initial release: two-pane HDF5 browser with collapsible tree navigation. Value preview widget; attribute listing.
See also¶
Igor Pro HDF5 documentation: https://docs.wavemetrics.com/igorpro/HDF5/
HDF5 standard: https://www.hdfgroup.org/
CanSAS HDF5 gateway (attribute conventions): https://www.sas.org/fileadmin/user_upload/cansashdf5/cansashdf5.html