Skip to content

Commit

Permalink
Fixed NXdirectof to have either a fermi_chopper or a disk_chopper
Browse files Browse the repository at this point in the history
Renamed scaling attribute to scaling_factor in NXlog
Document readback and set value for fields in the manual, datarules.rst
Refs #375, #502, #315
  • Loading branch information
mkoennecke committed Feb 2, 2018
1 parent 1acbd49 commit 4388f9b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
14 changes: 13 additions & 1 deletion applications/NXdirecttof.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,26 @@
</enumeration>
</field>
<group type="NXinstrument">
<group type="NXfermi_chopper" name="fermi_chopper">
<group type="NXfermi_chopper" name="fermi_chopper" minOccurs="0">
<field name="rotation_speed" type="NX_FLOAT" units="NX_FREQUENCY">
<doc>chopper rotation speed</doc>
</field>
<field name="energy" type="NX_FLOAT" units="NX_ENERGY">
<doc>energy selected</doc>
</field>
</group>
<group type="NXdisk_chopper" name="disk_chopper" minOccurs="0">
<field name="rotation_speed" type="NX_FLOAT" units="NX_FREQUENCY">
<doc>chopper rotation speed</doc>
</field>
<field name="energy" type="NX_FLOAT" units="NX_ENERGY">
<doc>energy selected</doc>
</field>
</group>
<doc>
We definitly want the rotation_speed and energy of the chopper. Thus either
a fermi_chopper or a disk_chopper group is required.
</doc>
</group>
</group>
</definition>
10 changes: 7 additions & 3 deletions base_classes/NXlog.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@
and in the units specified in the "units"
attribute. Please note that absolute
timestamps under unix are relative to ``1970-01-01T:00:00``.
</doc>
<attribute name="start" type="NX_DATE_TIME" />
<attribute name="scaling" type="NX_NUMBER"/>

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" />
</field>
<field name="value" units="NX_ANY" type="NX_NUMBER">
<doc>
Expand Down
13 changes: 13 additions & 0 deletions manual/source/datarules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,19 @@ adequately documented.
Rather than persist in using names not specified in the standard, please suggest additions to the :ref:`NIAC`.


The data stored in NeXus fields must be readback values. This means values as read from the detector, other hardware etc.
There are occasions where it is sensible to store the target value the variable was supposed to have. In this case the target
value is stored with a name built by appending _set to the normal NeXus field name. An example:

.. code-block:: text
:linenos:
temperature
temperature_set
The temperature field will hold the readback from the cryostat/furnace/whatever. The field temperature_set will hold
the target value for the temperature as set by the experiment control software.

.. _Design-ArrayStorageOrder:

NeXus Array Storage Order
Expand Down

0 comments on commit 4388f9b

Please sign in to comment.