Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nexusformat/definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
zjttoefs committed May 8, 2018
2 parents 0b2d461 + d282259 commit 1c5eb1f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 27 deletions.
4 changes: 2 additions & 2 deletions base_classes/NXdata.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</doc>
</attribute>
<attribute name="axes">
<!-- http://wiki.nexusformat.org/2014_axes_and_uncertainties -->
<!-- http://www.nexusformat.org/2014_axes_and_uncertainties -->
<doc>
.. index:: plotting

Expand All @@ -93,7 +93,7 @@
while the other two dimensions have no fields to be used as dimension scales.

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

If there are no axes at all (such as with a stack of images),
the axes attribute can be omitted.
Expand Down
2 changes: 1 addition & 1 deletion base_classes/NXdetector.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
</doc>
</group>

<field name="sequence_number">
<field name="sequence_number" type="NX_INT">
<doc>
In order to properly sort the order of the images taken in (for
example) a tomography experiment, a sequence number is stored with each
Expand Down
52 changes: 28 additions & 24 deletions base_classes/NXlog.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl" ?>
<!--
# NeXus - Neutron and X-ray Common Data Format
#
#
# Copyright (C) 2008-2018 NeXus International Advisory Committee (NIAC)
#
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
Expand All @@ -22,57 +22,57 @@
# For further information, see http://www.nexusformat.org
-->
<definition
name="NXlog"
version="1.1"
type="group"
name="NXlog"
version="1.1"
type="group"
extends="NXobject"
category="base"
xmlns="http://definition.nexusformat.org/nxdl/3.1"
xmlns="http://definition.nexusformat.org/nxdl/3.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"
>
<doc>
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,
correlated later in data reduction with other data,

It both cases NXlog contains

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.
can be used to accomodate non standard clocks.



This method of storing logged data helps to distinguish
instances in which a variable is a dimension scale of the data, in which case it is stored
in an :ref:`NXdata` group, and instances in which it is logged during the
in an :ref:`NXdata` group, and instances in which it is logged during the
run, when it should be stored in an :ref:`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``.
coarser ``cue_timestamp_zero``.

</doc>
<field name="time" type="NX_FLOAT" units="NX_TIME">
<field name="time" type="NX_NUMBER" units="NX_TIME">
<doc>
Time of logged entry. The times are relative to the "start" attribute
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-01T:00:00``.

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.
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.
</doc>
<attribute name="start" type="NX_DATE_TIME" />
<attribute name="scaling_factor" type="NX_NUMBER" />
Expand All @@ -83,7 +83,7 @@
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].
this example the dimensionality of values would be value[nEntries,xdim,ydim].
</doc>
</field>
<field name="raw_value" units="NX_ANY" type="NX_NUMBER">
Expand All @@ -101,18 +101,22 @@
<field name="duration" type="NX_FLOAT" units="NX_ANY">
<doc>Total time log was taken</doc>
</field>
<field name="cue_timestamp_zero" type="NX_DATE_TIME"
units="NX_TIME">
<field name="cue_timestamp_zero" type="NX_NUMBER" units="NX_TIME">
<doc>
Timestamps matching the corresponding cue_index into the
time, value pair.
</doc>
<attribute name="start" type="NX_DATE_TIME" />
<attribute name="start" type="NX_DATE_TIME">
<doc>If missing start is assumed to be the same as for "time".</doc>
</attribute>
<attribute name="scaling_factor" type="NX_NUMBER">
<doc>If missing start is assumed to be the same as for "time".</doc>
</attribute>
</field>
<field name="cue_index" type="NX_INT">
<doc>
Index into the time, value pair matching the corresponding
cue_timestamp.
cue_timestamp.
</doc>
</field>
</definition>

0 comments on commit 1c5eb1f

Please sign in to comment.