[Nexus-developers] NX5putslab -- replace HDF5 function call
Pedro Vicente
pedro.vicente at space-research.org
Sun Dec 19 22:51:39 GMT 2010
Hello Freddie, and NeXus developers
In the development of HisTool ( a program we have at SNS to read raw event files and save it as a NeXus file) we implemented a feature that allows to read the DAS event file and simultaneously write some datasets to the NeXus file (that is, without the need to read all the DAS event file to memory).
This is done by creating the NeXus datasets as extendable (we use HDF5).
For one of the datasets being build("event_index") we have to either at end
1) extend the dataset dimension
2) reduce the dataset dimension
Problem is for 2) above NeXus does not provide a function to do that, so we had to do it calling the HDF5 API directly.
We discussed this and thought that it woudld desirable that NeXus would have such a function.
There are 2 ways to implement this in NeXus
1) In the function NX5putslab replace the call to
H5Dextend
With
H5Dset_extent
The second HDF5 function (H5Dset_extent) is like H5Dextend but allows to reduce a dimension as well as increase (H5Dextend only allows increase)
It also happens that H5Dextend is going to be deprecated (for H5Dset_extent )
This URL describes both functions
http://www.hdfgroup.org/HDF5/doc/RM/RM_H5D.html
2) Do a new NeXus function (for example NX5putslabext) that would call H5Dset_extent
Let us know what would be the best way to deal with this.
Regards
Pedro
----------------------
Pedro Vicente
pedro.vicente at space-research.org
http://www.space-research.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nexusformat.org/pipermail/nexus-developers/attachments/20101219/dbdd8c49/attachment.html>
More information about the NeXus-developers
mailing list