[Nexus] question about NeXus classes

Darren Dale darren.dale at cornell.edu
Thu Dec 18 15:50:13 GMT 2008


> > On Friday 25 July 2008 13:35:13 Peterson, Peter F. wrote:
> > > The current philosophy of classes is that they are to be thought of as
> > > dictionaries. If you are familiar with xml schema (xsd) the "any" tag
> > > is appropriate. This means that there is one NXdetector which covers
> > > all the various types of detectors in existence. If a particular
> > > detector needs another field that isn't in the current NXdetector, then
> > > it should be added. Subclassing is not an idea that can be applied to
> > > the base classes.

I am revisiting NeXus compatibility, and am experimenting with adding some 
additional metadata (like the dimensions of a scan or some additional 
information to choose a more specific object constructor in python)...

On Wednesday 27 August 2008 10:29:12 Mark Koennecke <Mark.Koennecke at psi.ch> 
> > On Saturday 26 July 2008 09:42:04 am Darren Dale wrote:
> > Today I discovered nxvalidate in the nexus trunk and tried running it on
> > some of the test files in test/data. They either did not conform to the
> > new 3.0 schema or the perhaps the schema does not include all the
> > definitions needed to validate these files.
> > nexus_defs/schema/testfile.xml does validate. Is there any additional
> > information available concerning the new organization of NeXus
> > classes/subclasses, new features, etc?
> >  
> The files in test/data are there to test some mechaniques of the API. They
> do not conform to the standard. I apologize for this, but NeXus is
> maintained by very
> people in their spare time and thus we are not always as consistent as
> would be
> desirable. But worry though( and try to resolve the issue) if your files
> fail the nxvalidate
> test.

If I include attributes in my file that are not in the NeXus definition, like at 
the root level if I have an HDF5_API_version attribute, nxvalidate complains 
that the attribute is not allowed. So I am confused, I thought I understood 
from Peter's response that I can use additional attributes and fields and 
remain valid so long as I use the existing NX_classes.

Also, I would like to include a group under NXentry that contains the most 
relevant information from the measurement, like datasets for the scanned 
counters and motors, to make it easy to find interactively work with this data 
like you would in Matlab or IPython. Is it valid to create generic HDF5 groups 
that do not identify a NX_class attribute? 

Finally, nxvalidate complains about finding an NXinstrument definition in 
NXentry, is that an error in the NXentry schema definition? The description at 
http://www.nexusformat.org/NXentry shows NXinstrument, but it does not appear 
in http://definition.nexusformat.org/schema/3.0/NXentry.xsd .


More information about the NeXus mailing list