[Nexus] Release of NeXpy v0.10.10 and nexusformat v0.4.17
rosborn at anl.gov
Tue Jan 30 15:55:44 GMT 2018
I hope I didn’t give the impression that I thought your file was anomalous. It is perfectly acceptable to store the attributes as an array of fixed-length strings, as you did. The only request is that the strings are UTF-8, but fixed-length string arrays are always (I think) returned as an array of byte strings by h5py, whatever their encoding. The problem was not with your file, but with my implementation of a fix. In fact, it has stimulated me to provide a more robust way of handling different but valid storage options, so it’s been very useful.
With best regards,
On Jan 30, 2018, at 9:23 AM, V. Armando Solé <sole at esrf.fr<mailto:sole at esrf.fr>> wrote:
On 30/01/2018 16:14, Osborn, Raymond wrote:
The ‘nxvalue’ property is what is returned when accessing the
attribute dictionary, but the ‘nxdata’ property can be accessed using
the ‘get’ method of the attribute dictionary. In the file recently
posted by Armando Solé:
array([b'xmap_nika00', b'xmap_nika01', b'xmap_nika02', b'xmap_nika03',
Following your indications (Thanks Ray!) we have corrected that at our
side to make sure we respect the NX_CHAR type:
NX_CHAR: any string representation
All strings are to be encoded in UTF-8.
Includes fixed-length strings, variable-length
strings, and string arrays.
Some file writers write strings as a string array of
rank 1 and length 1. Clients should be prepared to handle such strings.
Unfortunately the error is so common that readers quite often need to
NeXus mailing list
NeXus at nexusformat.org<mailto:NeXus at nexusformat.org>
Ray Osborn, Senior Scientist
Materials Science Division
Argonne National Laboratory
Argonne, IL 60439, USA
Phone: +1 (630) 252-9011
Email: ROsborn at anl.gov<mailto:ROsborn at anl.gov>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NeXus