[Nexus] Python API

Ray Osborn rosborn at anl.gov
Tue Dec 20 15:26:23 GMT 2011


As you may know, a mapping of the NeXus API to python is now a standard part of the NeXus distribution, but there is an additional tree-like interface that provides much more convenient access to NeXus files that used to be in the contributed section. I don't believe it has been part of an official NeXus point release, but it was added to the python bindings section of the NeXus subversion server for over a year. In the last couple of months, we have been extensively rewriting it to give the NXfields all the functionality of Numpy arrays, to allow group items to be accessed through a dictionary interface, and to make the syntax even cleaner. This has, however, meant some changes that are not backwardly compatible with the version on the subversion server.

I am proposing to upload the new version soon. It may not be ready in time for the upcoming v4.3 but there will hopefully be a release shortly after. If you are using the current tree.py in your own work, please could you email me directly to let me know how important backward compatibility will be. I suspect that there will be very few cases where you will be affected by the changes. It mostly affects the internal namespaces of the NeXus groups and fields, which most people shouldn't touch. We have changed the 'SDS' class to 'NXfield', but the old name will still work.

I plan to upload the new version in the first week of January. If you are interested in trying it out before then, please contact me.

Ray
-- 
Ray Osborn
Materials Science Division
Argonne National Laboratory
Argonne, IL 60439, USA
Phone: +1 (630) 252-9011
Email: ROsborn at anl.gov






More information about the NeXus mailing list