[Nexus-developers] NAPI Release

Paul Kienzle paul.kienzle at nist.gov
Sat Oct 25 01:15:58 BST 2008


On Oct 24, 2008, at 12:59 PM, Akeroyd, FA (Freddie) wrote:

> Paul,
>
> Thanks for the additions - I've added them to the svn repository and
> also re-opened #101 in case you have anything further to add.

Freddie,

Thanks for adding it.

I restructured the tree to be a proper python package.

> Ray was showing me your new high-level python interface during a  
> visit a
> few weeks ago. It look really useful and we will be discussing it  
> at the
> upcoming NIAC meeting.

I won't be at the NIAC meeting, but here are some ideas for discussion:

1. It would be wonderful if someone could do setup_tools magic to  
turn this into an egg.  It would be even better if the egg contained  
the necessary HDF and NeXus dlls within the package directory  
(windows, os x and linux).  Add these to the cheese shop and python  
users get up and running with just:

     easy_install nxs

2. Another idea is to explore autogenerating individual nexus  
component classes directly from the DTDs.  For writing you could  
force the data writer to have all the required fields with the  
correct types, sizes and units.  Similarly for reading, you could  
verify that the input file is conforming automatically.

3. There are a number of warts in the high level interface that make  
the interface feel unnatural.  The worst of these is storing NX  
attribute such as 'name' in python attribute 'Aname'.  You can also  
reference it with node.nxattrs['name'], so we might consider removing  
the shortcut.  Accessing group entries by class name, e.g.,  
NXmonochromator is also a bit magical, particularly since ipython tab- 
completion doesn't show them.  Mixing the node properties (e.g.,  
nxclass, nxname, nxentries, nxattrs) makes it hard to see what the  
fields are during tab-completion.  Better ideas are welcome.

- Paul



More information about the NeXus-developers mailing list