comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » HDF5 Table reading / writing for IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
HDF5 Table reading / writing for IDL [message #84325] Tue, 14 May 2013 05:52
markb77 is currently offline  markb77
Messages: 217
Registered: July 2006
Senior Member
Hi,

I have written a library of IDL functions for reading, writing, and
modifying HDF5 tables. I essentially ported the source code from HDF5
itself, making use of the low level H5* functions which are already
implemented in IDL. The new library mimics the functionality of most
of the existing HDF5 Table API (H5TB).

The library is called wmb_lib, and it is available at GitHub, here:

www.github.com/superchromix

The main hdf5 table reading/writing functions in the library are:

Table creation:
wmb_h5tb_make_table.pro

Storage:
wmb_h5tb_append_records.pro
wmb_h5tb_write_records.pro
wmb_h5tb_write_fields_index.pro
wmb_h5tb_write_fields_name.pro

Retrieval:
wmb_h5tb_read_table.pro
wmb_h5tb_read_records.pro
wmb_h5tb_read_fields_index.pro
wmb_h5tb_read_fields_name.pro

Query:
wmb_h5tb_get_table_info.pro
wmb_h5tb_get_field_info.pro

Modification:
wmb_h5tb_insert_records.pro
wmb_h5tb_add_records_from.pro
wmb_h5tb_combine_tables.pro

Documentation and examples of how to use these functions can be found
in:
wmb_h5tb_examples.pro

Also, the HDF5 table functions are documented online here:
http://www.hdfgroup.org/HDF5/Tutor/h5table.html
http://www.hdfgroup.org/HDF5/doc/HL/RM_H5TB.html

Since the HDF5 Table API is based on HDF5 version 1.8, I was surprised
that it was possible to create this library at all using IDL's HDF5
interface functions (based on HDF5 version 1.6). There are some
limitations, however.

Limitations:
(as compared with the HDF5 Tables API in HDF5 version 1.8.10)

1. This library does not support fill values - if you want the table
automatically filled with something other than zeros you have to write
the fill data explicitly.

2. The library does not have a way to write to only one column of a
multi-column table. The wmb_h5tb_write_fields_* functions mimic this
functionality, but they do so by loading the full sized records from
the table, modifying the data in memory, and writing the full records
back to the table.

3. The size of a table cannot be reduced - i.e. records cannot be
deleted from a table.

4. Once a table is created, fields (columns) cannot be added or
removed.

At present it is not possible to view HDF5 Tables in the IDL HDF5 data
browser (H5_BROWSER). For viewing / editing tables therefore you can
use the free HDFView tool available here:
http://www.hdfgroup.org/hdf-java-html/hdfview/

I hope that this is useful and I would welcome comments, improvements,
bugfixes etc!

cheers,
Mark Bates
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: spawn not working
Next Topic: Re: HDF5 Table reading / writing for IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:32:25 PDT 2025

Total time taken to generate the page: 0.00388 seconds