[Nexus-developers] Nxtranslate in 3.0?

Peterson, Peter F. petersonpf at ornl.gov
Thu Jun 9 15:18:16 BST 2005


An easier way to do a default conversion (read: configured in the build
process) is to declare that, for example, all files read in get
converted to HDF5. When something is already HDF5, nxconvert will create
a copy of the file. That being said, I think that if the nodes are
created in different orders "diff" will fail even if the files contain
exactly the same information. Does anyone know for certain?

P^2 

-----Original Message-----
From: nexus-developers-bounces at anl.gov
[mailto:nexus-developers-bounces at anl.gov] On Behalf Of Akeroyd, FA
(Freddie)
Sent: Thursday, June 09, 2005 9:24 AM
To: nexus-developers at anl.gov
Subject: RE: [Nexus-developers] Nxtranslate in 3.0?

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

We would need to add an API function to determine whether a file is HDF4
or HDF5 as currently I don't think there is a way. Also if the input is
XML, what should the default conversion be? It may just be safer to have
no default conversion and force the user to always specify it with an
option. 

If you specify a conversion for which the library is not
available/installed, the command will fail as NXopen will then produce
an error. I could make nxconvert cleverer and only compile in e.g. the
"-h5" option if HDF5 is available

>
> 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?
>
Not quite - see http://bugs.isis.rl.ac.uk/show_bug.cgi?id=863

Freddie



_______________________________________________
NeXus-developers mailing list
NeXus-developers at anl.gov
http://www.neutron.anl.gov/mailman/listinfo/nexus-developers





More information about the NeXus-developers mailing list