[Nexus] : Writing and reading Nexus files in python

Wellenreuther, Gerd gerd.wellenreuther at desy.de
Thu Apr 15 07:57:05 BST 2010


Hi Alain,

Well, for Python there exist solutions. I was trying to collect all 
possible sources for different platforms on 
http://groups.google.com/group/mahid/web/important-web-pages . If you 
come across something else, feel free to add it or just tell me :).

Cheers, Gerd

On 15.04.2010 08:53, 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. Gerd Wellenreuther
beamline scientist P06 "Hard X-Ray Micro/Nano-Probe"
Petra III project
HASYLAB at DESY
Notkestr. 85
22603 Hamburg

Tel.: + 49 40 8998 5701


More information about the NeXus mailing list