nexusformat / definitions

Definitions of the NeXus Standard File Structure and Contents
https://manual.nexusformat.org/
Other
26 stars 57 forks source link

3D Q-vector dimensions, directions, orientation definitions #642

Open toqduj opened 5 years ago

toqduj commented 5 years ago

There's a new NXcanSAS reader being implemented in SasView, and we've come across a couple of issues that aren't clear from the NXcanSAS documentation. Chief of this is the dimensionality of a 3D Q-vector map for detector pixels. The documentation states that \vec{Q} should be an array representing the 3D Q-vector, so if the detector image is of size [m, n], the Q-vector is either [m, n, 3] or [3, m, n]. These three arrays contain the orthogonal components of \vec{Q}: Q0, Q1, Q2. Here, Q0, Q1, Q2 have dimensions [m, n]

For SasView, we've decided that (for now) this should be [3, m, n].

That would, of course, raise the next question: what to do with moving detectors, i.e. where we have p frames of detector images. What shape should Q be in then? [p, 3, m, n]?

Lastly, there's a question on whether the axis pointing right should be defined for visualization. The detector dimensions are ordered by their faster and slower directions, however, this does not specify its orientation for visualization, you may not always want the fastest readout direction pointing right in your data visualization. An attribute called @axis_pointing_right should help here, so we can indicate whether +m or +n (or even -n, -m) should point right in visualizations of the data.

vasole commented 5 years ago

Can you afford to provide the coordinates/scales associated to the m and n dimensions? That would solve your representation issue in terms of right/left or up/down.

vasole commented 5 years ago

For instance, specifying -m, -m+1, -m+2, ...,, 1 would flip the representation of the m dimension compared to the default 1, 2, ...., m-1, m