Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for variants to datarules.rst #666

Merged
merged 2 commits into from
Jan 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions manual/source/datarules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,40 @@ value is stored with a name built by appending _set to the normal NeXus field na
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-Variants:


Variants
#########

Sometimes it is necessary to store alternate values of a NeXus dataset
in a NeXus file. A common example may be the beam center of which a
rough value is available at data acquisition. But later on, a better beam
center is calculated as part of the data reduction. In order to store
this without losing the historical information, the original field can be given a variant attribute that points to
a new dataset containing the obsolete value. If even better values
become available, further datasets can be inserted into the chain of variant attributes
pointing to the preceeding value for the dataset. A reader can thus
keep the best value in the pre-defined dataset, and also be able to
follow the variant chain and locate older variants.

A little example is in order to illustrate the scheme:

.. code-block:: text

beam_center_x
@variant=beam_center_x_refined
beam_center_x_refined
@variant=beam_center_x_initial_guess
beam_center_x_initial_guess

NeXus borrowed this scheme from CIF. In this way all the different
variants of a dataset can be preserved. The expectation is that
variants will be rarely used and NXprocess groups with the results of
data reduction will be written instead.


.. _Design-ArrayStorageOrder:

NeXus Array Storage Order
Expand Down