1-
2- === hdf5oct ===
1+ hdf5oct - a HDF5 wrapper for GNU Octave
2+ ==================================== ===
33
44Copyright 2012 Tom Mullins
5-
5+ Copyright 2015 Tom Mullins, Anton Starikov, Thorsten Liebig, Stefan Großhauser
66
77This is a library for GNU Octave for reading hdf5 files. At the moment it
8- provides only one function, modeled after Matlab's h5read, which can read
9- subsets of a dataset. Octave's load function will attempt to read an entire
10- dataset, which for very large datasets is undesired. h5util's h5read function
11- does slightly better, reading only 2d slices of 3d datasets, but that's still
12- fairly limiting. This exposes libhdf5's H5Sselect_hyperslab in a way which
13- tries to be compatible with Matlab.
14-
15- To install, just use "make" or "make all" or "make h5read.oct". Then move
16- h5read.oct somewhere where Octave will find it. You can try running h5test.m if
17- you want to see if it works.
18-
19- If anyone wants to take this code and put it in the Octave Forge, you're
20- welcome to. Especially if you want to add h5write, h5create, etc :). I may
21- write more of those in the future, but if someone else does it first I'd be
22- okay with that.
23-
24- TODO:
25- -write h5write, h5create, h5writeatt, h5readattr, h5disp, and h5info. This may
26- take some fairly major changes to H5File.
27- -maybe use hdf5's c++ interface instead of the c interace.
28- -write more comprehensive tests instead of a few random choices. Also test for
29- error conditions.
30- -test with a chunked dataset with an unlimited dimension (should just work,
31- though I haven't tried it)
32- -modify to follow "Octave conventions" if I ever find info on what those are.
8+ provides the following functions:
9+
10+ h5read: modeled after Matlab's h5read, which can read subsets of a
11+ dataset. Octave's load function will attempt to read an
12+ entire dataset, which for very large datasets is
13+ undesired. h5util's h5read function does slightly better,
14+ reading only 2d slices of 3d datasets, but that's still
15+ fairly limiting. This exposes libhdf5's H5Sselect_hyperslab
16+ in a way which tries to be compatible with Matlab.
17+
18+ h5readatt: Most of this function was written by thliebig. It allows
19+ to read scalar HDF5 attributes of some types.
20+
21+ h5write: Write a matrix to a dataset. This
22+ will either overwrite an already existing dataset, or allow to
23+ append hyperslabs to existing datasets.
24+
25+ h5writeatt: Attach an attribute to an object.
26+
27+ h5create: Create a dataset and specify its extent dimensions,
28+ datatype and chunk size.
29+
30+ Note that only few of the HDF5 datatypes are supported by each of the
31+ functions hdf5oct at the moment, typically one or several of double,
32+ integer and string.
33+
34+ # INSTALLATION #########################
35+
36+ To install, just use
37+
38+ make
39+
40+ This will produce a package file named "hdf5oct-*.tar.gz" . Then
41+ you may either install the package with
42+
43+ make install
44+
45+ or you may start GNU Octave and install the package manually (using
46+ the correct file name) with the command
47+
48+ pkg install hdf5oct-0.2.0.tar.gz
49+
50+ This will put the *.oct files somewhere where Octave will find them.
51+ You can try running
52+
53+ make test
54+
55+
56+ # DEINSTALLATION #########################
57+
58+ To uninstall the package you may want to use
59+
60+ make uninstall
61+
62+ # TODO #################################
63+
64+ - write h5info, h5disp
65+
66+ - support compression flags
67+
68+ - read string typed datasets
69+
70+ - read string-array typed attributes
71+
72+ - maybe use hdf5's c++ interface instead of the c interace.
73+
74+ - write more comprehensive tests instead of a few random choices. Also
75+ test for error conditions.
76+
77+ - make sure Fortran/C ordering is handled in a matlab compatible manner
78+
79+ For integration into octave core:
80+
81+ - make it really clean
82+
83+ - guess chunksize like
84+ https://github.com/h5py/h5py/blob/master/h5py/_hl/filters.py#L257
0 commit comments