Command-line tools#
G5print#
Print (one, several, or all) datasets in a HDF5-file.
usage: G5print [-h] [--full] [--no-data] [--regex] [-a] [-d MAX_DEPTH]
[-f FOLD] [-i] [-r ROOT] [-v]
source [dataset ...]
Positional Arguments#
- source
File path
- dataset
Path to datasets to print (default: all)
Named Arguments#
- --full
Print full array
Default: False
- --no-data
Don’t print data
Default: False
- --regex
Evaluate dataset name as a regex
Default: False
- -a, --attrs
Print attributes
Default: False
- -d, --max-depth
Maximum depth to display
- -f, --fold
Fold paths
- -i, --info
Print information: shape, dtype
Default: False
- -r, --root
Start somewhere in the path-tree
Default: “/”
- -v, --version
show program’s version number and exit
G5list#
List datasets (or groups of datasets) in a HDF5-file.
If you have a really big file:
The
--layer
option can be much faster than searching the entire file.Search only
--datasets
when folding can be much faster. Thegetgroups
function does search the entire depth.
usage: G5list [-h] [--min-attrs MIN_ATTRS] [--link-type] [-D] [-d MAX_DEPTH]
[-f FOLD] [-i] [-L LAYER] [-l] [-r ROOT] [--links] [-s SORT]
[-v]
source
Positional Arguments#
- source
Named Arguments#
- --min-attrs
Filter based on min. number of attributes
- --link-type
Print the link-type
Default: False
- -D, --datasets
Print only datasets
Default: False
- -d, --max-depth
Maximum depth to display
- -f, --fold
Fold paths
- -i, --info
Print info: shape, dtype
Default: False
- -L, --layer
Print paths at a specific layer
- -l, --long
–info but with attributes
Default: False
- -r, --root
Start somewhere in the path-tree
Default: “/”
- --links
Show destination of soft links
Default: False
- -s, --sort
Sort by some column
Default: “path”
- -v, --version
show program’s version number and exit
G5compare#
- Compare two HDF5 files.
If the function does not output anything all datasets are present in both files, and all the content of the datasets is equal. Each output line corresponds to a mismatch between the files.
Deal with renamed paths:
G5compare a.h5 b.h5 -r "/a" "/b" -r "/c" "/d"
usage: G5compare [-h] [-t] [--close] [--shallow] [-D] [-d MAX_DEPTH] [-f FOLD]
[-r RENAMED RENAMED] [-R RENAMED_YAML] [-c COLORS]
[--table TABLE] [-I] [-v]
a b
Positional Arguments#
- a
Path to HDF5-file.
- b
Path to HDF5-file.
Named Arguments#
- -t, --dtype
Verify that the type of the datasets match.
Default: False
- --close
Use
np.isclose
also onfloat
-int
matches.Default: False
- --shallow
Only check for the presence of datasets and attributes. Do not check their values.
Default: False
- -D, --datasets
Print only datasets
Default: False
- -d, --max-depth
Maximum depth to display
- -f, --fold
Fold paths
- -r, --renamed
Renamed paths.
- -R, --renamed-yaml
YAML file with renamed paths.
- -c, --colors
Color theme: dark/light/none
Default: “dark”
- --table
Table theme
Default: “SINGLE_BORDER”
- -I, --input
Header identical to input
Default: False
- -v, --version
show program’s version number and exit