From 81388d1dd229a388665d866fa31b472ae8f9f28c Mon Sep 17 00:00:00 2001 From: Aaron Brewster Date: Wed, 5 Apr 2023 16:54:45 -0700 Subject: [PATCH] Add NXdetector_channel as a base class Also add it as optional for NXmx See original Dectris proposal: https://github.com/dectris/documentation/tree/main/filewriter_v2#user-content-multi-channel-data Closes #940 Co-authored-by: Sophie Hotz --- base_classes/NXdetector_channel.nxdl.xml | 103 +++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 base_classes/NXdetector_channel.nxdl.xml diff --git a/base_classes/NXdetector_channel.nxdl.xml b/base_classes/NXdetector_channel.nxdl.xml new file mode 100644 index 000000000..cac2d7ab0 --- /dev/null +++ b/base_classes/NXdetector_channel.nxdl.xml @@ -0,0 +1,103 @@ + + + + + + + + These symbols will be used below to illustrate the coordination of the rank and sizes of datasets and the + preferred ordering of the dimensions. Each of these are optional (so the rank of the datasets + will vary according to the situation) and the general ordering principle is slowest to fastest. + The type of each dimension should follow the order of scan points, detector output (e.g. pixels), + then time-of-flight (i.e. spectroscopy, spectrometry). Note that the output of a detector is not limited + to single values (0D), lists (1D) and images (2), but three or higher dimensional arrays can be produced + by a detector at each trigger. + + + Rank of the ``data`` field associated with this detector + number of scan points + number of detector pixels in the slowest direction + number of detector pixels in the second slowest direction + number of detector pixels in the third slowest direction + + + + Description and metadata for a single channel from a multi-channel detector. + + Given an NXdata group linked as part of an NXdetector group that has an axis with named channels (see the + example in NXdata), the NXdetector will have a series of NXdetector_channel groups, one for each + channel, named CHANNELNAME_channel. + + Example, given these axes in the NXdata group: + @axes = ["image_id", "channel", ".", "."] + + And this list of channels in the NXdata group: + channel = ["threshold_1", "threshold_2", "difference"] + + The NXdetector group would have three NXdetector_channel groups: + detector: NXdetector + ... + threshold_1_channel: NXdetector_channel + threshold_energy = float + flatfield = float[i, j] + pixel_mask = uint[i, j] + threshold_2_channel: NXdetector_channel + threshold_energy = float + flatfield = float[i, j] + pixel_mask = uint[i, j] + difference_channel: NXdetector_channel + threshold_energy = float[2] + + + + Energy at which a photon will be recorded + + + + Response of each pixel given a constant input + + + + + + + + + + Custom pixel mask for this channel. May include nP as the first dimension for + masks that vary for each scan point. + + + + + + + +