2.3.3.1.12. NXdata

Status:

base class, extends NXobject

Description:

Symbols:

These symbols will be used below to coordinate fields with the same ...

These symbols will be used below to coordinate fields with the same shape.

dataRank: rank of the DATA field

n: length of the AXISNAME field

nx: length of the x field

ny: length of the y field

nz: length of the z field

Groups cited:

none

Structure:

@auxiliary_signals: (optional) NX_CHAR

Array of strings holding the :ref:`names ` of additional ...

Array of strings holding the names of additional signals to be plotted with the default signal. These fields or links must exist and be direct children of this NXdata group.

Each auxiliary signal needs to be of the same shape as the default signal.

@signal: (optional) NX_CHAR

Declares which NeXus field is the default. ...

Declares which NeXus field is the default. The value is the name of the data field to be plotted. This field or link must exist and be a direct child of this NXdata group.

It is recommended (as of NIAC2014) to use this attribute rather than adding a signal attribute to the field. See https://www.nexusformat.org/2014_How_to_find_default_data.html for a summary of the discussion.

@axes: (optional) NX_CHAR

Array of strings holding the :ref:`names ` of ...

Array of strings holding the names of the independent data fields used in the default plot for all of the dimensions of the signal as well as any auxiliary signals.

One name is provided for every dimension in the signal or auxiliary signal fields.

The axes values are the names of fields or links that must exist and be direct children of this NXdata group.

An axis slice is specified using a field named AXISNAME_indices as described below (where the text shown here as AXISNAME is to be replaced by the actual field name).

When no default axis is available for a particular dimension of the plottable data, use a “.” in that position. Such as:

@axes=["time", ".", "."]

Since there are three items in the list, the signal field must be a three-dimensional array (rank=3). The first dimension is described by the values of a one-dimensional array named time while the other two dimensions have no fields to be used as dimension scales.

See examples provided on the NeXus wiki: https://www.nexusformat.org/2014_axes_and_uncertainties.html

If there are no axes at all (such as with a stack of images), the axes attribute can be omitted.

@reference: (optional) NX_CHAR

Points to the path of a field defining the data to which the `DATA` group refe ...

Points to the path of a field defining the data to which the DATA group refers.

This concept allows to link the data to a respective field in the NeXus hierarchy, thereby defining the physical quantity it represents.

Example:

If the data corresponds to a readout of a detector, @reference links to that detectors data:

@reference: ‘/entry/instrument/detector/data’ for a 2D detector

@AXISNAME_indices: (optional) NX_INT

Each ``AXISNAME_indices`` attribute indicates the dependency ...

Each AXISNAME_indices attribute indicates the dependency relationship of the AXISNAME field (where AXISNAME is the name of a field that exists in this NXdata group) with one or more dimensions of the plottable data.

Integer array that defines the indices of the signal field (that field will be a multidimensional array) which need to be used in the AXISNAME field in order to reference the corresponding axis value.

The first index of an array is 0 (zero).

Here, AXISNAME is to be replaced by the name of each field described in the axes attribute. An example with 2-D data, \(d(t,P)\), will illustrate:

data_2d:NXdata
  @signal="data"
  @axes=["time", "pressure"]
  @time_indices=0
  @pressure_indices=1
  data: float[1000,20]
  time: float[1000]
  pressure: float[20]

This attribute is to be provided in all situations. However, if the indices attributes are missing (such as for data files written before this specification), file readers are encouraged to make their best efforts to plot the data. Thus the implementation of the AXISNAME_indices attribute is based on the model of “strict writer, liberal reader”.

Note

Attributes potentially containing multiple values (axes and _indices) are to be written as string or integer arrays, to avoid string parsing in reading applications.

AXISNAME: (optional) NX_NUMBER (Rank: 1, Dimensions: [n])

Dimension scale defining an axis of the data. ...

Dimension scale defining an axis of the data. Client is responsible for defining the dimensions of the data. The name of this field may be changed to fit the circumstances. Standard NeXus client tools will use the attributes to determine how to use this field.

@long_name: (optional) NX_CHAR

Axis label

@distribution: (optional) NX_BOOLEAN

``0|false``: single value, ...

0|false: single value, 1|true: multiple values

@first_good: (optional) NX_INT

Index of first good value

@last_good: (optional) NX_INT

Index of last good value

@axis: (optional) NX_POSINT

Index (positive integer) identifying this specific set of numbers. ...

Index (positive integer) identifying this specific set of numbers.

N.B. The axis attribute is the old way of designating a link. Do not use the axes attribute with the axis attribute. The axes group attribute is now preferred.

@reference: (optional) NX_CHAR

Points to the path of a field defining the axis to which the ``AXISNAME`` ax ...

Points to the path of a field defining the axis to which the AXISNAME axis refers.

This concept allows to link an axis to a respective field in the NeXus hierarchy, thereby defining the physical quantity it represents.

Examples:

If a calibration has been performed, @reference links to the result of that calibration:

@reference: ‘/entry/process/calibration/calibrated_axis’

If the axis corresponds to a coordinate of a detector, @reference links to that detector axis:

@reference: ‘/entry/instrument/detector/axis/some_axis’ for a 2D detector

If the axis is a scanned motor, @reference links to the transformation describing the respective motion, e.g.:

@reference: ‘/entry/instrument/detector/transformations/some_transformation’ for a motion of the detector

FIELDNAME_errors: (optional) NX_NUMBER

"Errors" (meaning *uncertainties* or *standard deviations*) ...

“Errors” (meaning uncertainties or standard deviations) associated with any field named FIELDNAME in this NXdata group (e.g. an axis, signal or auxiliary signal).

The dimensions of the FIELDNAME_errors field must match the dimensions of the FIELDNAME field.

DATA: (optional) NX_NUMBER (Rank: dataRank)

This field contains the data values to be used as the ...

This field contains the data values to be used as the NeXus plottable data. Client is responsible for defining the dimensions of the data. The name of this field may be changed to fit the circumstances. Standard NeXus client tools will use the attributes to determine how to use this field.

@signal: (optional) NX_POSINT

Plottable (independent) axis, indicate index number. ...

Plottable (independent) axis, indicate index number. Only one field in a NXdata group may have the signal=1 attribute. Do not use the signal attribute with the axis attribute.

@axes: (optional) NX_CHAR

Defines the names of the dimension scales ...

Defines the names of the dimension scales (independent axes) for this data set as a colon-delimited array. NOTE: The axes attribute is the preferred method of designating a link. Do not use the axes attribute with the axis attribute.

@long_name: (optional) NX_CHAR

data label

@reference: (optional) NX_CHAR

Points to the path of a field defining the data to which the `DATA` field re ...

Points to the path of a field defining the data to which the DATA field refers.

This concept allows to link the data to a respective field in the NeXus hierarchy, thereby defining the physical quantity it represents.

Here, DATA is to be replaced by the name of each data field.

Example:

If the data corresponds to a readout of a detector, @reference links to that detectors data:

@reference: ‘/entry/instrument/detector/data’ for a 2D detector

errors: (optional) NX_NUMBER (Rank: dataRank)

DEPRECATED: Use DATA_errors instead (NIAC2018)

Standard deviations of data values - ...

Standard deviations of data values - the data array is identified by the group attribute signal. The errors array must have the same dimensions as DATA. Client is responsible for defining the dimensions of the data.

scaling_factor: (optional) NX_FLOAT

The elements in data are usually float values really. For ...

The elements in data are usually float values really. For efficiency reasons these are usually stored as integers after scaling with a scale factor. This value is the scale factor. It is required to get the actual physical value, when necessary.

offset: (optional) NX_FLOAT

An optional offset to apply to the values in data.

title: (optional) NX_CHAR

Title for the plot.

x: (optional) NX_FLOAT (Rank: 1, Dimensions: [nx]) {units=NX_ANY}

This is an array holding the values to use for the x-axis of ...

This is an array holding the values to use for the x-axis of data. The units must be appropriate for the measurement.

y: (optional) NX_FLOAT (Rank: 1, Dimensions: [ny]) {units=NX_ANY}

This is an array holding the values to use for the y-axis of ...

This is an array holding the values to use for the y-axis of data. The units must be appropriate for the measurement.

z: (optional) NX_FLOAT (Rank: 1, Dimensions: [nz]) {units=NX_ANY}

This is an array holding the values to use for the z-axis of ...

This is an array holding the values to use for the z-axis of data. The units must be appropriate for the measurement.

Hypertext Anchors

List of hypertext anchors for all groups, fields, attributes, and links defined in this class.

NXDL Source:

https://github.com/FAIRmat-NFDI/nexus_definitions/tree/fairmat/base_classes/NXdata.nxdl.xml