[NeXus-tech] How to write the "axes" attribute in this case?

Pete Jemian prjemian at gmail.com
Tue Jul 22 17:30:38 BST 2014


This topic was discussed at this morning's technical committee 
teleconference.  The consensus was:

* NeXus does not have a way now to represent what is intended
   for the default visualization of this data, a 2-D image
   with appropriate |Q| values on each of the independent axes.

* The question posed should be considered differently to render
   the desired default visualization.  The question as posed
   seeks to visualize I(|Q|) data which is one-dimensional.
   Notwithstanding that the underlying 2-D data acquisition pattern
   has been retained.  The 2-D component of Q has been lost
   on conversion to |Q|.

* The |Q| are not appropriate to become HDF5 dimension scales
   for use in the "axes" attribute since they do not have
   constant values at each index.

* To get the default 2-D rendering, two additional 1-D arrays
   should be included, each of which is suitable for use as a
   dimension scale.  Then, rewrite the "axes" attribute with
   the two new dimension scales.  Such as::

	/: NeXus HDF5 file root
	  entry:NXentry
	    data:NXdata
	      Q:NX_NUMBER[nx,ny]
	      I:NX_NUMBER[nx,ny]
	        @signal=1
	        @axes="scale_n:scale_m"
	      scale_n:NX_INT[nx] = [0 .. n-1]
	      scale_m:NX_INT[ny] = [0 .. m-1]

One question still unresolved:
Is it required by NXdata to provide the "axes" attribute?

Pete



On 7/19/2014 10:20 AM, Tobias.Richter at diamond.ac.uk wrote:
> There is no ratified solution that works for cases like that. The canSAS way was proposed in 2012 but the decision was postponed.
> I've recently documented that for Herbert (attached). We're increasingly writing that out here at Diamond as well. It would be good to get some more support for that, especially since you co-authored that, Pete. ;-)
>
> Tobias
>
>
> ________________________________________
> From: NeXus-tech [nexus-tech-bounces at nexusformat.org] on behalf of Pete Jemian [prjemian at gmail.com]
> Sent: 19 July 2014 15:45
> To: NeXus Technical sub-committee list
> Subject: [NeXus-tech] How to write the "axes" attribute in this case?
>
> What is the recommended way to do this?
>
> Consider a pinhole SAS experiment with 2-D arrays of intensity data "I"
> and reciprocal space vector magnitude |Q| as "Q", one way to provide
> this data using the basic NeXus structure is:
>
> /: NeXus HDF5 file root
>     entry:NXentry
>       data:NXdata
>         Q:NX_NUMBER[nx,ny]
>         I:NX_NUMBER[nx,ny]
>           @signal=1
>
> How to write the/entry/data/I/@axes attribute?
>
> The default visualization of I(Q) is parametric in this case, where the
> Q value associated with a given I are found by corresponding row and
> columns in the two arrays.
>
> Since /entry/data/Q is a 2-D array, we cannot use it in the "axes"
> attribute of /entry/data/I because, in the NXdata specification, axes
> "defines the names of the dimension scales (independent axes) for this
> data set as a colon-delimited array."  Dimension scales, each defining
> an axis of the data, are rank=1 arrays.  Since the values in any column
> of "Q" are different than any other column, we cannot simply create two
> 1-D arrays and use them as dimension scales in the "axes" attribute.
>
> Is it permissable to leave out the "axes" attribute?
>
> Otherwise, to provide a default plot, should the writer "dereference"
> these two arrays into two 1-D arrays of I(|Q|), each of length nx*ny?
>
> (Because the source of this data was a 2-D detector, it is less
> desirable to proceed with this reduction, just to satisfy NeXus.  With
> reduction to 1-D, one loses access to intuition about unresolved
> artefacts in the visualized image, such as uneven detector efficiency
> and line dropouts.)
> Provide both 2-D and also 1-D reductions?
> Same NXdata group?
> If the 1-D reduction is written into a separate NXdata group, how is the
> "preferred" NXdata group noted for default visualization?
>
> Thanks,
>      Pete
>
> _______________________________________________
> NeXus-tech mailing list
> NeXus-tech at nexusformat.org
> http://lists.nexusformat.org/mailman/listinfo/nexus-tech
>


More information about the NeXus-tech mailing list