FW: merging nexus files

Ray Osborn ROsborn at anl.gov
Tue Jul 25 23:05:56 BST 2000


I've just had the following correspondance with someone in Munich.  Is this
the sort of tool we should be providing?  Is my reply the correct approach?

Regards,
Ray
-- 
Dr Ray Osborn                Tel: +1 (630) 252-9011
Materials Science Division   Fax: +1 (630) 252-7777
Argonne National Laboratory  E-mail: ROsborn at anl.gov
Argonne, IL 60439-4845


----------
From: Ray Osborn <ROsborn at anl.gov>
Date: Tue, 25 Jul 2000 17:04:24 -0500
To: Peter Link <Peter_Link at Physik.TU-Muenchen.DE>
Subject: Re: merging nexus files

on 2000/7/19 10:13 AM, Peter Link at Peter_Link at Physik.TU-Muenchen.DE wrote:

> Dear Ray,
> discussing with others here at the FRM-II, where we would like to use NEXUS,
> the question appeared whether there exists a simple method to merge data
> from several Nexus files together into one file, while keeping the structure
> of the data of the original files.
> The purpose of this would be the following:
> Having a module (program) the writes file1 containing some general
> information
> This could be for example NX_sample NX_instrument and so on
> a second module that writes independently file2 containing some measurement
> a third module that makes some log of an environmental parameter like a
> temperature
> and finally having a module that once called merges together file 1-3(n) to
> produce a final file with all info.
> 
> Best regards Peter
> 
> 

Dear Peter,
Thanks for your query.  I have just returned from a workshop so I haven't
had a chance to think about it in detail.  There is no such tool available
yet as far as I know, but it doesn't sound as if it would be a very
difficult thing to do with the current API.  It is possible to open more
than one file at a time, each with its own file handle (NXhandle struct), so
you could read each file and at the same time write the contents to a new
file.  You could scan NXbrowse.c as an example of a program that generically
reads whatever is in the file.  Also, NXdump.f90 does a recursive dump of
the all the groups and data items within the file.

I can discuss with the other NAPI developers whether we should provide such
a general purpose tool.  If you decide to write something yourself, I would
encourage you to make it available for others to look at and/or modify.
That's one of the intended advantages of NeXus; that whatever we develop may
be useful to a lot of other people.

Best regards,
Ray
-- 
Dr Ray Osborn                Tel: +1 (630) 252-9011
Materials Science Division   Fax: +1 (630) 252-7777
Argonne National Laboratory  E-mail: ROsborn at anl.gov
Argonne, IL 60439-4845





More information about the NeXus-developers mailing list