cansas1d documentation: Difference between revisions

From canSAS
(starting to add definitions)
(point at tagged version)
 
(91 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Disclaimer==
This manual has been superseded (replaced) by a PDF:


This description is meant to inform the community how to layout
http://svn.smallangles.net/trac/canSAS/browser/1dwg/tags/v1.0/doc/cansas-1d-1_0-manual.pdf?format=raw
the information within the XML files.  However, should the
information in this document and the [[cansas1d.xsd | canSAS 1D SAS XML Schema]]
differ, the XML Schema will be deemed to have the most correct description
of the standard.
 
==General Layout of the XML Data==
 
===required XML file header===
<pre>
<?xml version="1.0"?>
<SASroot version="1.0">
</pre>
 
===alternative XML file header (referencing a stylesheet)===
<pre>
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="example.xsl" ?>
<SASroot version="1.0">
</pre>
 
===overall file: layout of SASroot===
*SASroot
**SASentry
**SASentry
**SASentry ... (for each data set, time-slice, step in a series, new sample, etc.)
 
===each data set: layout of the SASentry===
 
*SASentry
**Title
**Run
**SASdata (this is where the reduced 1-D SAS data is stored)
**SASsample
**SASinstrument
**SASprocess
**SASprocess
**SASprocess... (for each processing or analysis step)
**SASnote
**SASnote
**SASnote... (anything at all)
 
==Definition of terms==
 
Note: Each term is listed by its [http://www.w3schools.com/xpath/ XPath] in the XML file.
 
;term:quantity <br> description
;<TT>@unit</TT>: Data unit to be given in standard SI abbreviations (e.g., m, cm, mm, nm, K) with the following exceptions: um=micrometres C=celsius A=Angstroms percent=%. fraction a.u.=arbitrary units none=no units are relevant (such as dimensionless) <br />
 
;<TT>x, y, z</TT>: Coordinates for (x, y, z) values representing a position or dimension. Unit must be specified for each. <br />
 
;<TT>position/x</TT>: [0..1] Translation in the horizontal direction, orthogonal to Y and Z. Positive X direction increases as defined by Y and Z. Unit must be specified. <br />
 
;<TT>position/y</TT>: [0..1] Translation along the vertical gravitational direction. Positive direction increases upward. Unit must be specified. <br />
 
;<TT>position/z</TT>: [0..1] Translation along the beam direction. Positive direction increases from source towards detector. Unit must be specified. <br />
 
;<TT>roll, pitch, yaw</TT>: Coordinates for (roll, pitch, yaw) values representing an orientation or rotation. Unit must be specified for each. <br />
 
;<TT>orientation/roll</TT>: [0..1] Rotation about about the Z axis. Unit must be specified. <br />
 
;<TT>orientation/pitch</TT>: [0..1] Rotation about about the X axis. Unit must be specified. <br />
 
;<TT>orientation/yaw</TT>: [0..1] Rotation about about the Y axis. Unit must be specified. <br />
 
;<TT>/SASroot/SASentry/SASdata/Idata/Q</TT>: [1..1] Q = (4 pi / lambda) sin(theta) where lambda is the wavelength of the radiation and 2theta is the angle through which the detected radiation has been scattered. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASdata/Idata/I</TT>: [1..1] Intensity of the detected radiation. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASdata/Idata/Qdev</TT>: [0..1] Estimated standard deviation of Q. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASdata/Idata/Idev</TT>: [1..1] Estimated standard deviation of I. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASdata/Idata/Qfwhm</TT>: [0..1] Q resolution of this datum, defined as full-width in Q at half-maximum intensity. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASdata/Idata/Qmean</TT>: [0..1] Mean value of Q for this datum. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASdata/Idata/Shadowfactor</TT>: [0..1] Describes the adjustment due to the beam stop penumbra. (This definition needs revision. NIST?) <br />
 
;<TT>/SASroot/SASentry/SASdata/Idata</TT>: [1..inf] Idata describes a single SAS data point. <br />
 
;<TT>/SASroot/SASentry/SASdata/@name</TT>: [0..1] Optional string attribute to identify this particular SASdata. <br />
 
;<TT>/SASroot/SASentry/SASsample/ID</TT>: [1..1] Text string that identifies this sample. <br />
 
;<TT>/SASroot/SASentry/SASsample/thickness</TT>: [0..1] Thickness of this sample. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASsample/transmission</TT>: [0..1] Transmission (1-attenuation) of this sample. Express this as a fraction, not as a percentage. <br />
 
;<TT>/SASroot/SASentry/SASsample/temperature</TT>: [0..1] Temperature of this sample. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASsample/position</TT>: [0..1] Location in X, Y, and Z of the sample. Must specify the unit as an attribute to each position. <br />
 
;<TT>/SASroot/SASentry/SASsample/orientation</TT>: [0..1] Orientation (rotation) of the sample. Must specify the unit as an attribute to each angle. <br />
 
;<TT>/SASroot/SASentry/SASsample/details</TT>: [0..inf] Text string to supply additional sample details.<br />
 
;<TT>/SASroot/SASentry/SASsample/@name</TT>: [0..1] Optional attribute to name this sample. (Should be the same as SASsample/ID) <br />
 
;<TT>/SASroot/SASentry/SASinstrument/SASdetector/name</TT>: [1..1] Name of the detector.<br />
 
;<TT>/SASroot/SASentry/SASinstrument/SASdetector/SDD</TT>: [0..1] Distance between sample and detector. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASinstrument/SASdetector/offset</TT>: [0..1] Offset of the detector position in X, Y, and Z. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASinstrument/SASdetector/orientation</TT>: [0..1] Orientation (rotation) of the detector in roll, pitch, and yaw. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASinstrument/SASdetector/beam_center</TT>: [0..1] Center of the beam on the detector in X and Y. (Z offset is allowed but does not make sense for small-angle scattering.) Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASinstrument/SASdetector/pixel_size</TT>: [0..1] Size of detector pixels in X and Y. (Z size is allowed but does not make sense for small-angle scattering.) Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASinstrument/SASdetector/slit_length</TT>: [0..1] Slit length of the instrument for this detector. Must specify the unit as an attribute. <br />
 
;<TT>/SASroot/SASentry/SASinstrument/name</TT>: [1..1] Name of the instrument.<br />
 
;<TT>/SASroot/SASentry/SASinstrument/SASsource</TT>: [] Description of the source of the radiation. <br />
 
;<TT>/SASroot/SASentry/SASinstrument/SAScollimation</TT>: [] Description of the instrument collimation. <br />
 
;<TT>/SASroot/SASentry/SASinstrument/SASdetector</TT>: [1..inf] Description of a single or composite detector. <br />
 
;<TT>/SASroot/SASentry/Title</TT>: [1..1] Title of this SASentry.<br />
 
;<TT>/SASroot/SASentry/Run</TT>: [1..inf] Run identification for this SASentry. For many facilities, this is an integer. Use multiple instances of Run as needed. How to correlate this with SASinstrument configurations has not yet been defined. <br />
 
;<TT>/SASroot/SASentry/SASdata</TT>: [1..inf] Reduced 1-D SAS data for this SASentry. Use multiple SASdata elements to represent multiple frames. <br />
 
;<TT>/SASroot/SASentry/SASsample</TT>: [] Description of the sample.<br />
 
;<TT>/SASroot/SASentry/SASinstrument</TT>: [1..1] Description of the instrument.<br />
 
;<TT>/SASroot/SASentry/SASprocess</TT>: [0..inf] Description of a processing or analysis step. <br />
 
;<TT>/SASroot/SASentry/SASnote</TT>: [1..] Free form description of anything not covered by other elements. <br />
 
;<TT>/SASroot/SASentry/@name</TT>: [0..1] Optional string attribute to identify this particular SASentry. <br />
 
;<TT>/SASroot/SASentry</TT>: [1..] A single SAS scan is reported in a SASentry. A SASentry can use the optional "name" attribute to provide a string for this SASentry. Use of this string is not defined by this standard. <br />
 
;<TT>/SASroot/@version</TT>: [1..1] Required attribute to indicate the version of the standard to which this XML document is encoded. version="1.0" <br />
 
;<TT>/SASroot</TT>: [1..1] The canSAS reduced 1-D SAS data will be in the SASroot database. This is similar to NXroot used by NeXus. <br />
 
==attributes==
 
;<tt>name</tt>:
;<tt>type</tt>:
;<tt>unit</tt>:
;<tt>version</tt>:
 
==rules==
# no whitespace padding of value fields
# Q=(4 &pi; / &lambda;) sin(&theta;) <br> where &lambda; is the wavelength of the radiation and 2&theta; is the angle through which the detected radiation has been scattered.
# units to be given in standard SI abbreviations (eg, m, cm, mm, nm, K) with the following exceptions:
##um=micrometres
##C=celsius
##A=Angstroms
##percent=%.
##fraction
##a.u.=arbitrary units
##none=no units are relevant (such as dimensionless)
# where reciprocal units need to be quoted the format shall be "1/abbreviation"
# Unicode characters MUST NOT be used
# axes:
##z is along the flight path (positive value in the direction of the detector)
##x is orthogonal to z in the horizontal plane (positive values increase to the right when viewed towards the incoming radiation)
##y is orthogonal to z and x in the vertical plane (positive values increase upwards)
#angles:
##roll is about z
##pitch is about x
##yaw is about y
 
==Validation of XML against the Schema==
# open browser to:  http://www.xmlvalidation.com/
# paste content of candidate XML file into the form
# replace standard canSAS1D XML header with canSAS1D XML Schema validation header (see below)
# press <validate>
# paste content of [[cansas1d.xsd]] XSD file into form and press <continue validation>
# check the results
 
==alternative XML header for validating against the XML Schema==
<pre><?xml version="1.0"?>
<SASroot xmlns="http://www.smallangles.net/cansas1d"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.smallangles.net/cansas1d/ http://www.smallangles.net/cansas1d/1.0/cansas1d.xsd"
version="1.0">
</pre>

Latest revision as of 04:39, 30 November 2009