Oh btw., you could also add the units attribute to the data *type* instead
of the data *set*.

That has the advantage that automatically all datasets of the same data type
share the same units and you don't need to add the same attribute for each
data set. For doing so, you need to create a named data type that is stored
in the file.

cheers,
        Werner


On Fri, 02 Apr 2010 09:20:22 -0400, Dr. X <[email protected]> wrote:

Hi Dan, Mark, Werner,
Thank you all for your help. I in the end implemented what Dan suggested
by using Attribute to store units. It is the cleanest way, I think.
In a long run, Unicode integration would be great though it is a minor
issue.

Best,
x

On 4/1/2010 6:00 PM, Daniel Kahn wrote:
Dr. X wrote:

Hi All,
I am trying
              hid_t dataset_id = H5Dcreate(group_frame_id, "mass
(GeV/(c^2))", std_type_id, space_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT);
And the returned dataset_id = -1. If I changed the string to "mass
(GeV_(c^2))", I got a valid dataset_id.
Is "/" a special/reserved character in HDF5? Is there such a reserved
character list for HDF5?

Hi Xunlei,

If your goal is to indicate the units of mass used then a more common
approach is to specify those as a bit of metadata, for example as an
HDF5 attribute called "Units" which a value of "GeV/(c^2)".

Cheers,
--dan




_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org




--
___________________________________________________________________________
Dr. Werner Benger                Visualization Research
Laboratory for Creative Arts and Technology (LCAT)
Center for Computation & Technology at Louisiana State University (CCT/LSU)
211 Johnston Hall, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809                        Fax.: +1 225 578-5362

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to