[Nexus] Nexpy
Osborn, Raymond
rosborn at anl.gov
Wed Jun 14 18:20:25 BST 2017
I agree. I have created an issue (https://github.com/nexpy/nexusformat/issues/32) and pushed a fix to my own repository, which works on Steve’s file. We already convert size 1 arrays to scalars in NXfields - I’m not sure why I never applied it to attributes.
Once I’ve done a little more testing, I will release a new version of ‘nexusformat’.
Ray
On Jun 14, 2017, at 10:59 AM, Pete Jemian <jemian at anl.gov<mailto:jemian at anl.gov>> wrote:
On 6/14/2017 10:47 AM, Osborn, Raymond wrote:
I can probably fix this by converting all shape (1,) arrays to scalars.
Ray: I recommend you make this accommodation. The structure is valid by the NeXus Schema while it is obviously not written by the NAPI. In my punx code (also in Python), this is done already. Here's the punx (v0.1.8) analysis of 633777.nxs (validating with v3.2 of the NeXus definitions):
validation:
address /entry1/default/ic1monitor at target
validation attribute data type
status NOTE
comment(s) variable length string: ['/entry1/instrument/ic1monitor/ic1monitor']
structure:
default:NXdata
@NX_class = NXdata
...
ic1monitor --> /entry1/instrument/ic1monitor/ic1monitor
...
which points to
ic1monitor:NXpositioner
@NX_class = NXpositioner
ic1monitor:NX_FLOAT64[10001] = [85.095857564276628, 88.283059084044368, 91.494686406350723, '...', 0.1282179930326694]
@local_name = ic1monitor.ic1monitor
@signal = 1
@target = /entry1/instrument/ic1monitor/ic1monitor
--
----------------------------------------------------------
Pete R. Jemian, Ph.D. <jemian at anl.gov<mailto:jemian at anl.gov>>
Beam line Controls and Data Acquisition, Group Leader
Advanced Photon Source, Argonne National Laboratory
Argonne, IL 60439 630 - 252 - 3189
-----------------------------------------------------------
Education is the one thing for which people
are willing to pay yet not receive.
-----------------------------------------------------------
_______________________________________________
NeXus mailing list
NeXus at nexusformat.org<mailto:NeXus at nexusformat.org>
http://lists.nexusformat.org/mailman/listinfo/nexus
--
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...
URL: <http://lists.nexusformat.org/pipermail/nexus/attachments/20170614/cb698c42/attachment.html>
More information about the NeXus
mailing list