cansas1d-template.xml: Difference between revisions

From canSAS
m (reverted Idata back to [1..inf] -- MUST have at least one data point since this is the main reason for this format)
(moved all documentation to documentation page, eliminated nonsense elements from template (the template does not show the rules but is used to test them))
Line 1: Line 1:
<pre>
<pre>
<?xml version="1.0"?>
<?xml version="1.0"?>
<SASroot xmlns="http://www.smallangles.net/cansas1d"
<?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"
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"
xsi:schemaLocation="http://www.smallangles.net/cansas1d/ http://www.smallangles.net/cansas1d/1.0/cansas1d.xsd"
version="1.0">
>
<!--
<!--
  file: cansas1d-template.xml
  file: cansas1d-template.xml
  purpose: Template file for canSAS 1-D reduced SAS XML data format
  purpose: Template file for canSAS 1-D reduced SAS XML data format
  notes:  Each element in the standard is shown with a comment embedded.
  notes:  Each element in the standard is shown, some with comments.
          The comment indicates the name of the element,
          how many times the element can be used,
          and a short description.
            [0..1] : element is optional but can only appear once within enclosing element
            [1..1] : element is required and can only appear once within enclosing element
            [1..inf] : element is required but can appear as many times as needed within enclosing element
            [0..inf] : element is optional and can appear as many times as needed within enclosing element
            [] : element is optional, number of appearances within enclosing element is not specified
          All elements, when present, must appear in the order shown below.
          All elements, when present, must appear in the order shown below.
          When shown in the template below, the "unit" attribute is required.
          When shown in the template below, the "unit" attribute is required.
Line 22: Line 16:
          http://www.smallangles.net/wgwiki/index.php/cansas1d_documentation#Validation_of_XML_against_the_Schema
          http://www.smallangles.net/wgwiki/index.php/cansas1d_documentation#Validation_of_XML_against_the_Schema
-->
-->
<!--* SASroot: [1..1] required name of the type of data in this file, 'version="1.0"' is a required attribute -->
<SASentry name="this name is optional">
<SASentry name="this name is optional">
<!--* SASentry: [1..inf] a single SAS scan -->
<!--* SASentry: [1..inf] a single SAS scan -->
<Title><!--* [1..1] title of this SAS scan --></Title>
<!-- repeat SASentry for as many scans as needed -->
<Run><!--* [1..inf] run (number or text) of this SAS scan --></Run>
<Title>Title of the scan goes here.</Title>
<Run>Could be a number or text</Run>
<SASdata name="this name is optional">
<SASdata name="this name is optional">
<!--* SASdata: [1..1] required, contains all the SAS data for this SAS scan -->
<Idata>
<Idata>
<!--* Idata: [1..inf] row of SAS data -->
<!--* Idata: contains one SAS data point -->
<Q unit="1/A"><!--* Q: [1..1] Q value for this row -->0.02</Q>
<Q unit="1/A">0.02</Q>
<I unit="1/cm"><!--* I: [1..1] Intensity value for this row -->1000</I>
<I unit="1/cm">1000</I>
<Qdev unit="1/A"><!--* Qdev: [1..1] Qdev value for this row -->0.01</Qdev>
<Qdev unit="1/A">0.01</Qdev>
<Idev unit="1/cm"><!--* Idev: [1..1] Idev value for this row -->3</Idev>
<Idev unit="1/cm">3</Idev>
<Qfwhm unit="1/A"><!--* Qfwhm: [0..1] Qfwhm value for this row --></Qfwhm>
<Qfwhm unit="1/A" /><!-- optional -->
<Qmean unit="1/A"><!--* Qmean: [0..1] Qmean value for this row --></Qmean>
<Qmean unit="1/A" /><!-- optional -->
<Shadowfactor><!--*  Shadowfactor: [0..1] beam stop Shadowfactor value for this row --></Shadowfactor>
<Shadowfactor /><!-- optional -->
</Idata>
<Idata>
<!-- repeat Idata for as many data points as needed -->
<Q unit="1/A">0.03</Q><I unit="1/cm">989</I><Qdev unit="1/A">0.01</Qdev><Idev unit="1/cm">3</Idev>
</Idata>
</Idata>
</SASdata>
</SASdata>
<SASsample name="this name is optional">
<SASsample name="this name is optional">
<!--* SASsample: [] description of the sample -->
<ID>SI600-new-long</ID>
<ID><!--* ID: [1..1] required, sample ID -->SI600-new-long</ID>
<thickness unit="mm">1.03</thickness>
<thickness unit="mm"><!--* thickness: [0..1] sample thickness -->1.03</thickness>
<transmission>0.327 <!-- unit is always fraction: do not specify a "unit" --></transmission>
<transmission><!--* transmission: [0..1] sample transmission -->0.327</transmission>
<temperature unit="C">22.0000</temperature>
<temperature unit="C"><!--* temperature: [0..1] sample temperature -->0.0000</temperature>
<position name="this name is optional">
<position name="this name is optional">
<!--* position: [0..1] sample translation, name is optional -->
<x unit="mm">10.00</x>
<x unit="mm"><!--* x: [0..1] sample X position -->10.00</x>
<y unit="mm">0.00</y>
<y unit="mm"><!--* y: [0..1] sample Y position -->0.00</y>
<z unit="mm"><!--* z: [0..1] sample Z position -->0.00</z>
</position>
</position>
<orientation name="this name is optional">
<orientation name="this name is optional">
<!--* orientation: [0..1] sample rotation, name is optional -->
<roll unit="degree">22.5</roll>
<roll unit="degree"><!--* roll: [0..1] sample roll -->22.5</roll>
<pitch unit="degree">0.020</pitch>
<pitch unit="degree"><!--* pitch: [0..1] sample pitch -->0.020</pitch>
<yaw unit="degree">0.020</yaw>
<yaw unit="degree"><!--* yaw: [0..1] sample yaw -->0.020</yaw>
</orientation>
</orientation>
<details>
<details>
<!--* details: [0..inf] free form description of the sample -->
http://chemtools.chem.soton.ac.uk/projects/blog/blogs.php/bit_id/2720
http://chemtools.chem.soton.ac.uk/projects/blog/blogs.php/bit_id/2720
</details>
</details>
</SASsample>
</SASsample>
<SASinstrument name="this name is optional">
<SASinstrument>
<!--* SASinstrument: [] description of the instrument -->
<name>canSAS instrument</name>
<name>canSAS instrument</name>
<SASsource>
<SASsource>
<!--* SASsource: [] description of the radiation source -->
<radiation>neutron</radiation>
<radiation><!--* radiation: [1..1] neutron, X-ray tube, synchrotron X-ray, ... -->neutron</radiation>
<beam_size name="this name is optional">
<beam_size name="this name is optional">
<!--* beam_size: [0..1] dimensions of the beam -->
<x unit="mm">12.00</x>
<x unit="mm"><!--* x: [0..1] horizontal beam size -->12.00</x>
<y unit="mm">12.00</y>
<y unit="mm"><!--* y: [0..1] vertical Y beam size -->12.00</y>
<z unit="mm"><!--* z: [0..1] this is allowed but has no meaning for SAS -->0.00</z>
</beam_size>
</beam_size>
<beam_shape>
<beam_shape>disc</beam_shape>
<!--* beam_shape: [0..1] disc, rectangle, oval, ... -->
<wavelength unit="A">6.00</wavelength>
disc
<!-- these values are examples and are not meant to be self-consistent here -->
</beam_shape>
<wavelength_min unit="nm">0.22</wavelength_min>
<wavelength unit="A"><!--* wavelength: [0..1] incident radiation -->6.00</wavelength>
<wavelength_max unit="nm">1.00</wavelength_max>
<wavelength_min unit="nm"><!--* wavelength_min: [0..1] minimum wavelength -->0.22</wavelength_min>
<wavelength_spread unit="percent">14.3</wavelength_spread>
<wavelength_max unit="nm"><!--* wavelength_max: [0..1] maximum wavelength -->1.00</wavelength_max>
<wavelength_spread unit="percent"><!--* wavelength_spread: [0..1] wavelength spread -->14.3</wavelength_spread>
</SASsource>
</SASsource>
<SAScollimation name="this name is optional">
<SAScollimation name="this name is optional">
<!--* SAScollimation: [] description of the instrument collimation -->
<distance unit="m">11.000</distance>
<distance unit="m"><!--* distance: [0..1] distance from ?sample? -->11.000</distance>
<aperture name="source" type="radius">
<aperture name="source" type="radius">
<!--* aperture: [0..inf] description of slits or aperture -->
<size>
<size>
<!--* size: [0..1] description of slits or aperture -->
<x unit="mm">50</x>
<x unit="mm"><!--* x: [0..1] horizontal size -->50</x>
<y unit="mm">2.1</y>
<y unit="mm"><!--* y: [0..1] vertical size -->2.1</y>
<z unit="mm"><!--* z: [0..1] this is allowed but has no meaning for SAS -->0.00</z>
</size>
</size>
<distance unit="mm"><!--* distance: [0..1] distance from ?sample? -->15.0</distance>
<distance unit="mm">15.0</distance>
</aperture>
</aperture>
</SAScollimation>
</SAScollimation>
<SASdetector name="this name is optional">
<SASdetector>
<!--* SASdetector: [1..inf] description of the detector -->
<name>fictional hybrid detector</name>
<name><!--* name: [1..1] detector name -->fictional hybrid</name>
<SDD unit="m"> 4.150 </SDD>
<SDD unit="m">
<!-- sample-to-detector distance -->
4.150
</SDD>
<offset name="this name is optional">
<offset name="this name is optional">
<!--* offset: [0..1] detector translation -->
<x unit="mm">322.64</x>
<x unit="mm"><!--* x: [0..1] horizontal -->322.64</x>
<y unit="mm">327.68</y>
<y unit="mm"><!--* y: [0..1] vertical -->327.68</y>
<z unit="mm">0.00</z>
<z unit="mm"><!--* z: [0..1] depth -->0.00</z>
</offset>
</offset>
<orientation name="this name is optional">
<orientation name="this name is optional">
<!--* orientation: [0..1] detector rotation -->
<roll unit="degree">0.00</roll>
<roll unit="degree"><!--* roll: [0..1] detector roll -->0.00</roll>
<pitch unit="degree">0.00</pitch>
<pitch unit="degree"><!--* pitch: [0..1] detector pitch -->0.00</pitch>
<yaw unit="degree">0.00</yaw>
<yaw unit="degree"><!--* yaw: [0..1] detector yaw -->0.00</yaw>
</orientation>
</orientation>
<beam_center name="this name is optional">
<beam_center name="this name is optional">
<!--* beam_center: [0..1] beam displacement on detector -->
<x unit="mm">322.64</x>
<x unit="mm"><!--* x: [0..1] horizontal -->322.64</x>
<y unit="mm">327.68</y>
<y unit="mm"><!--* y: [0..1] vertical -->327.68</y>
<z unit="mm"><!--* z: [0..1] this is allowed but has no meaning for SAS -->0.00</z>
</beam_center>
</beam_center>
<pixel_size name="this name is optional">
<pixel_size name="this name is optional">
<!--* pixel_size: [0..1] pixel size on detector -->
<x unit="mm">5.0</x>
<x unit="mm"><!--* x: [0..1] horizontal -->5.0</x>
<y unit="mm">5.0</y>
<y unit="mm"><!--* y: [0..1] vertical -->5.0</y>
<z unit="mm"><!--* z: [0..1] this is allowed but has no meaning for SAS -->0.00</z>
</pixel_size>
</pixel_size>
<slit_length unit="1/A"><!--* slitlength: [0..1] slitlength at detector -->0.05</slit_length>
<slit_length unit="1/A"> 0.05 </slit_length>
</SASdetector>
</SASdetector>
</SASinstrument>
</SASinstrument>
<SASprocess name="this name is optional">
<SASprocess name="this name is optional">
<!--* SASprocess: [0..inf] description of a processing or analysis step -->
<!-- Use as many SASprocess elements as needed. -->
<name><!--* name: [0..1] name of processing routine -->spol</name>
<name>spol</name>
<date><!--* date: [0..1] date of processing -->04-Sep-2007 18:35:02</date>
<date>04-Sep-2007 18:35:02</date>
<description><!--* description: [0..1] free form description of processing routine --></description>
<description> free form description of processing routine </description>
<term name="parameterName" unit="mm">
<term name="calibration" unit="a.u./cm"> 10.000 </term>
<!--* term: [0..inf] some term used in processing or analysis (string or number)
<term name="MASK_file">USER:MASK.COM</term>
      "name" attribute is required
<SASprocessnote name="this name is optional">
      "unit" attribute is optional
free form description of processing
-->
</SASprocessnote>
10.000
<SASprocessnote name="this name is optional">
</term>
Use as many as needed.
<term name="MASK_file"><!-- another example -->USER:MASK.COM</term>
</SASprocessnote>
<SASprocessnote name="this name is optional">
<SASprocessnote name="this name is optional">
<!--* SASprocessnote: [1..inf] free form description of processing -->
<!-- example: this element is not specified in the cansas1d standard -->
AvA1 0.0000E+00 AsA2 1.0000E+00 XvA3 1.0526E+03 XsA4  5.2200E-02 XfA5 0.0000E+00
AvA1 0.0000E+00 AsA2 1.0000E+00 XvA3 1.0526E+03 XsA4  5.2200E-02 XfA5 0.0000E+00
</SASprocessnote>
</SASprocessnote>
</SASprocess>
</SASprocess>
<SASnote name="this name is optional">
<SASnote name="this name is optional">
<!--* SASnote: [1..inf] free form description of anything not covered above -->
free form description of processing
</SASnote>
<SASnote name="this name is optional">
Use as many as needed
</SASnote>
</SASnote>
</SASentry>
</SASentry>
</SASroot>
</SASroot>
</pre>
</pre>

Revision as of 19:34, 25 January 2008

<?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"
	>
	<!--
	   file: cansas1d-template.xml
	   purpose: Template file for canSAS 1-D reduced SAS XML data format
	   notes:  Each element in the standard is shown, some with comments.
	           All elements, when present, must appear in the order shown below.
	           When shown in the template below, the "unit" attribute is required.
	           If in doubt, try validating against the XML Schema as described in
	           http://www.smallangles.net/wgwiki/index.php/cansas1d_documentation#Validation_of_XML_against_the_Schema
	 -->
	<SASentry name="this name is optional">
		<!--* SASentry: [1..inf] a single SAS scan -->
		<!-- repeat SASentry for as many scans as needed -->
		<Title>Title of the scan goes here.</Title>
		<Run>Could be a number or text</Run>
		<SASdata name="this name is optional">
			<Idata>
				<!--* Idata: contains one SAS data point -->
				<Q unit="1/A">0.02</Q>
				<I unit="1/cm">1000</I>
				<Qdev unit="1/A">0.01</Qdev>
				<Idev unit="1/cm">3</Idev>
				<Qfwhm unit="1/A" /><!-- optional -->
				<Qmean unit="1/A" /><!-- optional -->
				<Shadowfactor /><!-- optional -->
			</Idata>
			<Idata>
				<!-- repeat Idata for as many data points as needed -->
				<Q unit="1/A">0.03</Q><I unit="1/cm">989</I><Qdev unit="1/A">0.01</Qdev><Idev unit="1/cm">3</Idev>
			</Idata>
		</SASdata>
		<SASsample name="this name is optional">
			<ID>SI600-new-long</ID>
			<thickness unit="mm">1.03</thickness>
			<transmission>0.327 <!-- unit is always fraction: do not specify a "unit" --></transmission>
			<temperature unit="C">22.0000</temperature>
			<position name="this name is optional">
				<x unit="mm">10.00</x>
				<y unit="mm">0.00</y>
			</position>
			<orientation name="this name is optional">
				<roll unit="degree">22.5</roll>
				<pitch unit="degree">0.020</pitch>
				<yaw unit="degree">0.020</yaw>
			</orientation>
			<details>
				http://chemtools.chem.soton.ac.uk/projects/blog/blogs.php/bit_id/2720
			</details>
		</SASsample>
		<SASinstrument>
			<name>canSAS instrument</name>
			<SASsource>
				<radiation>neutron</radiation>
				<beam_size name="this name is optional">
					<x unit="mm">12.00</x>
					<y unit="mm">12.00</y>
				</beam_size>
				<beam_shape>disc</beam_shape>
				<wavelength unit="A">6.00</wavelength>
				<!-- these values are examples and are not meant to be self-consistent here -->
				<wavelength_min unit="nm">0.22</wavelength_min>
				<wavelength_max unit="nm">1.00</wavelength_max>
				<wavelength_spread unit="percent">14.3</wavelength_spread>
			</SASsource>
			<SAScollimation name="this name is optional">
				<distance unit="m">11.000</distance>
				<aperture name="source" type="radius">
					<size>
						<x unit="mm">50</x>
						<y unit="mm">2.1</y>
					</size>
					<distance unit="mm">15.0</distance>
				</aperture>
			</SAScollimation>
			<SASdetector>
				<name>fictional hybrid detector</name>
				<SDD unit="m"> 4.150 </SDD>
				<offset name="this name is optional">
					<x unit="mm">322.64</x>
					<y unit="mm">327.68</y>
					<z unit="mm">0.00</z>
				</offset>
				<orientation name="this name is optional">
					<roll unit="degree">0.00</roll>
					<pitch unit="degree">0.00</pitch>
					<yaw unit="degree">0.00</yaw>
				</orientation>
				<beam_center name="this name is optional">
					<x unit="mm">322.64</x>
					<y unit="mm">327.68</y>
				</beam_center>
				<pixel_size name="this name is optional">
					<x unit="mm">5.0</x>
					<y unit="mm">5.0</y>
				</pixel_size>
				<slit_length unit="1/A"> 0.05 </slit_length>
			</SASdetector>
		</SASinstrument>
		<SASprocess name="this name is optional">
			<!-- Use as many SASprocess elements as needed. -->
			<name>spol</name>
			<date>04-Sep-2007 18:35:02</date>
			<description> free form description of processing routine </description>
			<term name="calibration" unit="a.u./cm"> 10.000 </term>
			<term name="MASK_file">USER:MASK.COM</term>
			<SASprocessnote name="this name is optional">
				free form description of processing
			</SASprocessnote>
			<SASprocessnote name="this name is optional">
				Use as many as needed.
			</SASprocessnote>
			<SASprocessnote name="this name is optional">
					AvA1 0.0000E+00 AsA2 1.0000E+00 XvA3 1.0526E+03 XsA4  5.2200E-02 XfA5 0.0000E+00
			</SASprocessnote>
		</SASprocess>
		<SASnote name="this name is optional">
			free form description of processing
		</SASnote>
		<SASnote name="this name is optional">
			Use as many as needed
		</SASnote>
	</SASentry>
</SASroot>