cansas1d documentation: Difference between revisions

From canSAS
(rearrange things a bit)
mNo edit summary
Line 58: Line 58:
</SASroot>
</SASroot>
</pre>
</pre>


===block diagrams===
===block diagrams===
Line 75: Line 74:
** SASnote (anything at all)
** SASnote (anything at all)
* [[media:cansas1d-v1-9-full.png | full block diagram]]
* [[media:cansas1d-v1-9-full.png | full block diagram]]


==Definition of terms==
==Definition of terms==
Line 80: Line 80:
See [[cansas1d_definition_of_terms]] for the complete list of terms (XML elements and XML attributes) in the canSAS 1-D standard.
See [[cansas1d_definition_of_terms]] for the complete list of terms (XML elements and XML attributes) in the canSAS 1-D standard.


==rules==
==Rules==
# 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.
# 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:  
# units to be given in standard SI abbreviations (eg, m, cm, mm, nm, K) with the following exceptions:  
Line 96: Line 96:
##x is orthogonal to z in the horizontal plane (positive values increase to the right when viewed towards the incoming radiation)
##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)
##y is orthogonal to z and x in the vertical plane (positive values increase upwards)
#angles:  
#orientation (angles):  
##roll is about z
##roll is about z
##pitch is about x
##pitch is about x

Revision as of 17:45, 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. Refer to the block diagram at SASroot level for an alternative depiction.

<?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"
	>
  <SASentry name="071121.dat#S22">
    <!-- contents of the first experiment in the file go here -->
  </SASentry>
  <SASentry name="name attribute is optional">
    <!-- any number of additional experiments can be included, as desired -->
  </SASentry>
</SASroot>

block diagrams

There are block diagrams available to describe the standard:


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. orientation (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