cansas1d documentation: Difference between revisions

From canSAS
m (moved cansas1d_definition_of_terms to its own page)
(point to all the block diagrams)
Line 39: Line 39:


[[Image:cansas1d-v1-1-SASroot.png | block diagram at SASroot level]]
[[Image:cansas1d-v1-1-SASroot.png | block diagram at SASroot level]]
===block diagrams===
There are other block diagrams available:
*[[cansas1d-v1-1-SASroot.png | SASroot]]
** SASentry
***[[cansas1d-v1-2-SASdata.png | SASdata]]
**[[cansas1d-v1-3-SASsample.png | SASsample]]
**[[cansas1d-v1-4-SASinstrument.png | SASinstrument]]
***[[cansas1d-v1-5-SASsource.png | SASsource]]
***[[cansas1d-v1-6-SAScollimation.png | SAScollimation]]
***[[cansas1d-v1-7-SASdetector.png | SASdetector]]
**[[cansas1d-v1-8-SASprocess.png | SASprocess]]
* [[cansas1d-v1-9-full.png | full block diagram]]


===each data set: layout of the SASentry===
===each data set: layout of the SASentry===

Revision as of 17:25, 11 February 2008

Disclaimer

This description is meant to inform the community how to layout the information within the XML files. However, should the information in this document and the 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

<?xml version="1.0"?>
<SASroot version="1.0"
	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"
	>

alternative XML file header (referencing a stylesheet)

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="example.xsl" ?>
<SASroot version="1.0"
	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"
	>

overall file: layout of SASroot

After the XML header, the root element of the file is SASroot which contains one or more SASentry elements, each of which describes a single experiment (data set, time-slice, step in a series, new sample, etc.). Details of the SASentry element are also shown in the next figure.

block diagram at SASroot level

block diagrams

There are other block diagrams available:

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

See cansas1d_definition_of_terms for the complete list of terms (XML elements and XML attributes) in the canSAS 1-D standard.

rules

  1. Q=(4 π / λ) sin(θ)
    where λ is the wavelength of the radiation and 2θ is the angle through which the detected radiation has been scattered.
  2. units to be given in standard SI abbreviations (eg, m, cm, mm, nm, K) with the following exceptions:
    1. um=micrometres
    2. C=celsius
    3. A=Angstroms
    4. percent=%.
    5. fraction
    6. a.u.=arbitrary units
    7. none=no units are relevant (such as dimensionless)
  3. where reciprocal units need to be quoted the format shall be "1/abbreviation"
  4. Unicode characters MUST NOT be used
  5. axes:
    1. z is along the flight path (positive value in the direction of the detector)
    2. x is orthogonal to z in the horizontal plane (positive values increase to the right when viewed towards the incoming radiation)
    3. y is orthogonal to z and x in the vertical plane (positive values increase upwards)
  6. angles:
    1. roll is about z
    2. pitch is about x
    3. yaw is about y

Validation of XML against the Schema

  1. open browser to: http://www.xmlvalidation.com/
  2. paste content of candidate XML file (with reference in the header to the XML Schema as shown above) into the form
  3. press <validate>
  4. paste content of cansas1d.xsd XSD file into form and press <continue validation>
  5. check the results