[NeXus-tech] Nexus C++ API by DESY

freddie.akeroyd at stfc.ac.uk freddie.akeroyd at stfc.ac.uk
Wed Feb 22 18:16:06 GMT 2012


Hi Eugen,

it fails on the first attribute "HDF5_version" - looking at this with h5dump and comparing to a standard nexus string give the following differences:

CSET unknown_cset          (nexus normally uses H5T_CSET_ASCII - I would have expected to see H5T_CSET_UTF8 for your file though)
STRSIZE H5T_VARIABLE       (nexus usually shows a non-negative integer here as it uses fixed size strings)

The error occurs when the attribute is read using  H5Aread    this function should be able to perform a conversion, but as the h5dump utility does not recognise the string's character set I wonder if this is the real problem? Could you try and write a file with ASCII rather than UTF8 variable length strings - that would indicate if the problem was character set or variable length 

Regards,

Freddie    

> -----Original Message-----
> From: nexus-tech-bounces at nexusformat.org [mailto:nexus-tech-
> bounces at nexusformat.org] On Behalf Of Eugen Wintersberger
> Sent: 22 February 2012 09:30
> To: nexus-tech at nexusformat.org
> Subject: [NeXus-tech] Nexus C++ API by DESY
> 
> Hi folks
>   as you know I am developing a C++ API for Nexus within the HDRI
> project. Attached to this file you find a first Nexus file written by
> the API. As far as I see all attributes are set correctly. However,
> nxconvert or nxdir give the following error
> 
> ERROR: HDF could not read attribute data
> 
> I assume that this is due to the fact that I use variable length UTF8
> strings to store string data. This gives me the possibility to write
> fields of strings where the strings have variable length.
> Can someone please have a look on the file to confirm my assumption or
> maybe finds another reason why nxconvert or nxdir do not work as
> expected?
> 
> best regards
>    Eugen Wintersberger



More information about the NeXus-tech mailing list