diff --git a/applications/NXmx.nxdl.xml b/applications/NXmx.nxdl.xml index 02ec76cbbe..dab8e0b9af 100644 --- a/applications/NXmx.nxdl.xml +++ b/applications/NXmx.nxdl.xml @@ -764,6 +764,19 @@ plate, CMOS, ... + + + + Group containing the description and metadata for a single channel from a multi-channel + detector. + + Given an :ref:`NXdata` group linked as part of an NXdetector group that has an axis with + named channels (see the example in :ref:`NXdata </NXdata@default_slice-attribute>`), + the NXdetector will have a series of NXdetector_channel groups, one for each channel, + named CHANNELNAME_channel. + + + diff --git a/base_classes/NXdata.nxdl.xml b/base_classes/NXdata.nxdl.xml index 2c9d69620d..3ed18ff4ca 100644 --- a/base_classes/NXdata.nxdl.xml +++ b/base_classes/NXdata.nxdl.xml @@ -264,6 +264,51 @@ https://www.nexusformat.org/NIAC2018Minutes.html + + + Which slice of data to show in a plot by default. This is useful especially for + datasets with more than 2 dimensions. + + Should be an array of length equal to the number of dimensions + in the data, with the following possible values: + + * ".": All the data in this dimension should be included + * Integer: Only this slice should be used. + * String: Only this slice should be used. Use if ``AXISNAME`` is a string + array. + + Example:: + + data:NXdata + @signal = "data" + @axes = ["image_id", "channel", ".", "."] + @image_id_indices = 0 + @channel_indices = 1 + @default_slice = [".", "difference", ".", "."] + image_id = [1, ..., nP] + channel = ["threshold_1", "threshold_2", "difference"] + data = uint[nP, nC, i, j] + + Here, a data array with four dimensions, including the number of images + (nP) and number of channels (nC), specifies more dimensions than can be + visualized with a 2D image viewer for a given image. Therefore the + default_slice attribute specifies that the "difference" channel should be + shown by default. + + Alternate version using an integer would look like this (note 2 is a string):: + + data:NXdata + @signal = "data" + @axes = ["image_id", "channel", ".", "."] + @image_id_indices = 0 + @channel_indices = 1 + @default_slice = [".", "2", ".", "."] + image_id = [1, ..., nP] + channel = ["threshold_1", "threshold_2", "difference"] + data = uint[nP, nC, i, j] + + + - + Coordinate values along one or more :ref:`data </NXdata/DATA-field>` dimensions. The rank must be equal to the number of dimensions it spans. @@ -302,6 +347,9 @@ As the upper case ``AXISNAME`` indicates, the names of the ``AXISNAME`` fields can be chosen :ref:`freely <validItemName>`. The :ref:`axes </NXdata@axes-attribute>` attribute can be used to find all datasets in the ``NXdata`` that contain coordinate values. + + Most AXISNAME fields will be sequences of numbers but if an axis is better represented using names, such as channel names, + an array of NX_CHAR can be provided. Axis label diff --git a/base_classes/NXdetector.nxdl.xml b/base_classes/NXdetector.nxdl.xml index a6bb0b8c68..aee91bd13b 100644 --- a/base_classes/NXdetector.nxdl.xml +++ b/base_classes/NXdetector.nxdl.xml @@ -421,6 +421,18 @@ + + + Group containing the description and metadata for a single channel from a multi-channel + detector. + + Given an :ref:`NXdata` group linked as part of an NXdetector group that has an axis with + named channels (see the example in :ref:`NXdata </NXdata@default_slice-attribute>`), + the NXdetector will have a series of NXdetector_channel groups, one for each channel, + named CHANNELNAME_channel. + + + Spectral efficiency of detector with respect to e.g. wavelength diff --git a/base_classes/NXdetector_channel.nxdl.xml b/base_classes/NXdetector_channel.nxdl.xml new file mode 100644 index 0000000000..8cfc2ca87a --- /dev/null +++ b/base_classes/NXdetector_channel.nxdl.xml @@ -0,0 +1,162 @@ + + + + + + + + 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 (2D), 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 :ref:`NXdata` group linked as part of an NXdetector group that has an axis with named channels (see the + example in :ref:`NXdata </NXdata@default_slice-attribute>`), 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] + flatfield_applied = bool + pixel_mask_applied = bool + threshold_2_channel:NXdetector_channel + threshold_energy = float + flatfield = float[i, j] + pixel_mask = uint[i, j] + flatfield_applied = bool + pixel_mask_applied = bool + difference_channel:NXdetector_channel + threshold_energy = float[2] + + + + Energy at which a photon will be recorded + + + + + True when the flat field correction has been applied in the + electronics, false otherwise. + + + + + Response of each pixel given a constant input + + + + + + + + + + Errors of the flat field correction data. + The form flatfield_error is deprecated. + + + + + + + + + + True when the pixel mask correction has been applied in the + electronics, false otherwise. + + + + + + Custom pixel mask for this channel. May include nP as the first dimension for + masks that vary for each scan point. + + + + + + + + + + + The value at which the detector goes into saturation. + Especially common to CCD detectors, the data + is known to be invalid above this value. + + For example, given a saturation_value and an underload_value, the valid + pixels are those less than or equal to the saturation_value and greater + than or equal to the underload_value. + + The precise type should match the type of the data. + + + + + + The lowest value at which pixels for this detector would be reasonably + measured. The data is known to be invalid below this value. + + For example, given a saturation_value and an underload_value, the valid + pixels are those less than or equal to the saturation_value and greater + than or equal to the underload_value. + + The precise type should match the type of the data. + + + diff --git a/nxdlTypes.xsd b/nxdlTypes.xsd index 8811142b90..d6b3d86231 100644 --- a/nxdlTypes.xsd +++ b/nxdlTypes.xsd @@ -466,6 +466,7 @@ nxdl:NX_POSINT nxdl:NX_QUATERNION nxdl:NX_UINT + nxdl:NX_CHAR_OR_NUMBER "/> @@ -619,4 +620,14 @@ + + + Any valid character string or NeXus number representation + + + +