h5diff
file1 file2
[OPTIONS]
[object1 [object2 ] ]
h5diff
is a command line tool that compares
two HDF5 files, file1 and file2, and
reports the differences between them.
Optionally, h5diff
will compare two objects
within these files.
If only one object, object1, is specified,
h5diff
will compare
object1 in file1
with object1 in file2.
In two objects, object1 and object2,
are specified, h5diff
will compare
object1 in file1
with object2 in file2.
These objects must be HDF5 datasets.
object1 and object2 must be expressed as absolute paths from the respective file's root group.
h5diff
has the following four modes of output:
Normal mode: print the number of differences found and where they occurred
Report mode (-r): print the above plus the differences
Verbose mode (-v): print the above plus a list of objects and warnings
Quiet mode (-q): do not print output (h5diff always returns an exit code of
1 when differences are found).
Additional information, with several sample cases, can be found in the document H5diff Examples.
h5diff
and NaNs:
h5diff
detects when a value in a dataset is a NaN
(a "not a number" value), but does not differentiate among various
types of NaNs.
Thus, when one NaN is compared with another NaN, h5diff
treats them as equal; when a NaN is compared with a valid number,
h5diff
treats them as not equal.
Note that NaN detection is computationally expensive and slows
h5diff
performance dramatically.
If you do not have NaNs in your files, or do not care about NaNs,
use the -N
option below to turn off NaN detection.
Similarly, if h5diff -N
produces unexpected differences,
running h5diff
without -N
should reveal
whether any of the differences are associated with NaN values.
-h
-r
-v
-q
-N
h5diff
and NaNs” above.
-n
count
-d
delta
|a–b| > delta
,
where a
is a value in file1 and
b
is a value in file2).
-p
relative
1
and the ratio of two corresponding values
is greater than relative
(e.g., |1–(b/a)| > relative
where a
is a value in file1 and
b
is a value in file2).
h5diff
call compares
the object /a/b
in file1
with the object /a/c
in file2
: h5diff file1 file2 /a/b /a/c
h5diff
call compares
the object /a/b
in file1
with the same object in file2
: h5diff file1 file2 /a/b
h5diff
call compares
all objects in both files: h5diff file1 file2
h5diff
file1 file1 /g1/dset1 /g1/dset2
/g1/dset1
and /g1/dset2
in the same file
Release | Command Line Tool |
1.6.0 | Tool introduced in this release. |