Find default data in NXdata vGroup

Ray Osborn ROsborn at anl.gov
Tue Mar 24 21:27:12 GMT 1998


Mark,
Please check the NeXus web pages again to see if that makes the position
clear.  In <http://www.neutron.anl.gov/NeXus/NeXus_structure.html#Data> (I
think), you will find that the proposal does indeed require (!) the
definition of the "signal" attribute in order to identify the primary data.
In some ways, I regret its need, since one of the aims of the NXdata class
was to provide a plottable data object in a way that HDF did not on its
own.  It would contain only the data and associated dimension scales
(axes).  It should therefore only contain one dataset, with the signal
attribute then becoming redundant.  However, we aim to make NeXus as
flexible as possible, and this restriction is not to everyone's liking.

Note that the axes are defined by their own attributes (axis=1, 2, 3 etc)
to link them to the appropriate data dimension.  The final attribute,
primary (= 1,2,3 etc), defines which is the default axis for each
dimension.  Your colleague should therefore search for the SDS's with
signal=1, find its rank, and then search for the SDS's with axis =
1,2...rank, checking that they are set as primary =1 in each case.

I see that I may not have made it clear in the definition of NXdata that if
the user chooses to place extra data in the NXdata group, it MUST have the
same shape (rank and dimension sizes) as the other dataset and be plottable
with the same axes.  This is because we don't allow for more than one set
of dimension axes.  If the data does not have the same shape, it MUST be
put in a separate NXdata group of its own.

By the way, the problem your colleague addresses is precisely why I would
like the development of standard NAPI routines for identifying the data
automatically as I described above.  It is to make his/her life much
easier, and reduce the worries you raise.

Regards,
Ray


>  High there,
>
>  a colleague of mine is working on a fitting program and wants to read
>  NeXus data. He found something with the data vGroup which might be a real
>  issue: How to automatically decide what is the main data content? This
>is not
>  completely clear to me. I can think of two options to resolve this:
>  - We prescribe, that the data vGroup may contain only data + axis attributes
>    with NO auxiliaries.
>  - We put an attribute signal=1 on to the main data content. This is reviving
>    an idea from John Tischler.
>
>  I'll opt for the second option because it leaves us the freedom to have
>  auxilliary data, for instance temperature or certain angles, in the
>  data vGroup. Such data can make sense there because sometimes such data
>  is necessary even for a first glance. For example: On a four circle
>  diffractometer equipped with an area-PSD a detector frame without
>information
>  about setting angles is utterly useless. Except if all you want  is to look
>  at boring pictures with spots.
>
>  What does everybody else thinks?
>
>                                            Mark Koennecke


--
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 mailing list