3.3.1.29. NXlog

Status:

base class, extends NXobject

Description:

Information recorded as a function of time.

Description of information that is recorded against time. There are two common use cases for this:

  • When logging data such as temperature during a run

  • When data is taken in streaming mode data acquisition, i.e. just timestamp, value pairs are stored and correlated later in data reduction with other data,

In both cases, NXlog contains the logged or streamed values and the times at which they were measured as elapsed time since a starting time recorded in ISO8601 format. The time units are specified in the units attribute. An optional scaling attribute can be used to accomodate non standard clocks.

This method of storing logged data helps to distinguish instances in which a variable contains signal or axis coordinate values of plottable data, in which case it is stored in an NXdata group, and instances in which it is logged during the run, when it should be stored in an NXlog group.

In order to make random access to timestamped data faster there is an optional array pair of cue_timestamp_zero and cue_index. The cue_timestamp_zero will contain coarser timestamps than in the time array, say every five minutes. The cue_index will then contain the index into the time,value pair of arrays for that coarser cue_timestamp_zero.

Symbols:

No symbol table

Groups cited:

none

Structure:

@default: (optional) NX_CHAR

Declares which child group contains a path leading to a NXdata group.

It is recommended (as of NIAC2014) to use this attribute to help define the path to the default dataset to be plotted. See https://www.nexusformat.org/2014_How_to_find_default_data.html for a summary of the discussion.

time: (optional) NX_NUMBER {units=NX_TIME}

Time of logged entry. The times are relative to the “start” attribute and in the units specified in the “units” attribute. Please note that absolute timestamps under unix are relative to 1970-01-01T00:00:00.0Z.

The scaling_factor, when present, has to be applied to the time values in order to arrive at the units specified in the units attribute. The scaling_factor allows for arbitrary time units such as ticks of some hardware clock.

@start: (optional) NX_DATE_TIME

@scaling_factor: (optional) NX_NUMBER

value: (optional) NX_NUMBER {units=NX_ANY}

Array of logged value, such as temperature. If this is a single value the dimensionality is nEntries. However, NXlog can also be used to store multi dimensional time stamped data such as images. In this example the dimensionality of values would be value[nEntries,xdim,ydim].

raw_value: (optional) NX_NUMBER {units=NX_ANY}

Array of raw information, such as thermocouple voltage

description: (optional) NX_CHAR

Description of logged value

average_value: (optional) NX_FLOAT {units=NX_ANY}

average_value_error: (optional) NX_FLOAT {units=NX_ANY}

DEPRECATED: see: https://github.com/nexusformat/definitions/issues/639

estimated uncertainty (often used: standard deviation) of average_value

average_value_errors: (optional) NX_FLOAT {units=NX_ANY}

estimated uncertainty (often used: standard deviation) of average_value

minimum_value: (optional) NX_FLOAT {units=NX_ANY}

maximum_value: (optional) NX_FLOAT {units=NX_ANY}

duration: (optional) NX_FLOAT {units=NX_ANY}

Total time log was taken

cue_timestamp_zero: (optional) NX_NUMBER {units=NX_TIME}

Timestamps matching the corresponding cue_index into the time, value pair.

@start: (optional) NX_DATE_TIME

If missing start is assumed to be the same as for “time”.

@scaling_factor: (optional) NX_NUMBER

If missing start is assumed to be the same as for “time”.

cue_index: (optional) NX_INT

Index into the time, value pair matching the corresponding cue_timestamp_zero.

Hypertext Anchors

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

NXDL Source:

https://github.com/nexusformat/definitions/blob/main/base_classes/NXlog.nxdl.xml