Coder Social home page Coder Social logo

diff's Introduction

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: '<type 'str'>' and '<type 'numpy.ndarray'>' (DIFF_DTYPE)**

diff's People

Contributors

keithg-alleninstitute avatar roby1kenobi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.