[Nexus] Switching to a debate about NeXus + Python

Ray Osborn rosborn at anl.gov
Wed Mar 10 15:23:01 GMT 2010


Pete,
The Python API is just a wrapper of the standard C NAPI so it supports  
whatever the regular API supports, i.e, HDF4, HDF5, and XML. All the  
regular API calls, to NXopengroup, NXgetinfo, etc, are mapped to  
return the data directly into Numpy arrays. Paul then added a higher  
layer that reads the whole NeXus file into a python tree structure  
(without actually reading in the data until it's needed). The work at  
Argonne has been to simplify the syntax, and hopefully make it more  
intuitive, so that it is easy to create and manipulate the structures  
within the tree interactively without knowing too much about NeXus  
(e.g., concealing how the signal and axes are identified in NXdata  
groups).

Ray

On Mar 10, 2010, at 8:21 AM, Pete R. Jemian wrote:

> Ray:
>
> Does your project also support HDF4?
> I believe Darren's phynx only supports HDF5.
>
> Pete
>
>
>
> On 3/10/2010 7:52 AM, Darren Dale wrote:
>>
>> On Mar 10, 2010, at 2:48 AM, Wellenreuther, Gerd wrote:
>>
>>> Hi Ray,
>>>
>>> I would like to talk about that module Paul Kienzle produced in  
>>> more detail. The reason for that: A lot of scientists consider  
>>> Python as a very good environment for scripting/programming  
>>> purposes, and having a top-level python module supporting NeXus  
>>> would be a very good thing.
>>>
>>> Recently, I have tried phynx written by Darren Dale, which is  
>>> already providing support for NeXus. I know of h5py and pytables,  
>>> which are capable of writing HDF5-files directly, but I would like  
>>> to use a module which does most of the tiring and repetitive  
>>> setting of the NeXus-internals like NXclass, signals, axes etc.  
>>> itself.
>>
>> Phynx is currently a step in that direction, but it may be the case  
>> that Ray's project is further along since it is built upon the  
>> official nexus API.
>>
>>> I personally would also like to split the task of defining where  
>>> which data during acquisition time has to go in the NeXus-file,  
>>> from the task of actually writing the file. E.g. I built another  
>>> module on top of phynx (which is itself on top of h5py, Darren,  
>>> please correct me).
>>
>> Right, phynx is built on h5py because it has an intuitive  
>> interface, is thread-safe, and provides a near-complete wrapping of  
>> the hdf5 library.
>>
>> Darren
>>
>> ---
>> Darren S. Dale, Ph.D.
>> Staff Scientist
>> Cornell High Energy Synchrotron Source
>> Cornell University
>> 275 Wilson Lab
>> Rt. 366&  Pine Tree Road
>> Ithaca, NY 14853
>>
>> darren.dale at cornell.edu
>> office: (607) 255-3819
>> fax: (607) 255-9001
>> http://www.chess.cornell.edu
>>
>> _______________________________________________
>> NeXus mailing list
>> NeXus at nexusformat.org
>> http://lists.nexusformat.org/mailman/listinfo/nexus
>
> -- 
> ----------------------------------------------------------
> Pete R. Jemian, Ph.D.                <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.
> -----------------------------------------------------------

-- 
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