[Nexus] Release of NeXpy v0.10.10 and nexusformat v0.4.17

V. Armando Solé sole at esrf.fr
Tue Jan 30 15:23:23 GMT 2018


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é:
>
> >>> xanes['202.1/plotselect'].attrs.get('auxiliary_signals').nxdata
> array([b'xmap_nika00', b'xmap_nika01', b'xmap_nika02', b'xmap_nika03',
>        b'xmap_nika04', b'xmap_nika07'], 
>       dtype='|S11')
>
> >>> xanes['202.1/plotselect'].attrs['auxiliary_signals']
> ['xmap_nika00',
>  'xmap_nika01',
>  'xmap_nika02',
>  'xmap_nika03',
>  'xmap_nika04',
>  'xmap_nika07']
>

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
handle both.

Armando



More information about the NeXus mailing list