[Nexus-developers] Nxtranslate in 3.0?

Ray Osborn rosborn at anl.gov
Thu Jun 9 13:06:44 BST 2005


On 2005/06/09 3:29, "Akeroyd, FA (Freddie)" <F.A.Akeroyd at rl.ac.uk> wrote:

> I guess NXtoNX4 should then logically become nx2nx4; however I think
> this name is confusing. Given the code similarity of NXtoNX4 and NXtoNX5
> I propose instead an "nxconvert" with command line options --xml, --hdf4
> 
> and --hdf5

Freddie,
I support something like this, because one of the things I recently realized
is that NXtoXML (or nxtoxml) was written before the XML API was added, and
was really intended for illustrative purposes.  It writes the XML manually,
the main drawback of which is that it transcribes the global attributes,
including the HDF version that is no longer valid.  Of course, I could just
change the global attributes, but I think it makes more sense to have a
global "nxconvert" routine using the API for both reading and writing.

The only question I have is - what should be the default conversion?  Should
we assume that HDF4 is to be converted to HDF5 and vice-versa, and is there
a way to automatically check which libraries are available anyway?

Ray

P.S. NXtoDTD strips the data as well.  If we add a --dtd version to
"nxconvert", will the XML API produce the right results if we just leave out
the NXputdata calls?
-- 
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