[Nexus] Nexpy

Osborn, Raymond rosborn at anl.gov
Thu Jun 15 13:24:57 BST 2017


Thanks, Armando,
That is exactly the aim of the nexusformat package - to give scientists a convenient and, hopefully, reliable tool for reading and writing NeXus files that just works. Speaking as a scientist, we don’t want to worry about whether they should be using variable-length strings or byte arrays - we just want to have variables we can manipulate in Python and store in our data files when required. We don’t want to worry about whether we have obeyed the standard, but would be delighted if the program sorted that out for us. That is what nexusformat tries to do, and NeXpy adds other conveniences, like showing visually what items are linked in a file tree.

Those who spend a lot of time developing software, on the other hand, are welcome to do their own thing. If you are happy writing your own read/write modules using, e.g., h5py, then that’s fine. But please don’t expect scientists to have to learn h5py, then study all the NeXus rules for writing NXdata groups (not forgetting to add an ’NX_class’ attribute, a signal attribute, axes, …), and then worry about whether they should be using byte arrays or strings.

This is a philosophical issue that I have brought up many times at NIAC meetings. The original goal of NeXus was to be a convenience tool for scientists, but it is now largely maintained by developers who are willing to read manuals. I was a little reluctant about deprecating the NAPI for this reason, but it started to become a barrier to using the more advanced features of HDF5 and few scientists write in C anyway. Python is different - scientists will use it if we give them the right modules - I have a student with little programming experience who writes standard-conforming NeXus files every day. My suggestion that more people use the nexusformat package, rather than just h5py, is that, as this thread shows, it is helpful to have a wide range of people helping to debug it so that it doesn’t trip scientists up when they do use it.

With best regards,
Ray

On Jun 15, 2017, at 3:21 AM, V. Armando Solé <sole at esrf.fr<mailto:sole at esrf.fr>> wrote:

Hello,

On 15/06/2017 09:17, Carlos Pascual wrote:
And, on the other hand, if the NIAC does bless nexusformat as the preferred
access method for python, I think it should be stated unambiguously in the
manual.

Well, at the ESRF Python programmers are using h5py.

However we recommend scientists to use nexusformat as a simpler tool
because they often work with interactive sessions.
As you see our point of view is that nexusformat is just a convenience
tool on top of h5py being the later the standard (Python) tool to access
HDF5 files.

What we do not recommend at all is to use the NeXus library from Python
(or from anywhere else).

The use of NAPI was unambiguously discouraged by the NIAC in past NIAC
meetings in favour of standard tools. However I never understood why
trainings were kept going on around an API that was considered obsolete.

Best,

Armando


--
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/20170615/26691259/attachment.html>


More information about the NeXus mailing list