.. auto-generated by script ../../../../utils/nxdl2rst.py from the NXDL source NXcanSAS.nxdl.xml
.. index::
! NXcanSAS (application definition)
! canSAS (application definition)
see: canSAS (application definition); NXcanSAS
.. _NXcanSAS:
========
NXcanSAS
========
**Status**:
application definition, extends :ref:`NXobject`
**Description**:
Implementation of the canSAS standard to store reduced small-angle scattering data of any dimension.
.. index:: canSAS
For more details, see:
* http://www.cansas.org/
* http://www.cansas.org/formats/canSAS1d/1.1/doc/
* http://cansas-org.github.io/canSAS2012/
* https://github.com/canSAS-org/NXcanSAS_examples
The minimum requirements for *reduced* small-angle scattering data
as described by canSAS are summarized in the following figure:
.. _canSAS_2012_minimum:
.. figure:: canSAS/2012-minimum.png
:width: 60%
The minimum requirements for *reduced* small-angle scattering data.
(:download:`full image `)
See :ref:`below ` for the minimum required
information for a NeXus data file
written to the NXcanSAS specification.
.. rubric:: Implementation of canSAS standard in NeXus
This application definition is an implementation of the canSAS
standard for storing both one-dimensional and multi-dimensional
*reduced* small-angle scattering data.
* NXcanSAS is for reduced SAS data and metadata to be stored together in one file.
* *Reduced* SAS data consists of :math:`I(\vec{Q})` or :math:`I(|\vec{Q}|)`
* External file links are not to be used for the reduced data.
* A good practice/practise is, at least, to include a reference to how the data was acquired and processed. Yet this is not a requirement.
* There is no need for NXcanSAS to refer to any raw data.
The canSAS data format has a structure similar to NeXus, not identical.
To allow canSAS data to be expressed in NeXus, yet identifiable
by the canSAS standard, an additional group attribute ``canSAS_class``
was introduced. Here is the mapping of some common groups.
=============== ============ ==========================
group (*) NX_class canSAS_class
=============== ============ ==========================
sasentry NXentry SASentry
sasdata NXdata SASdata
sasdetector NXdetector SASdetector
sasinstrument NXinstrument SASinstrument
sasnote NXnote SASnote
sasprocess NXprocess SASprocess
sasprocessnote NXcollection SASprocessnote
sastransmission NXdata SAStransmission_spectrum
sassample NXsample SASsample
sassource NXsource SASsource
=============== ============ ==========================
(*) The name of each group is a suggestion,
not a fixed requirement and is chosen as fits each data file.
See the section on defining
:ref:`NXDL group and field names `.
Refer to the NeXus Coordinate System drawing (:ref:`Design-CoordinateSystem`)
for choice and direction of :math:`x`, :math:`y`, and :math:`z` axes.
.. _NXcanSAS_minimum:
.. rubric:: The minimum required information for a NeXus data file
written to the NXcanSAS specification.
.. literalinclude:: canSAS/minimum-required.txt
:tab-width: 4
:linenos:
:language: text
**Symbols**:
No symbol table
**Groups cited**:
:ref:`NXaperture`, :ref:`NXcollection`, :ref:`NXcollimator`, :ref:`NXdata`, :ref:`NXdetector`, :ref:`NXentry`, :ref:`NXinstrument`, :ref:`NXnote`, :ref:`NXprocess`, :ref:`NXsample`, :ref:`NXsource`
.. index:: NXentry (base class); used in application definition, NXdata (base class); used in application definition, NXinstrument (base class); used in application definition, NXaperture (base class); used in application definition, NXcollimator (base class); used in application definition, NXdetector (base class); used in application definition, NXsource (base class); used in application definition, NXsample (base class); used in application definition, NXprocess (base class); used in application definition, NXnote (base class); used in application definition, NXcollection (base class); used in application definition
**Structure**:
**(entry)**: (required) :ref:`NXentry`
.. index:: NXcanSAS (applications); SASentry
Place the canSAS ``SASentry`` group as a child of a NeXus ``NXentry`` group
(when data from multiple techniques are being stored)
or as a replacement for the ``NXentry`` group.
Note: It is required for all numerical objects to provide
a *units* attribute that describes the engineering units.
Use the Unidata UDunits [#]_ specification
as this is compatible with various community standards.
.. [#] The UDunits specification also includes instructions for derived units.
.. index:: default (group attribute)
**@default**: (optional) :ref:`NX_CHAR `
.. index:: plotting
Declares which :ref:`NXdata` group
contains the data to be shown by default.
It is needed to resolve ambiguity when more than one :ref:`NXdata` group exists.
The value is the name of the default :ref:`NXdata` group.
Usually, this will be the name of the first *SASdata* group.
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: **SASentry**
Obligatory value: ``SASentry``
.. index:: version (group attribute)
**@version**: (required) :ref:`NX_CHAR `
Describes the version of the canSAS standard used to write this data.
This must be a text (not numerical) representation. Such as::
@version="1.0"
Obligatory value: ``1.0``
.. index:: definition (field)
**definition**: (required) :ref:`NX_CHAR `
Official NeXus NXDL schema to which this subentry conforms.
Obligatory value: ``NXcanSAS``
.. index:: title (field)
**title**: (required) :ref:`NX_CHAR `
Title of this *SASentry*.
Make it so that you can recognize the data by its title.
Could be the name of the sample,
the name for the measured data, or something else representative.
.. index:: run (field)
**run**: (required) :ref:`NX_CHAR `
Run identification for this *SASentry*.
For many facilities, this is an integer, such as en experiment number.
Use multiple instances of ``run`` as needed, keeping
in mind that HDF5 requires unique names for all entities
in a group.
.. index:: name (field attribute)
**@name**: (optional) :ref:`NX_CHAR `
Optional string attribute to identify this particular *run*.
Could use this to associate (correlate) multiple *SASdata* elements with *run* elements.
**(data)**: (required) :ref:`NXdata`
A *SASData* group contains a single reduced small-angle scattering data set
that can be represented as :math:`I(\vec{Q})` or :math:`I(|\vec{Q}|)`.
*Q* can be either a vector (:math:`\vec{Q}`) or a vector magnitude (:math:`|\vec{Q}|`)
The name of each *SASdata* group must be unique within a SASentry group.
Suggest using names such as ``sasdata01``.
NOTE: For the first *SASdata* group, be sure to write the chosen name
into the `SASentry/@default` attribute, as in::
SASentry/@default="sasdata01"
A *SASdata* group has several attributes:
* I_axes
* Q_indices
* Mask_indices
To indicate the dependency relationships of other varied parameters,
use attributes similar to ``@Mask_indices`` (such as ``@Temperature_indices``
or ``@Pressure_indices``).
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: :index:`NXcanSAS (applications); SASdata`
Obligatory value: ``SASdata``
.. index:: signal (group attribute)
**@signal**: (required) :ref:`NX_CHAR `
Name of the default data field.
Obligatory value:
* ``I``: For canSAS **SASdata**, this is always "I".
.. index:: I_axes (group attribute)
**@I_axes**: (required) :ref:`NX_CHAR `
String array that defines the independent data fields used in
the default plot for all of the dimensions of the *signal* field
(the *signal* field is the field in this group that is named by
the ``signal`` attribute of this group).
One entry is provided for every dimension of the ``I`` data object.
Such as::
@I_axes="Temperature", "Time", "Pressure", "Q", "Q"
Since there are five items in the list, the intensity field of this example
``I`` must be a five-dimensional array (rank=5).
.. index:: Q_indices (group attribute)
**@Q_indices**: (required) :ref:`NX_INT `
Integer or integer array that describes which indices
(of the :math:`I` data object) are used to
reference the ``Q`` data object. The items in this array
use zero-based indexing. Such as::
@Q_indices=1,3,4
which indicates that ``Q`` requires three indices
from the :math:`I` data object: one for time and
two for Q position. Thus, in this example, the
``Q`` data is time-dependent: :math:`\vec{Q}(t)`.
.. index:: mask (group attribute)
**@mask**: (required) :ref:`NX_CHAR `
Name of the data mask field.
.. see: https://github.com/nexusformat/definitions/issues/533
The data *mask* must have the same shape as the *data* field.
Positions in the mask correspond to positions in the *data* field.
The value of the mask field may be either a boolean array
where ``false`` means *no mask* and ``true`` means *mask*
or a more descriptive array as as defined in :ref:`NXdetector`.
.. index:: Mask_indices (group attribute)
**@Mask_indices**: (optional) :ref:`NX_CHAR `
Integer or integer array that describes which indices
(of the :math:`I` data object) are used to
reference the ``Mask`` data object. The items in this
array use zero-based indexing. Such as::
@Mask_indices=3,4
which indicates that Q requires two indices
from the :math:`I` data object for Q position.
.. index:: timestamp (group attribute)
**@timestamp**: (optional) :ref:`NX_DATE_TIME `
ISO-8601 time [#iso8601]_
.. index:: Q (field)
**Q**: (required) :ref:`NX_NUMBER ` {units=\ :ref:`NX_PER_LENGTH `}
.. index:: NXcanSAS (applications); Q
Array of :math:`Q` data to accompany :math:`I`.
.. figure:: canSAS/Q-geometry.jpg
:width: 60%
The :math:`\vec{Q}` geometry.
(:download:`full image `)
:math:`Q` may be represented as either
the three-dimensional scattering vector :math:`\vec{Q}`
or the magnitude of the scattering vector, :math:`|\vec{Q}|`.
.. math:: |\vec{Q}| = (4\pi/\lambda) sin(\theta)
When we write :math:`Q`, we may refer to either or both of
:math:`|\vec{Q}|`
or :math:`\vec{Q}`, depending on the context.
.. index:: units (field attribute)
**@units**: (required) :ref:`NX_CHAR `
Engineering units to use when expressing
:math:`Q` and related terms.
Data expressed in other units will generate
a warning from validation software and may not
be processed by some analysis software packages.
Any of these values:
* ``1/m``
* ``1/nm``: preferred
* ``1/angstrom``
.. index:: uncertainties (field attribute)
**@uncertainties**: (optional) :ref:`NX_CHAR `
(optional: for numerical arrays)
Names the dataset (in this SASdata group) that provides the
uncertainty to be used for data analysis.
The name of the dataset containing the :math:`Q` uncertainty
is flexible. The name must be unique in the *SASdata* group.
.. comment
see: https://github.com/canSAS-org/canSAS2012/issues/7
Such as::
@uncertainties="Q_uncertainties"
The *uncertainties* field will have the same *shape* (dimensions)
as the Q field.
These values are the estimates of uncertainty of each Q. By default,
this will be interpreted to be the estimated standard deviation.
In special cases, when a standard deviation cannot possibly be used,
its value can specify another measure of distribution width.
There may also be a subdirectory (optional) with constituent
components.
.. note:: To report distribution in reported :math:`Q` values,
use the ``@resolutions`` attribute. It is possible for both
``@resolutions`` and ``uncertainties`` to be reported.
.. index:: resolutions (field attribute)
**@resolutions**: (optional) :ref:`NX_CHAR `
.. index:: NXcanSAS (applications); resolutions
(optional: for numerical arrays)
Names the dataset (in this SASdata group) containing the :math:`Q` resolution.
The name of the dataset containing the :math:`Q` resolution
is flexible. The name must be unique in the *SASdata* group.
.. comment
see: https://github.com/canSAS-org/canSAS2012/issues/7
The *resolutions* field will have the same *shape* (dimensions)
as the Q field.
Generally, this is the principal resolution of each :math:`Q`.
Names the data object (in this SASdata group) that provides the
:math:`Q` resolution to be used for data analysis. Such as::
@resolutions="Qdev"
To specify two-dimensional resolution for slit-smearing geometry,
such as (*dQw*, *dQl*), use a string array, such as::
@resolutions="dQw", "dQl"
There may also be a subdirectory (optional) with constituent
components.
This pattern will demonstrate how to introduce further as-yet
unanticipated terms related to the data.
.. comment
see: https://github.com/nexusformat/definitions/issues/492#issuecomment-262813907
By default, the values of the resolutions data object are assumed to be
one standard deviation of any function used to approximate the
resolution function. This equates to the width of the gaussian
distribution if a Gaussian is chosen. See the ``@resolutions_description``
attribute.
.. note:: To report uncertainty in reported :math:`Q` values,
use the ``@uncertainties`` attribute. It is possible for both
``@resolutions`` and ``uncertainties`` to be reported.
.. index:: resolutions_description (field attribute)
**@resolutions_description**: (optional) :ref:`NX_CHAR `
(optional)
Generally, this describes the :math:`Q` ``@resolutions`` data object.
By default, the value is assumed to be "Gaussian". These are
suggestions:
* Gaussian
* Lorentzian
* Square :
note that the full width of the square would be ~2.9 times
the standard deviation specified in the vector
* Triangular
* Sawtooth-outward : vertical edge pointing to larger Q
* Sawtooth-inward vertical edge pointing to smaller Q
* Bin : range of values contributing
(for example, when 2-D detector data have been reduced
to a 1-D :math:`I(|Q|)` dataset)
For other meanings, it may be necessary to provide further details
such as the function used to assess the resolution.
In such cases, use additional datasets or a :ref:`NXnote` subgroup
to include that detail.
.. index:: I (field)
**I**: (required) :ref:`NX_NUMBER `
.. index:: NXcanSAS (applications); I
Array of intensity (:math:`I`) data.
The intensity may be represented in one of these forms:
**absolute units**: :math:`d\Sigma/d\Omega(Q)`
differential cross-section
per unit volume per unit solid angle (such as: 1/cm/sr or 1/m/sr)
**absolute units**: :math:`d\sigma/d\Omega(Q)`
differential cross-section
per unit atom per unit solid angle (such as: cm^2 or m^2)
**arbitrary units**: :math:`I(Q)`
usually a ratio of two detectors
but units are meaningless (such as: a.u. or counts)
This presents a few problems
for analysis software to sort out when reading the data.
Fortunately, it is possible to analyze the *units* to determine which type of
intensity is being reported and make choices at the time the file is read. But this is
an area for consideration and possible improvement.
One problem arises with software that automatically converts data into some canonical
units used by that software. The software should not convert units between these different
types of intensity indiscriminately.
A second problem is that when arbitrary units are used, then the set of possible
analytical results is restricted. With such units, no meaningful volume fraction
or number density can be determined directly from :math:`I(Q)`.
In some cases, it is possible to apply a factor to convert the arbitrary
units to an absolute scale. This should be considered as a possibility
of the analysis process.
Where this documentation says *typical units*, it is possible that small-angle
data may be presented in other units and still be consistent with NeXus.
See the :ref:`design-units` section.
.. index:: units (field attribute)
**@units**: (required) :ref:`NX_CHAR `
Engineering units to use when expressing
:math:`I` and intensity-related terms.
Data expressed in other units (or missing a ``@units`` attribute)
will be treated as ``arbitrary`` by some software packages.
For software using the UDUNITS-2 library, ``arbitrary`` will be
changed to ``unknown`` for handling with that library.
Any of these values:
* ``1/m``: includes m2/m3 and 1/m/sr
* ``1/cm``: includes cm2/cm3 and 1/cm/sr
* ``m2/g``
* ``cm2/g``
* ``arbitrary``
.. index:: uncertainties (field attribute)
**@uncertainties**: (optional) :ref:`NX_CHAR `
(optional: for numerical arrays)
Names the dataset (in this SASdata group) that provides the
uncertainty of :math:`I` to be used for data analysis.
The name of the dataset containing the :math:`I` uncertainty
is flexible. The name must be unique in the *SASdata* group.
.. comment
see: https://github.com/canSAS-org/canSAS2012/issues/7
Generally, this is the estimate of the uncertainty of each :math:`I`.
Typically the estimated standard deviation.
*Idev* is the canonical name from the 1D standard.
The NXcanSAS standard allows for the name to be described using this attribute.
Such as::
@uncertainties="Idev"
.. index:: scaling_factor (field attribute)
**@scaling_factor**: (optional) :ref:`NX_CHAR `
(optional)
Names the field (a.k.a. dataset) that contains a factor
to multiply ``I``. By default, this value is unity.
Should an uncertainty be associated with the scaling factor
field, the field containing that uncertainty would be
designated via the ``uncertainties`` attribute.
Such as::
I : NX_NUMBER
@uncertainties="Idev" : NX_CHAR
@scaling_factor="I_scaling" : NX_CHAR
Idev : NX_NUMBER
I_scaling : NX_NUMBER
@uncertainties="I_scaling_dev" : NX_CHAR
I_scaling_dev : NX_NUMBER
The exact names for ``I_scaling`` and ``I_scaling_dev`` are not
defined by NXcanSAS. The user has the flexibility to use names
different than those shown in this example.
.. index:: Idev (field)
**Idev**: (optional) :ref:`NX_NUMBER `
.. index:: NXcanSAS (applications); Idev
Estimated **uncertainty** (usually standard deviation)
in :math:`I`. Must have the same units as :math:`I`.
When present, the name of this field is also
recorded in the *uncertainties* attribute of *I*, as in::
I/@uncertainties="Idev"
.. index:: units (field attribute)
**@units**: (required) :ref:`NX_CHAR `
Engineering units to use when expressing
:math:`I` and intensity-related terms.
Data expressed in other units (or missing a ``@units`` attribute)
will generate a warning from any validation process
and will be treated as ``arbitrary`` by some analysis software packages.
For software using the UDUNITS-2 library, ``arbitrary`` will be
changed to ``unknown`` for handling with that library.
Any of these values:
* ``1/m``: includes m2/m3 and 1/m/sr
* ``1/cm``: includes cm2/cm3 and 1/cm/sr
* ``m2/g``
* ``cm2/g``
* ``arbitrary``
.. index:: Qdev (field)
**Qdev**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_PER_LENGTH `}
.. index:: NXcanSAS (applications); Qdev
Estimated :math:`Q` **resolution** (usually standard deviation).
Must have the same units as :math:`Q`.
When present, the name of this field is also
recorded in the *resolutions* attribute of *Q*,
as in::
Q/@resolutions="Qdev"
or::
Q/@resolutions="dQw", "dQl"
.. index:: units (field attribute)
**@units**: (required) :ref:`NX_CHAR `
Engineering units to use when expressing
:math:`Q` and related terms.
Data expressed in other units may not be processed by some
software packages.
Any of these values:
* ``1/m``
* ``1/nm``: preferred
* ``1/angstrom``
.. index:: dQw (field)
**dQw**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_PER_LENGTH `}
.. index:: NXcanSAS (applications); dQw
:math:`Q` **resolution** along the axis of scanning
(the high-resolution *slit width* direction).
Useful for defining resolution data from
slit-smearing instruments such as Bonse-Hart geometry.
Must have the same units as :math:`Q`.
When present, the name of this field is also
recorded in the *resolutions* attribute of *Q*,
as in::
Q/@resolutions="dQw", "dQl"
.. index:: units (field attribute)
**@units**: (required) :ref:`NX_CHAR `
Engineering units to use when expressing
:math:`Q` and related terms.
Data expressed in other units may not be processed by some
software packages.
Any of these values:
* ``1/m``
* ``1/nm``: preferred
* ``1/angstrom``
.. index:: dQl (field)
**dQl**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_PER_LENGTH `}
.. index:: NXcanSAS (applications); dQl
:math:`Q` **resolution** perpendicular to the axis of scanning
(the low-resolution *slit length* direction).
Useful for defining resolution data from
slit-smearing instruments such as Bonse-Hart geometry.
Must have the same units as :math:`Q`.
When present, the name of this field is also
recorded in the *resolutions* attribute of *Q*,
as in::
Q/@resolutions="dQw", "dQl"
.. index:: units (field attribute)
**@units**: (required) :ref:`NX_CHAR `
Engineering units to use when expressing
:math:`Q` and related terms.
Data expressed in other units may not be processed by some
software packages.
Any of these values:
* ``1/m``
* ``1/nm``: preferred
* ``1/angstrom``
.. index:: Qmean (field)
**Qmean**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_PER_LENGTH `}
Mean value of :math:`Q` for this data point.
Useful when describing data that has been
binned from higher-resolution data.
It is expected that ``Q`` is provided
and that both ``Q`` and ``Qmean`` will have the same units.
.. index:: units (field attribute)
**@units**: (required) :ref:`NX_CHAR `
Engineering units to use when expressing
:math:`Q` and related terms.
Data expressed in other units may not be processed by some
software packages.
Any of these values:
* ``1/m``
* ``1/nm``: preferred
* ``1/angstrom``
.. index:: ShadowFactor (field)
**ShadowFactor**: (optional) :ref:`NX_CHAR ` {units=\ :ref:`NX_DIMENSIONLESS `}
A numerical factor applied to pixels affected by the beam stop penumbra.
Used in data files from NIST/NCNR instruments.
See: J.G. Barker and J.S. Pedersen (1995) *J. Appl. Cryst.* **28**, 105-114.
**(instrument)**: (optional) :ref:`NXinstrument`
Description of the small-angle scattering instrument.
Consider, carefully, the relevance to the SAS data analysis process
when adding subgroups in this **NXinstrument** group. Additional information
can be added but will likely be ignored by standardized data anlysis processes.
The NeXus :ref:`NXbeam` base class may be added as a subgroup of this **NXinstrument**
group *or* as a subgroup of the **NXsample** group to describe properties of the beam at any
point downstream from the source.
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: :index:`NXcanSAS (applications); SASinstrument`
Obligatory value: ``SASinstrument``
**(aperture)**: (optional) :ref:`NXaperture`
:ref:`NXaperture` is generic and limits the variation in data files.
Possible NeXus base class alternatives are: :ref:`NXpinhole` or :ref:`NXslit`.
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: :index:`NXcanSAS (applications); SASaperture`
Obligatory value: ``SASaperture``
.. index:: shape (field)
**shape**: (required) :ref:`NX_CHAR `
describe the type of aperture (pinhole, 4-blade slit, Soller slit, ...)
.. index:: x_gap (field)
**x_gap**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_LENGTH `}
opening along the :math:`x` axis
.. index:: y_gap (field)
**y_gap**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_LENGTH `}
opening along the :math:`y` axis
**(collimator)**: (optional) :ref:`NXcollimator`
Description of a collimating element (defines the divergence of the beam) in the instrument.
To document a slit, pinhole, or the beam, refer to the
documentation of the ``NXinstrument`` group above.
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: :index:`NXcanSAS (applications); SAScollimation`
Obligatory value: ``SAScollimation``
.. index:: length (field)
**length**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_LENGTH `}
Amount/length of collimation inserted (as on a SANS instrument)
.. index:: distance (field)
**distance**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_LENGTH `}
Distance from this collimation element to the sample
**(detector)**: (optional) :ref:`NXdetector`
Description of a detector in the instrument.
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: :index:`NXcanSAS (applications); SASdetector`
Obligatory value: ``SASdetector``
.. index:: name (field)
**name**: (required) :ref:`NX_CHAR `
Identifies the name of this detector
.. index:: SDD (field)
**SDD**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_LENGTH `}
Distance between sample and detector.
Note: In NXdetector, the ``distance`` field records the
distance to the previous component ... most often the sample.
This use is the same as ``SDD`` for most SAS
instruments but not all. For example, Bonse-Hart cameras
have one or more crystals between the sample and detector.
We define here the field ``SDD`` to document without
ambiguity the distance between sample and detector.
.. index:: slit_length (field)
**slit_length**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_PER_LENGTH `}
Slit length of the instrument for this detector,
expressed in the same units as :math:`Q`.
.. index:: x_position (field)
**x_position**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_LENGTH `}
Location of the detector in :math:`x`
.. index:: y_position (field)
**y_position**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_LENGTH `}
Location of the detector in :math:`y`
.. index:: roll (field)
**roll**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_ANGLE `}
Rotation of the detector about the :math:`z` axis (roll)
.. index:: pitch (field)
**pitch**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_ANGLE `}
Rotation of the detector about the :math:`x` axis (roll)
.. index:: yaw (field)
**yaw**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_ANGLE `}
Rotation of the detector about the :math:`y` axis (yaw)
.. index:: beam_center_x (field)
**beam_center_x**: (optional) :ref:`NX_FLOAT ` {units=\ :ref:`NX_LENGTH `}
Position of the beam center on the detector.
This is the x position where the direct beam would hit the detector plane.
This is a length and can be outside of the actual
detector. The length can be in physical units or pixels
as documented by the units attribute. The value can be any
real number (positive, zero, or negative).
.. index:: beam_center_y (field)
**beam_center_y**: (optional) :ref:`NX_FLOAT ` {units=\ :ref:`NX_LENGTH `}
Position of the beam center on the detector.
This is the y position where the direct beam would hit the detector plane.
This is a length and can be outside of the actual
detector. The length can be in physical units or pixels
as documented by the units attribute. The value can be any
real number (positive, zero, or negative).
.. index:: x_pixel_size (field)
**x_pixel_size**: (optional) :ref:`NX_FLOAT ` {units=\ :ref:`NX_LENGTH `}
Size of each detector pixel. If it is scalar all pixels are the same size
.. index:: y_pixel_size (field)
**y_pixel_size**: (optional) :ref:`NX_FLOAT ` {units=\ :ref:`NX_LENGTH `}
Size of each detector pixel. If it is scalar all pixels are the same size
**(source)**: (optional) :ref:`NXsource`
Description of the radiation source.
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: :index:`NXcanSAS (applications); SASsource`
Obligatory value: ``SASsource``
.. index:: radiation (field)
**radiation**: (required) :ref:`NX_CHAR `
Name of the radiation used.
Note that this is **not** the name of the facility!
Any of these values:
* ``Spallation Neutron Source``
* ``Pulsed Reactor Neutron Source``
* ``Reactor Neutron Source``
* ``Synchrotron X-ray Source``
* ``Pulsed Muon Source``
* ``Rotating Anode X-ray``
* ``Fixed Tube X-ray``
* ``UV Laser``
* ``Free-Electron Laser``
* ``Optical Laser``
* ``Ion Source``
* ``UV Plasma Source``
* ``neutron``
* ``x-ray``
* ``muon``
* ``electron``
* ``ultraviolet``
* ``visible light``
* ``positron``
* ``proton``
.. index:: beam_shape (field)
**beam_shape**: (optional) :ref:`NX_CHAR `
Text description of the shape of the beam (incident on the sample).
.. index:: incident_wavelength (field)
**incident_wavelength**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_WAVELENGTH `}
wavelength (:math:`\lambda`) of radiation incident on the sample
.. index:: wavelength_min (field)
**wavelength_min**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_WAVELENGTH `}
Some facilities specify wavelength using a range.
This is the lowest wavelength in such a range.
.. index:: wavelength_max (field)
**wavelength_max**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_WAVELENGTH `}
Some facilities specify wavelength using a range.
This is the highest wavelength in such a range.
.. index:: incident_wavelength_spread (field)
**incident_wavelength_spread**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_WAVELENGTH `}
Some facilities specify wavelength using a range.
This is the width (FWHM) of such a range.
.. index:: beam_size_x (field)
**beam_size_x**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_LENGTH `}
Size of the incident beam along the x axis.
.. index:: beam_size_y (field)
**beam_size_y**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_LENGTH `}
Size of the incident beam along the y axis.
**(sample)**: (optional) :ref:`NXsample`
Description of the sample.
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: :index:`NXcanSAS (applications); SASsample`
Obligatory value: ``SASsample``
.. index:: name (field)
**name**: (required) :ref:`NX_CHAR `
**ID**: Text string that identifies this sample.
.. index:: thickness (field)
**thickness**: (optional) :ref:`NX_FLOAT ` {units=\ :ref:`NX_LENGTH `}
Thickness of this sample
.. index:: transmission (field)
**transmission**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_DIMENSIONLESS `}
Transmission (:math:`I/I_0`) of this sample.
There is no *units* attribute as this number is dimensionless.
Note: the ability to store a transmission *spectrum*,
instead of a single value, is provided elsewhere in the structure,
in the *SAStransmission_spectrum* element.
.. index:: temperature (field)
**temperature**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_TEMPERATURE `}
Temperature of this sample.
.. index:: details (field)
**details**: (optional) :ref:`NX_CHAR `
Any additional sample details.
.. index:: x_position (field)
**x_position**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_LENGTH `}
Location of the sample in :math:`x`
.. index:: y_position (field)
**y_position**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_LENGTH `}
Location of the sample in :math:`y`
.. index:: roll (field)
**roll**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_ANGLE `}
Rotation of the sample about the :math:`z` axis (roll)
.. index:: pitch (field)
**pitch**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_ANGLE `}
Rotation of the sample about the :math:`x` axis (roll)
.. index:: yaw (field)
**yaw**: (optional) :ref:`NX_NUMBER ` {units=\ :ref:`NX_ANGLE `}
Rotation of the sample about the :math:`y` axis (yaw)
**(process)**: (optional) :ref:`NXprocess`
Description of a processing or analysis step.
Add additional fields as needed to describe value(s) of any
variable, parameter, or term related to the *SASprocess* step.
Be sure to include *units* attributes for all numerical fields.
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: :index:`NXcanSAS (applications); SASprocess`
Obligatory value: ``SASprocess``
.. index:: name (field)
**name**: (optional) :ref:`NX_CHAR `
Optional name for this data processing or analysis step
.. index:: date (field)
**date**: (optional) :ref:`NX_DATE_TIME `
Optional date for this data processing or analysis step. [#iso8601]_
.. [#iso8601] ISO-8601 standard time representation.
NeXus dates and times are reported in ISO-8601
(e.g., ``yyyy-mm-ddThh:mm:ss``)
or modified ISO-8601 (e.g., ``yyyy-mm-dd hh:mm:ss``).
See: http://www.w3.org/TR/NOTE-datetime
or http://en.wikipedia.org/wiki/ISO_8601 for more details.
.. index:: description (field)
**description**: (optional) :ref:`NX_CHAR `
Optional description for this data processing or analysis step
.. index:: term (field)
**term**: (optional) :ref:`NX_CHAR `
Specifies the value of a single variable, parameter,
or term (while defined here as a string, it could be a number)
related to the *SASprocess* step.
Note:
The name *term* is not required, it could take any name,
as long as the name is unique within this group.
**(note)**: (optional) :ref:`NXnote`
Any additional notes or subprocessing steps will be documented here.
An **NXnote** group can be added to any NeXus group at or below the
**NXentry** group. It is shown here as a suggestion of a good place
to *consider* its use.
**(collection)**: (optional) :ref:`NXcollection`
Describes anything about *SASprocess* that is not already described.
Any content not defined in the canSAS standard can be placed at this point.
Note:
The name of this group is flexible, it could take any name,
as long as it is unique within the **NXprocess** group.
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: :index:`NXcanSAS (applications); SASprocessnote`
Obligatory value: ``SASprocessnote``
**(collection)**: (optional) :ref:`NXcollection`
Free form description of anything not covered by other elements.
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: :index:`NXcanSAS (applications); SASnote`
Obligatory value: ``SASnote``
**(data)**: (optional) :ref:`NXdata`
The *SAStransmission_spectrum* element
This describes certain data obtained from a variable-wavelength source
such as pulsed-neutron source.
The name of each *SAStransmission_spectrum* group must be unique within a SASentry group.
Suggest using names such as ``sastransmission_spectrum01``.
.. index:: canSAS_class (group attribute)
**@canSAS_class**: (required) :ref:`NX_CHAR `
Official canSAS group: :index:`NXcanSAS (applications); SAStransmission_spectrum`
Obligatory value: ``SAStransmission_spectrum``
.. index:: signal (group attribute)
**@signal**: (required) :ref:`NX_CHAR `
Name of the default data field.
Obligatory value:
* ``T``: For **SAStransmission_spectrum**, this is always "T".
.. index:: T_axes (group attribute)
**@T_axes**: (required) :ref:`NX_CHAR `
Obligatory value:
* ``T``: the wavelengths field (as a dimension scale) corresponding to this transmission
.. index:: name (group attribute)
**@name**: (required) :ref:`NX_CHAR `
Identify what type of spectrum is being described.
It is expected that this value will take either of these two values:
====== ==============================================
value meaning
====== ==============================================
sample measurement with the sample and container
can measurement with just the container
====== ==============================================
.. index:: timestamp (group attribute)
**@timestamp**: (optional) :ref:`NX_DATE_TIME `
ISO-8601 time [#iso8601]_
.. index:: lambda (field)
**lambda**: (required) :ref:`NX_NUMBER ` {units=\ :ref:`NX_WAVELENGTH `}
Wavelength of the radiation.
This array is of the same shape as ``T`` and ``Tdev``.
.. index:: T (field)
**T**: (required) :ref:`NX_NUMBER ` {units=\ :ref:`NX_DIMENSIONLESS `}
Transmission values (:math:`I/I_0`)
as a function of wavelength.
This array is of the same shape as ``lambda`` and ``Tdev``.
.. index:: uncertainties (field attribute)
**@uncertainties**: (required) :ref:`NX_CHAR `
Names the dataset (in this SASdata group) that provides the
uncertainty of each transmission :math:`T` to be used for data analysis.
The name of the dataset containing the :math:`T` uncertainty
is expected to be ``Tdev``.
.. comment
see: https://github.com/canSAS-org/canSAS2012/issues/7
Typically:
@uncertainties="Tdev"
.. index:: Tdev (field)
**Tdev**: (required) :ref:`NX_NUMBER ` {units=\ :ref:`NX_DIMENSIONLESS `}
.. index:: NXcanSAS (applications); Tdev
Estimated uncertainty (usually standard deviation)
in :math:`T`. Must have the same units as :math:`T`.
This is the field is named in the *uncertainties* attribute of *T*, as in::
T/@uncertainties="Tdev"
This array is of the same shape as ``lambda`` and ``T``.
**NXDL Source**:
https://github.com/nexusformat/definitions/blob/master/applications/NXcanSAS.nxdl.xml