[Nexus-developers] NeXus file conversions

Ray Osborn ROsborn at anl.gov
Fri Oct 4 19:24:58 BST 2002


I've added a couple of simple utilities to convert NeXus files to HDF4 or 5.
Once you've written one conversion utility, it really is trivial to write
another.  However, all of them encounter one fundamental problem - that it
is not possible to transfer a link, so every copy of a linked data set gets
written out in full.

There are two problems we haven't addressed:

1) How do we even specify a link in XML?
2) How do we know when we open a data set in the API that it is really a
linked copy?

I would appreciate ideas on the first.  I have a suggestion for the second,
but it would require another amendment of the standard.

The suggestion is: add the absolute path name of a data set in the HDF5/unix
format as an attribute to that data set when we do a NXgetdataID.  When we
open a file for reading, we can read this attribute and see that the
absolute path is different, so we open the original (somehow) and get its
NXlink structure.  An alternative is to store the NXlink structure itself as
the attribute so that we just do an NXmakelink there and then.

Of course, groups can be linked as well, but HDF4 does now support group
attributes.  The only thing is that it will make the output messy - it would
be nice to hide this from the outside user.

Perhaps we can discuss this at NOBUGS.

Ray
-- 
Dr Ray Osborn                Tel: +1 (630) 252-9011
Materials Science Division   Fax: +1 (630) 252-7777
Argonne National Laboratory  E-mail: ROsborn at anl.gov
Argonne, IL 60439-4845





More information about the NeXus-developers mailing list