nexusformat / definitions

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

NXdetector readout orientation #1211

Closed wakonig closed 1 year ago

wakonig commented 1 year ago

Hi all, Depending on the software used for the detector readout, the data within NXdetector is saved with a specific orientation. To document the orientation I'm just using a separate group "orientation" for now:

<group name="orientation">
  <dataset name="transpose" value="1" />
  <dataset name="rot90" value="3" />
  <attribute name="description" value="Orientation defines the number of counterclockwise rotations by 90 deg followed by a transposition to reach the 'cameraman orientation', that is looking towards the beam." />
</group>

Is there a standardised way of documenting the readout orientation? If not, would this be something one could standardise in the future?

zjttoefs commented 1 year ago

The detector x and y coordinates are the fast and slow readout dimensions. I don't think this is needed, but it can be covered by the standard geometry placement, unless I am mistaken.

PeterC-DLS commented 1 year ago

By row-major storage and NeXus coordinate frame conventions, an area detector data field should have a shape of (slow, fast) where the fast dimension is along a row (i.e. X) of pixels on the detector. Usually, the (0,0) pixel is at the upper left corner when viewing the detector face from the sample. If the detector is not in this orientation then use NXdetector_module and its fast/slow_pixel_direction fields to specify it.

wakonig commented 1 year ago

Thanks a lot for the info! I'll have a closer look at the NXdetector_module then.