https://github.com/neurodatawithoutborders/diff
Python script that compares two HDF5 files.
https://github.com/neurodatawithoutborders/diff
Last synced: about 2 months ago
JSON representation
Python script that compares two HDF5 files.
- Host: GitHub
- URL: https://github.com/neurodatawithoutborders/diff
- Owner: NeurodataWithoutBorders
- Created: 2015-07-14T23:59:05.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-02-27T01:29:57.000Z (about 7 years ago)
- Last Synced: 2025-08-18T19:36:05.144Z (8 months ago)
- Language: Python
- Size: 137 KB
- Stars: 12
- Watchers: 27
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# diff
Python script that compares two HDF5 files.
Usage:
python ndiff.py
or:
./ndiff.py
The script opens two HDF5 files and recursively compares the datasets
and groups in the files. It examines groups, datasets and attributes
and reports if some of these exist in one file and not the other, and
if their names or types differ between the two files.
NOTE: it does not compare the values stored in datasets or attributes
When a difference is found, it will report one of the following codes:
DIFF_UNIQUE_A -- a dataset or group only exists in file A
DIFF_UNIQUE_B -- a dataset or group only exists in file B
DIFF_OBJECTS -- an object is a dataset in one file and a group in the other
DIFF_DTYPE -- the type of an object is different between files
DIFF_UNIQ_ATTR_A -- an attribute is only present in file A
DIFF_UNIQ_ATTR_B -- an attribute is only present in file B
DIFF_ATTR_DTYPE -- the type of an attribute differs between files
Example (command-line linux):
keith:~$ ./ndiff.py foo.h5 bar.h5
Comparing 'foo.h5' and 'bar.h5'
------------------------------
Examining /
bar5
bar3
** Attribute 'a' only in 'bar.h5' (DIFF_UNIQ_ATTR_B)**
bar2
bar
bar4
** Different element types: 'group' and 'dataset' (DIFF_OBJECTS)
------------------------------
Examining /bar5/
** Element 'bar7' only in 'foo.h5' (DIFF_UNIQUE_A)**
** Element 'bar8' only in 'bar.h5' (DIFF_UNIQUE_B)**
bar6
** Different dtypes: '' and '' (DIFF_DTYPE)**