[Nexus] : Writing and reading Nexus files in python

Ray Osborn rosborn at anl.gov
Thu Apr 15 14:49:39 BST 2010


Alain,
The Python bindings that Paul Kienzle wrote are now in the default  
distribution. That's a direct mapping of the C API into Python using  
Numpy arrays. I am hoping that we can start distributing soon a higher- 
level set of modules, also based on Paul Kienzle's work, that make it  
easier to create NeXus files from the Python command-line,  
automatically handling, for example, the creation of valid NXdata  
groups following the NeXus rules for binding axes, etc, and with  
automated plotting. I'll post something to the list once we've got the  
documentation improved.

Ray

On Apr 15, 2010, at 1:53 AM, BUTEAU Alain wrote:

>
>
> 	We have similar request from our users to be able to access their  
> NeXus files from  python, and IDL
>
> I'ma also looking for recipes to do this from these langages
>
>
> -----Message d'origine-----
> De : nexus-bounces at nexusformat.org [mailto:nexus-bounces at nexusformat.org 
> ] De la part de freddie.akeroyd at stfc.ac.uk
> Envoyé : mercredi 14 avril 2010 20:35
> À : brian at stack.nl; nexus at nexusformat.org
> Objet : Re: [Nexus] Writing and reading Nexus files in Matlab
>
>
> If the NeXus files are in hdf5 format then reading is relatively  
> easy - matlab provides commands to load the data directly into a  
> matlab array. For more details see
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/ 
> hdf5read.html
>
> with regard to writing, nexus adds additional attributes to an HDF5  
> file to indicate the "nexus class" of an item. It would be possible  
> to create a NeXus file using the matlab hdf5write command, but you  
> would need to add these additional attributes by hand to make it  
> readable by other nexus utilities. These problems would be solved by  
> a native matlab API for NeXus - it is on the todo list, but we  
> haven't quite got round to it yet. What sort of timescale were you  
> looking at to start using NeXus files?
>
> Regards,
>
> Freddie
>
> -----Original Message-----
> From: nexus-bounces at nexusformat.org [mailto:nexus-bounces at nexusformat.org 
> ] On Behalf Of Brian Pauw
> Sent: 13 April 2010 13:22
> To: nexus at nexusformat.org
> Subject: [Nexus] Writing and reading Nexus files in Matlab
>
> Dear all,
>
> I would like to store my datafiles of upcoming 1D and 2D synchrotron  
> SAXS experiments in the NeXus format for archival purposes. I am  
> only familiar with Matlab, however I have not seen any API for  
> Matlab NeXus writes. Can someone please indicate how I can go about  
> this?
>
> Yours sincerely,
>
>
> Brian R. Pauw.
> -- 
> dr. ir. Brian R. Pauw
> brian at stack.nl
> http://www.lookingatnothing.com/
>
>
>
>
> _______________________________________________
> NeXus mailing list
> NeXus at nexusformat.org http://lists.nexusformat.org/mailman/listinfo/nexus
> -- 
> Scanned by iCritical. _______________________________________________
> NeXus mailing list
> NeXus at nexusformat.org http://lists.nexusformat.org/mailman/listinfo/nexus
> _______________________________________________
> NeXus mailing list
> NeXus at nexusformat.org
> http://lists.nexusformat.org/mailman/listinfo/nexus

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