<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cansas.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=130.246.132.26</id>
	<title>canSAS - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cansas.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=130.246.132.26"/>
	<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=Special:Contributions/130.246.132.26"/>
	<updated>2026-05-06T14:35:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.4</generator>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=447</id>
		<title>cansas1d binding Fortran</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=447"/>
		<updated>2008-06-03T08:03:27Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: /* canSAS 1-D SAS XML v1.0 support */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML.  And it shows.  FORTRAN is not a language that manipulates strings with ease, and this makes parsing XML decidedly awkward.  So unless you &#039;&#039;really&#039;&#039; have to use FORTRAN, you are probably better off with C/C++ (or something else more &#039;modern&#039;), see for example Daniel Veillard&#039;s LIBXML2 library at http://xmlsoft.org/ or Frank van den Berghen&#039;s parser at http://www.applied-mathematics.net/tools/xmlParser.html.&lt;br /&gt;
&lt;br /&gt;
If you have to use a dialect earlier than FORTRAN-90 (F90), then the chances are you will have to code your own parser.&lt;br /&gt;
&lt;br /&gt;
== Software Development Kits ==&lt;br /&gt;
For later dialects, there are some SDK&#039;s available on the Web:&lt;br /&gt;
&lt;br /&gt;
* F90:&lt;br /&gt;
** XMLPARSE - by Arjen Markus at http://xml-fortran.sourceforge.net/&lt;br /&gt;
** FoX - by Toby White &amp;amp; others at http://uszla.me.uk/space/software/FoX/&lt;br /&gt;
* For F95:&lt;br /&gt;
** XML - by Mart Rentmeester at http://nn-online.org/code/xml/&lt;br /&gt;
&lt;br /&gt;
== canSAS 1-D SAS XML v1.0 support ==&lt;br /&gt;
Steve King[mailto:s.m.king@rl.ac.uk] (ISIS) has provided a F77 routine ([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/fortran/SASXML_G77.F SASXML_G77.F]) that will read CanSAS XML v1.0 files.&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=440</id>
		<title>cansas1d binding Fortran</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=440"/>
		<updated>2008-05-19T12:00:21Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML.  And it shows.  FORTRAN is not a language that manipulates strings with ease, and this makes parsing XML decidely awkward.  So unless you &#039;&#039;really&#039;&#039; have to use FORTRAN, you are probably better off with C/C++ (or something else more &#039;modern&#039;), see for example Daniel Veillard&#039;s LIBXML2 library at http://xmlsoft.org/ or Frank van den Berghen&#039;s parser at http://www.applied-mathematics.net/tools/xmlParser.html.&lt;br /&gt;
&lt;br /&gt;
If you have to use a dialect earlier than FORTRAN-90 (F90), then the chances are you will have to code your own parser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For later dialects, there are some SDK&#039;s available on the Web:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For F90:&lt;br /&gt;
&lt;br /&gt;
XMLPARSE - by Arjen Markus at http://xml-fortran.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
FoX - by Toby White &amp;amp; others at http://uszla.me.uk/space/software/FoX/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For F95:&lt;br /&gt;
&lt;br /&gt;
XML - by Mart Rentmeester at http://nn-online.org/code/xml/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steve King[mailto:s.m.king@rl.ac.uk] (ISIS) has a VMS F77 routine that will read CanSAS XML v1.0 files.&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=439</id>
		<title>cansas1d binding Fortran</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=439"/>
		<updated>2008-05-19T10:47:59Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML.  And it shows.  FORTRAN is not a language that manipulates strings with ease, and this makes parsing XML decidely awkward.  So unless you &#039;&#039;really&#039;&#039; have to use FORTRAN, you are probably better off with C/C++ (or something else more &#039;modern&#039;), e.g. Daniel Veillard&#039;s LIBXML2 at http://xmlsoft.org/ or Frank van den Berghen&#039;s parser at http://www.applied-mathematics.net/tools/xmlParser.html.&lt;br /&gt;
&lt;br /&gt;
If you have to use a dialect earlier than FORTRAN-90 (F90), then the chances are you will have to code your own parser.&lt;br /&gt;
&lt;br /&gt;
For later dialects, there are some SDK&#039;s available on the Web:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For F90:&lt;br /&gt;
&lt;br /&gt;
XMLPARSE - by Arjen Markus at http://xml-fortran.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
FoX - by Toby White &amp;amp; others at http://uszla.me.uk/space/software/FoX/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For F95:&lt;br /&gt;
&lt;br /&gt;
XML - by Mart Rentmeester at http://nn-online.org/code/xml/&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=438</id>
		<title>cansas1d binding Fortran</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=438"/>
		<updated>2008-05-19T10:45:17Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML.  And it shows.  FORTRAN is not a language that manipulates strings with ease, and this makes parsing XML decidely awkward.  So unless you &#039;&#039;really&#039;&#039; have to use FORTRAN, you are probably better off with C/C++ (or something else more &#039;modern&#039;), e.g. Daniel Veillard&#039;s LIBXML2 at http://xmlsoft.org/ or Frank van den Berghen&#039;s parser at http://www.applied-mathematics.net/tools/xmlParser.html.&lt;br /&gt;
&lt;br /&gt;
If you have to use a dialect earlier than FORTRAN-90 (F90), then the chances are you will have to code your own parser.&lt;br /&gt;
&lt;br /&gt;
For later dialects, there are some SDK&#039;s available on the Web:&lt;br /&gt;
&lt;br /&gt;
For F90:&lt;br /&gt;
&lt;br /&gt;
XMLPARSE - by Arjen Markus at http://xml-fortran.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
FoX - by Toby White &amp;amp; others at http://uszla.me.uk/space/software/FoX/&lt;br /&gt;
&lt;br /&gt;
For F95:&lt;br /&gt;
&lt;br /&gt;
XML - by Mart Rentmeester at http://nn-online.org/code/xml/&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=437</id>
		<title>cansas1d binding Fortran</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=437"/>
		<updated>2008-05-19T10:42:13Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML.  And it shows.  FORTRAN is not a language that manipulates strings with ease, and this makes parsing XML decidely awkward.  So unless you &#039;&#039;really&#039;&#039; have to use FORTRAN, you are probably better off with C/C++ (or something else more &#039;modern&#039;), e.g. Daniel Veillard&#039;s LIBXML2 at http://xmlsoft.org/.&lt;br /&gt;
&lt;br /&gt;
If you have to use a dialect earlier than FORTRAN-90 (F90), then the chances are you will have to code your own parser.&lt;br /&gt;
&lt;br /&gt;
For later dialects, there are some SDK&#039;s available on the Web:&lt;br /&gt;
&lt;br /&gt;
For F90:&lt;br /&gt;
&lt;br /&gt;
XMLPARSE - by Arjen Markus at http://xml-fortran.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
FoX - by Toby White &amp;amp; others at http://uszla.me.uk/space/software/FoX/&lt;br /&gt;
&lt;br /&gt;
For F95:&lt;br /&gt;
&lt;br /&gt;
XML - by Mart Rentmeester at http://nn-online.org/code/xml/&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=436</id>
		<title>cansas1d binding Fortran</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=436"/>
		<updated>2008-05-19T10:41:34Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML.  And it shows.  FORTRAN is not a language that manipulates strings with ease, and this makes parsing XML decidely awkward.  So unless you &#039;&#039;really&#039;&#039; have to use FORTRAN, you are probably better off with C/C++ (or something else more &#039;modern&#039;), e.g. Daniel Veillard&#039;s LIBXML2 at http://xmlsoft.org/.&lt;br /&gt;
&lt;br /&gt;
If you have to use a dialect earlier than FORTRAN-90 (F90), then the chances are you will have to code your own parser.&lt;br /&gt;
&lt;br /&gt;
For later dialects, there are some SDK&#039;s available on the Web:&lt;br /&gt;
&lt;br /&gt;
For F90:&lt;br /&gt;
XMLPARSE - by Arjen Markus at http://xml-fortran.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
FoX - by Toby White &amp;amp; others at http://uszla.me.uk/space/software/FoX/&lt;br /&gt;
&lt;br /&gt;
For F95:&lt;br /&gt;
XML - by Mart Rentmeester at http://nn-online.org/code/xml/&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=435</id>
		<title>cansas1d binding Fortran</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=435"/>
		<updated>2008-05-19T10:41:01Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML.  And it shows.  FORTRAN is not a language that manipulates strings with ease, and this makes parsing XML decidely awkward.  So unless you &#039;&#039;really&#039;&#039; have to use FORTRAN, you are probably better off with C/C++ (or something else more &#039;modern&#039;), e.g. Daniel Veillard&#039;s LIBXML2 at http://xmlsoft.org/[http://xmlsoft.org/].&lt;br /&gt;
&lt;br /&gt;
If you have to use a dialect earlier than FORTRAN-90 (F90), then the chances are you will have to code your own parser.&lt;br /&gt;
&lt;br /&gt;
For later dialects, there are some SDK&#039;s available on the Web:&lt;br /&gt;
&lt;br /&gt;
For F90:&lt;br /&gt;
XMLPARSE - by Arjen Markus at http://xml-fortran.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
FoX - by Toby White &amp;amp; others at http://uszla.me.uk/space/software/FoX/[http://uszla.me.uk/space/software/FoX/]&lt;br /&gt;
&lt;br /&gt;
For F95:&lt;br /&gt;
XML - by Mart Rentmeester at http://nn-online.org/code/xml/[http://nn-online.org/code/xml/]&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=434</id>
		<title>cansas1d binding Fortran</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_binding_Fortran&amp;diff=434"/>
		<updated>2008-05-19T10:39:56Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: New page: The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML.  And it shows.  FORTRAN is not a language that manipulates strings with ease, and this ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML.  And it shows.  FORTRAN is not a language that manipulates strings with ease, and this makes parsing XML decidely awkward.  So unless you &#039;&#039;really&#039;&#039; have to use FORTRAN, you are probably better off with C/C++ (or something else more &#039;modern&#039;), e.g. Daniel Veillard&#039;s LIBXML2 at http://xmlsoft.org/[http://xmlsoft.org/].&lt;br /&gt;
&lt;br /&gt;
If you have to use a dialect earlier than FORTRAN-90 (F90), then the chances are you will have to code your own parser.&lt;br /&gt;
&lt;br /&gt;
For later dialects, there are some SDK&#039;s available on the Web:&lt;br /&gt;
&lt;br /&gt;
For F90:&lt;br /&gt;
XMLPARSE - by Arjen Markus at http://xml-fortran.sourceforge.net/[http://xml-fortran.sourceforge.net/]&lt;br /&gt;
&lt;br /&gt;
FoX - by Toby White &amp;amp; others at http://uszla.me.uk/space/software/FoX/[http://uszla.me.uk/space/software/FoX/]&lt;br /&gt;
&lt;br /&gt;
For F95:&lt;br /&gt;
XML - by Mart Rentmeester at http://nn-online.org/code/xml/[http://nn-online.org/code/xml/]&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_documentation&amp;diff=433</id>
		<title>cansas1d documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_documentation&amp;diff=433"/>
		<updated>2008-05-19T10:08:39Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: /* Support for ForTran */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Disclaimer =&lt;br /&gt;
&lt;br /&gt;
This description is meant to inform the community how to layout&lt;br /&gt;
the information within the XML files.  However, should the&lt;br /&gt;
information in this document and the [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d/1.0 SAS XML Schema]&lt;br /&gt;
differ, the XML Schema will be deemed to have the most correct description&lt;br /&gt;
of the standard.&lt;br /&gt;
&lt;br /&gt;
= Objective =&lt;br /&gt;
&lt;br /&gt;
One of the first aims of the canSAS (Collective Action for Nomadic Small-Angle Scatterers) forum of users, software developers, and facility staff was to discuss better sharing of SAS data analysis software. [http://www.smallangles.net/canSAS/ CanSAS] identified that a significant need within the SAS community can be satisfied by a robust, self-describing, text-based, standard format to communicate reduced one-dimensional small-angle scattering data, &#039;&#039;I(Q)&#039;&#039;, between users of our facilities.  Our goal has been to define such a format that leaves the data file instantly human-readable, editable in the simplest of editors, and importable by simple text import filters in programs that need not recognise advanced structure in the file nor require advanced programming interfaces.  The file should contain both the primary data of &#039;&#039;I(Q)&#039;&#039; and also any other descriptive information (metadata) about the sample, measurement, instrument, processing, or analysis steps.&lt;br /&gt;
	&lt;br /&gt;
The cansas1d/1.0 standard meets the objectives for a 1D standard, incorporating metadata about the measurement, parameters and results of processing or analysis steps.  Even multiple measurements (related or unrelated) may be included within a single XML file.&lt;br /&gt;
&lt;br /&gt;
= General Layout of the XML Data =&lt;br /&gt;
&lt;br /&gt;
The canSAS 1-D standard for reduced 1-D SAS data is implemented using XML files.&lt;br /&gt;
A single file can contain SAS data from a single experiment or multiple experiments.&lt;br /&gt;
All types of relevant data (&#039;&#039;I(Q)&#039;&#039;, metadata) are described for each experiment.&lt;br /&gt;
More details are provided below.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[Image:cansas1d-v1-10-minimum.png|thumb|block diagram of minimum elements required for cansas1d/1.0 standard]]&lt;br /&gt;
&lt;br /&gt;
The basic elements of the cansas1d/1.0 standard are shown in the following table.&lt;br /&gt;
After an XML header, the root element of the file is [[cansas1d_SASroot | SASroot]] which &lt;br /&gt;
contains one or more [[cansas1d_SASentry | SASentry]] elements, each of which describes&lt;br /&gt;
a single experiment (data set, time-slice, step in a series, new &lt;br /&gt;
sample, etc.).  Details of the [[cansas1d_SASentry | SASentry]] element are also&lt;br /&gt;
shown in the next figure.  Refer to the [[cansas1d_block_diagrams | block diagrams]] &lt;br /&gt;
for alternative depictions.  See [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] for an example XML file.&lt;br /&gt;
Examples, Case Studies, and other background information are below.  More discussion can be found on the [[1D_Data_Formats_Working_Group|canSAS 1D Data Formats Working Group]] page and its [[Talk:1D_Data_Formats_Working_Group|discussion]] page.  Details about &lt;br /&gt;
each specific field (XPath string, XML elements and attributes) are described &lt;br /&gt;
on the [[cansas1d_definition_of_terms]] page.&lt;br /&gt;
&lt;br /&gt;
* [[cansas1d_SASroot | &#039;&#039;&#039;SASroot&#039;&#039;&#039;: the root element of the file (after the XML header)]]&lt;br /&gt;
* [[cansas1d_SASentry | &#039;&#039;&#039;SASentry&#039;&#039;&#039;: describes a single experiment (data set, time-slice, step in a series, new sample, etc.)]]&lt;br /&gt;
* [[cansas1d_block_diagrams | block diagrams]]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] example XML file&lt;br /&gt;
* discussion of this format: [[1D_Data_Formats_Working_Group | basic]] [[Talk:1D_Data_Formats_Working_Group | more]]&lt;br /&gt;
* [[# Help_for_XML | Seek outside help for XML]]&lt;br /&gt;
* [[cansas1d_definition_of_terms | &#039;&#039;&#039;Definition of terms&#039;&#039;&#039;: Details about each specific field (XPath string, XML elements and attributes)]]&lt;br /&gt;
&lt;br /&gt;
=== Basic elements of the cansas1d/1.0 standard ===&lt;br /&gt;
&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
! {{Headcellstyle}} | element&lt;br /&gt;
|| &amp;amp;nbsp;&lt;br /&gt;
! {{Headcellstyle}} | description&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
[[cansas1d_XML_header | XML header]]&lt;br /&gt;
||&lt;br /&gt;
||descriptive info required at the start of every XML file&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:[[cansas1d_SASroot | SASroot]]&lt;br /&gt;
||&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::[[cansas1d_SASentry | SASentry]]&lt;br /&gt;
||&lt;br /&gt;
||data set, time-slice, step in a series, new sample, etc.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::Title&lt;br /&gt;
||&lt;br /&gt;
||for this particular SASentry&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::Run&lt;br /&gt;
||&lt;br /&gt;
||run number or ID number of experiment&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_any | {any}]]&lt;br /&gt;
||&lt;br /&gt;
||any non-cansas1d/1.0 element can be used at this point&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASdata | SASdata]]&lt;br /&gt;
||&lt;br /&gt;
||this is where the reduced 1-D SAS data is stored&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASdata | Idata]]&lt;br /&gt;
||&lt;br /&gt;
||a single data point in the dataset&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_any | {any}]]&lt;br /&gt;
||&lt;br /&gt;
||any non-cansas1d/1.0 element can be used at this point&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASsample | SASsample]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the sample&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASinstrument | SASinstrument]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the instrument&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASsource | SASsource]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the source&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SAScollimation | SAScollimation]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the collimation&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASdetector | SASdetector]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the detector&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASprocess | SASprocess]]&lt;br /&gt;
||&lt;br /&gt;
||for each processing or analysis step&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASnote | SASnote]]&lt;br /&gt;
||&lt;br /&gt;
||anything at all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Required XML file header ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;?xml-stylesheet type=&amp;quot;text/xsl&amp;quot; href=&amp;quot;example.xsl&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;SASroot version=&amp;quot;1.0&amp;quot;&lt;br /&gt;
    xmlns=&amp;quot;cansas1d/1.0&amp;quot;&lt;br /&gt;
    xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;
    xsi:schemaLocation=&amp;quot;cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rules ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Q-geometry.jpg|thumb|definition of Q geometry for small-angle scattering]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Translation-orientation-geometry-2.jpg|thumb|definition of translation and orientation geometry]]&lt;br /&gt;
&lt;br /&gt;
# canSAS1d/1.0 XML data files will adhere to the standard if they can successfully [[cansas1d_documentation#Validation_of_XML_against_the_Schema | validate]] against the established XML Schema ([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d.xsd])&lt;br /&gt;
# Q=(4 &amp;amp;pi; / &amp;amp;lambda;) sin(&amp;amp;theta;) &amp;lt;br&amp;gt; where &amp;amp;lambda; is the wavelength of the radiation and 2&amp;amp;theta; is the angle through which the detected radiation has been scattered.&lt;br /&gt;
# units to be given in standard SI abbreviations (eg, m, cm, mm, nm, K) with the following exceptions: &lt;br /&gt;
##um=micrometres&lt;br /&gt;
##C=celsius&lt;br /&gt;
##A=Angstroms&lt;br /&gt;
##percent=%.&lt;br /&gt;
##fraction&lt;br /&gt;
##a.u.=arbitrary units&lt;br /&gt;
##none=no units are relevant (such as dimensionless)&lt;br /&gt;
# where reciprocal units need to be quoted the format shall be &amp;quot;1/abbreviation&amp;quot;&lt;br /&gt;
# when raised to a power, use similar to &amp;quot;A^3&amp;quot; or &amp;quot;1/m^4&amp;quot; (and not &amp;quot;A3&amp;quot; or &amp;quot;m-4&amp;quot;)&lt;br /&gt;
# axes:&lt;br /&gt;
##z is along the flight path (positive value in the direction of the detector)&lt;br /&gt;
##x is orthogonal to z in the horizontal plane (positive values increase to the right when viewed towards the incoming radiation)&lt;br /&gt;
##y is orthogonal to z and x in the vertical plane (positive values increase upwards)&lt;br /&gt;
#orientation (angles): &lt;br /&gt;
##roll is about z&lt;br /&gt;
##pitch is about x&lt;br /&gt;
##yaw is about y&lt;br /&gt;
# Unicode characters MUST NOT be used&lt;br /&gt;
# Binary data is not supported&lt;br /&gt;
&lt;br /&gt;
=== Compatibility of Geometry Definitions ===&lt;br /&gt;
&lt;br /&gt;
Note:  translation and orientation geometry used by canSAS are consistent with:&lt;br /&gt;
#http://en.wikipedia.org/wiki/Cartesian_coordinate_system&lt;br /&gt;
#http://en.wikipedia.org/wiki/Right-hand_rule&lt;br /&gt;
#http://www.nexusformat.org/Coordinate_Systems&lt;br /&gt;
#http://mcstas.risoe.dk/documentation/tutorial/node6.html&lt;br /&gt;
#http://webhost5.nts.jhu.edu/reza/book/kinematics/kinematics.htm&lt;br /&gt;
&lt;br /&gt;
The translation and orientation geometry definitions used &lt;br /&gt;
here are different than those used by&lt;br /&gt;
&#039;&#039;&#039;SHADOW&#039;&#039;&#039; ([http://www.nanotech.wisc.edu/shadow/ http://www.nanotech.wisc.edu/shadow/]) &lt;br /&gt;
where the &#039;&#039;y&#039;&#039; and &#039;&#039;z&#039;&#039; axes are swapped &lt;br /&gt;
and the direction of &#039;&#039;x&#039;&#039; is changed.&lt;br /&gt;
&lt;br /&gt;
= Documentation and Definitions =&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Documentation&#039;&#039;&#039;: [[cansas1d_documentation]]  (this page)&lt;br /&gt;
* &#039;&#039;&#039;Definitions&#039;&#039;&#039;:   [[cansas1d_definition_of_terms]]&lt;br /&gt;
* &#039;&#039;&#039;Block diagrams&#039;&#039;&#039;: [[cansas1d_block_diagrams]]&lt;br /&gt;
&lt;br /&gt;
== XML Schema ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XML Schema&#039;&#039;&#039;: The [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d.xsd] [http://www.w3schools.com/xsd XML Schema] defines the rules for the XML file format ([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd TRAC], [http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd SVN]) and is used to validate&lt;br /&gt;
any XML file for adherence to the format.&lt;br /&gt;
&lt;br /&gt;
== XML Stylesheets ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;example.xsl&#039;&#039;&#039;: [http://www.w3schools.com/xsl/ XSLT stylesheets] can be used to extract metadata or to convert into another file format.  The default canSAS stylesheet [[http://svn.smallangles.net/svn/canSAS/1dwg/trunk/example.xsl | example.xsl]] should be copied into the each folder with canSAS XML data file(s).   It can be used to display the data in a supporting WWW browser (such as Firefox or Internet Explorer) or to import into Microsoft Excel (with the added XML support in Excel).   By default, MS Windows binds &#039;&#039;&#039;*.xml&#039;&#039;&#039; files to start Internet Explorer.  Double-clicking on a canSAS XML data file with the [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/example.xsl &#039;&#039;&#039;example.xsl&#039;&#039;&#039;] stylesheet in the same directory will produce a WWW page with the SAS data and selected metadata.&lt;br /&gt;
&lt;br /&gt;
== Examples and Case Studies ==&lt;br /&gt;
&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] basic example: Note that, for clarity, only one row of data is shown.  This is probably a very good example to use as a starting point for creating XML files with a text editor.&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/bimodal-test1.xml bimodal-test1.xml]: Simulated SAS data to test size distribution calculation routines.&lt;br /&gt;
* [[cansas1d_casestudy_collagen | dry chick collagen]]: illustrates the minimum information necessary to meet the requirements of the standard format&lt;br /&gt;
* [[cansas1d_casestudy_af1410 | AF1410 steel]]: SANS study using magnetic contrast variation (with multiple samples and multiple data sets for each sample), the files can be viewed from TRAC (no description yet):  [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/examples/af1410/ http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/examples/af1410/]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d-template.xml cansas1d-template.xml]: This is used to test all the rules in the XML Schema.  This is probably not a very good example to use as a starting point for creating XML files with a text editor since it tests many of the special-case rules.&lt;br /&gt;
&lt;br /&gt;
=== XML layout for multiple experiments ===&lt;br /&gt;
&lt;br /&gt;
Each experiment is described with a single &#039;&#039;&#039;SASentry&#039;&#039;&#039; element.&lt;br /&gt;
The fragment below shows how multiple experiments can be included &lt;br /&gt;
in a single XML file.  Full examples of canSAS XML files with multiple experiments include:&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/W1W2.XML ISIS LOQ SANS instrument]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cs_af1410.xml NIST SANS data]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;?xml-stylesheet type=&amp;quot;text/xsl&amp;quot; href=&amp;quot;example.xsl&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;SASroot version=&amp;quot;1.0&amp;quot;&lt;br /&gt;
    xmlns=&amp;quot;cansas1d/1.0&amp;quot;&lt;br /&gt;
    xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;
    xsi:schemaLocation=&amp;quot;cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;071121.dat#S22&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- contents of the first experiment in the file go here --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;example temperature series&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- example with two SAS data sets related to the same sample --&amp;gt;&lt;br /&gt;
    &amp;lt;Title&amp;gt;title of this series&amp;lt;/Title&amp;gt;&lt;br /&gt;
    &amp;lt;Run name=&amp;quot;run1&amp;quot;&amp;gt;42-001&amp;lt;/Run&amp;gt;&lt;br /&gt;
    &amp;lt;Run name=&amp;quot;run2&amp;quot;&amp;gt;42-002&amp;lt;/Run&amp;gt;&lt;br /&gt;
    &amp;lt;SASdata name=&amp;quot;run1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;!-- data from 42-001 run comes here --&amp;gt;&lt;br /&gt;
    &amp;lt;/SASdata&amp;gt;&lt;br /&gt;
    &amp;lt;SASdata name=&amp;quot;run2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;!-- data from 42-002 run comes here --&amp;gt;&lt;br /&gt;
    &amp;lt;/SASdata&amp;gt;&lt;br /&gt;
    &amp;lt;!-- other elements come here for this entry --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;other sample&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- any number of additional experiments can be included, as desired --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- SASentry elements in the same XML file do not have to be related --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
&amp;lt;/SASroot&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Foreign Elements ==&lt;br /&gt;
&lt;br /&gt;
To allow for inclusion of elements that are not defined by the cansas1d.xsd XML Schema, &lt;br /&gt;
XML &#039;&#039;foreign elements&#039;&#039; are permitted at select locations in the cansas1d/1.0 format.&lt;br /&gt;
Please refer to the references (and others) [[#Help_for_XML | below]] for deeper discussions on foreign elements.&lt;br /&gt;
&lt;br /&gt;
An example of the use of foreign elements in the cansas1d/1.0 format is given by&lt;br /&gt;
* http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/s81-polyurea.xml&lt;br /&gt;
&lt;br /&gt;
== Support tools for Visualization &amp;amp; Analysis software ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;(under development as of May 2008)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Binding for IgorPro ===&lt;br /&gt;
&lt;br /&gt;
An import tool (a.k.a. binding) for [http://www.wavemetrics.com/ IgorPro] has been created&lt;br /&gt;
([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/IgorPro/cansasXML.ipf cansasXML.ipf]).&lt;br /&gt;
[[cansas1d_binding_IgorPro | Documentation]] is available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that this tool is not a true [http://en.wikipedia.org/wiki/Binding_%28computer_science%29 binding] in that the structure of the XML file is not replicated in IgorPro data structures.  This tool reads the vectors of 1-D SAS data (Q, I, ...) into IgorPro waves (Qsas, Isas, ...).  The tool also reads most of the metadata into an IgorPro textWave for use by other support in IgorPro.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Status:&lt;br /&gt;
* Capabilities&lt;br /&gt;
** test suite of XML files developed&lt;br /&gt;
** import the XML files into IgorPro&lt;br /&gt;
* open TRAC tickets (as of 2008-05-15)&lt;br /&gt;
** http://svn.smallangles.net/trac/canSAS/ticket/3&lt;br /&gt;
** http://svn.smallangles.net/trac/canSAS/ticket/10&lt;br /&gt;
* Further&lt;br /&gt;
** conversation with Andrew Nelson shows more efficiency can be gained from minor redesign.&lt;br /&gt;
** Development of a GUI (to support the [http://usaxs.xor.aps.anl.gov/staff/ilavsky/irena.html Irena] package) has begun&lt;br /&gt;
** Development to add export capabilities (from IgorPro) back to the cansas1d/1.0 format has begun&lt;br /&gt;
&lt;br /&gt;
=== Binding for Java ===&lt;br /&gt;
&lt;br /&gt;
A [http://java.sun.com/developer/technicalArticles/WebServices/jaxb/ JAXB] [http://en.wikipedia.org/wiki/Binding_%28computer_science%29 binding] for Java has been created.&lt;br /&gt;
(http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/java/cansas1d).&lt;br /&gt;
[[cansas1d_binding_Java | Documentation]] is in progress.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that this tool replicates the structure of the XML file into Java data structures.  Additional Java software must be applied to convert the /SASdata/Idata/* elements into vectors of &#039;&#039;I(Q)&#039;&#039; data.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Status:&lt;br /&gt;
* Capabilities&lt;br /&gt;
** import the XML files into Java&lt;br /&gt;
** tested by use in collimation-correction (desmearing) software (not publicly available at this time)&lt;br /&gt;
* Further&lt;br /&gt;
** need to test export capabilities&lt;br /&gt;
&lt;br /&gt;
=== Support for Python ===&lt;br /&gt;
&lt;br /&gt;
Specific support for the cansas1d/1.0 data standard in Python has not been developed.&lt;br /&gt;
However, some constructive suggestions are being gathered on a specific &lt;br /&gt;
[[cansas1d_binding_Python | Python Documentation]] page.&lt;br /&gt;
&lt;br /&gt;
=== Support for FORTRAN ===&lt;br /&gt;
&lt;br /&gt;
Specific support for the cansas1d/1.0 data standard in FORTRAN (remember? It stands for FORmula TRANslation) has not been developed by CanSAS.&lt;br /&gt;
However, some information is gathered on a specific &lt;br /&gt;
[[cansas1d_binding_Fortran | Fortran Documentation]] page.&lt;br /&gt;
&lt;br /&gt;
== Software repositories ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;TRAC&#039;&#039;&#039;:       [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk]&lt;br /&gt;
* &#039;&#039;&#039;Subversion&#039;&#039;&#039;: [http://svn.smallangles.net/svn/canSAS/1dwg http://svn.smallangles.net/svn/canSAS/1dwg]  &amp;lt;br /&amp;gt;(&amp;lt;nowiki&amp;gt;svn checkout http://svn.smallangles.net/svn/canSAS/1dwg/trunk/ cansas-1dwg&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
= Validation of XML against the Schema =&lt;br /&gt;
# open browser to:   http://www.xmlvalidation.com/&lt;br /&gt;
# paste content of candidate XML file (with reference in the header to the XML Schema as shown above) into the form&lt;br /&gt;
# press &amp;lt;validate&amp;gt;&lt;br /&gt;
# paste content of [http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd cansas1d.xsd] XSD file into form and press &amp;lt;continue validation&amp;gt;&lt;br /&gt;
# check the results&lt;br /&gt;
&lt;br /&gt;
= Help for XML =&lt;br /&gt;
; XML: EXtensible Markup Language &amp;lt;br /&amp;gt; http://www.w3schools.com/xml/ &amp;lt;br /&amp;gt; http://www.w3.org/XML/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XML &amp;lt;br /&amp;gt; http://www.zvon.org/xxl/XPathTutorial/General/examples.html&lt;br /&gt;
; XSL (or XSLT): EXtensible Stylesheet Language &amp;lt;br /&amp;gt; http://www.w3schools.com/xsl/ &amp;lt;br /&amp;gt; http://www.w3.org/Style/XSL/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/Extensible_Stylesheet_Language &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XSLT&lt;br /&gt;
; XPath: XPath is a language for finding information in an XML document. &amp;lt;br /&amp;gt; http://www.w3schools.com/xpath/ &amp;lt;br /&amp;gt; http://www.w3.org/Style/XSL/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XPath&lt;br /&gt;
; Schema: An XML Schema describes the structure of an XML document. &amp;lt;br /&amp;gt; http://www.w3schools.com/schema/ &amp;lt;br /&amp;gt; http://www.w3.org/XML/Schema &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XSD&lt;br /&gt;
; XML Namespaces: XML namespaces are used for providing uniquely named elements and attributes in an XML instance. &amp;lt;br /&amp;gt; http://www.zvon.org/xxl/NamespaceTutorial/Output &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XML_namespaces &amp;lt;br /&amp;gt; http://www.w3schools.com/XML/xml_namespaces.asp&lt;br /&gt;
; XML Foreign Elements: Inclusion of elements, at select locations, that are not defined by the cansas1d.xsd XML Schema &amp;lt;br /&amp;gt; http://books.xmlschemata.org/relaxng/relax-CHP-11-SECT-4.html &amp;lt;br /&amp;gt; http://www.w3.org/TR/SVG/extend.html &amp;lt;br /&amp;gt; http://www.google.com/search?q=XML+foreign+elements&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_documentation&amp;diff=432</id>
		<title>cansas1d documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_documentation&amp;diff=432"/>
		<updated>2008-05-19T10:07:44Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: /* Support for ForTran */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Disclaimer =&lt;br /&gt;
&lt;br /&gt;
This description is meant to inform the community how to layout&lt;br /&gt;
the information within the XML files.  However, should the&lt;br /&gt;
information in this document and the [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d/1.0 SAS XML Schema]&lt;br /&gt;
differ, the XML Schema will be deemed to have the most correct description&lt;br /&gt;
of the standard.&lt;br /&gt;
&lt;br /&gt;
= Objective =&lt;br /&gt;
&lt;br /&gt;
One of the first aims of the canSAS (Collective Action for Nomadic Small-Angle Scatterers) forum of users, software developers, and facility staff was to discuss better sharing of SAS data analysis software. [http://www.smallangles.net/canSAS/ CanSAS] identified that a significant need within the SAS community can be satisfied by a robust, self-describing, text-based, standard format to communicate reduced one-dimensional small-angle scattering data, &#039;&#039;I(Q)&#039;&#039;, between users of our facilities.  Our goal has been to define such a format that leaves the data file instantly human-readable, editable in the simplest of editors, and importable by simple text import filters in programs that need not recognise advanced structure in the file nor require advanced programming interfaces.  The file should contain both the primary data of &#039;&#039;I(Q)&#039;&#039; and also any other descriptive information (metadata) about the sample, measurement, instrument, processing, or analysis steps.&lt;br /&gt;
	&lt;br /&gt;
The cansas1d/1.0 standard meets the objectives for a 1D standard, incorporating metadata about the measurement, parameters and results of processing or analysis steps.  Even multiple measurements (related or unrelated) may be included within a single XML file.&lt;br /&gt;
&lt;br /&gt;
= General Layout of the XML Data =&lt;br /&gt;
&lt;br /&gt;
The canSAS 1-D standard for reduced 1-D SAS data is implemented using XML files.&lt;br /&gt;
A single file can contain SAS data from a single experiment or multiple experiments.&lt;br /&gt;
All types of relevant data (&#039;&#039;I(Q)&#039;&#039;, metadata) are described for each experiment.&lt;br /&gt;
More details are provided below.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[Image:cansas1d-v1-10-minimum.png|thumb|block diagram of minimum elements required for cansas1d/1.0 standard]]&lt;br /&gt;
&lt;br /&gt;
The basic elements of the cansas1d/1.0 standard are shown in the following table.&lt;br /&gt;
After an XML header, the root element of the file is [[cansas1d_SASroot | SASroot]] which &lt;br /&gt;
contains one or more [[cansas1d_SASentry | SASentry]] elements, each of which describes&lt;br /&gt;
a single experiment (data set, time-slice, step in a series, new &lt;br /&gt;
sample, etc.).  Details of the [[cansas1d_SASentry | SASentry]] element are also&lt;br /&gt;
shown in the next figure.  Refer to the [[cansas1d_block_diagrams | block diagrams]] &lt;br /&gt;
for alternative depictions.  See [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] for an example XML file.&lt;br /&gt;
Examples, Case Studies, and other background information are below.  More discussion can be found on the [[1D_Data_Formats_Working_Group|canSAS 1D Data Formats Working Group]] page and its [[Talk:1D_Data_Formats_Working_Group|discussion]] page.  Details about &lt;br /&gt;
each specific field (XPath string, XML elements and attributes) are described &lt;br /&gt;
on the [[cansas1d_definition_of_terms]] page.&lt;br /&gt;
&lt;br /&gt;
* [[cansas1d_SASroot | &#039;&#039;&#039;SASroot&#039;&#039;&#039;: the root element of the file (after the XML header)]]&lt;br /&gt;
* [[cansas1d_SASentry | &#039;&#039;&#039;SASentry&#039;&#039;&#039;: describes a single experiment (data set, time-slice, step in a series, new sample, etc.)]]&lt;br /&gt;
* [[cansas1d_block_diagrams | block diagrams]]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] example XML file&lt;br /&gt;
* discussion of this format: [[1D_Data_Formats_Working_Group | basic]] [[Talk:1D_Data_Formats_Working_Group | more]]&lt;br /&gt;
* [[# Help_for_XML | Seek outside help for XML]]&lt;br /&gt;
* [[cansas1d_definition_of_terms | &#039;&#039;&#039;Definition of terms&#039;&#039;&#039;: Details about each specific field (XPath string, XML elements and attributes)]]&lt;br /&gt;
&lt;br /&gt;
=== Basic elements of the cansas1d/1.0 standard ===&lt;br /&gt;
&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
! {{Headcellstyle}} | element&lt;br /&gt;
|| &amp;amp;nbsp;&lt;br /&gt;
! {{Headcellstyle}} | description&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
[[cansas1d_XML_header | XML header]]&lt;br /&gt;
||&lt;br /&gt;
||descriptive info required at the start of every XML file&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:[[cansas1d_SASroot | SASroot]]&lt;br /&gt;
||&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::[[cansas1d_SASentry | SASentry]]&lt;br /&gt;
||&lt;br /&gt;
||data set, time-slice, step in a series, new sample, etc.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::Title&lt;br /&gt;
||&lt;br /&gt;
||for this particular SASentry&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::Run&lt;br /&gt;
||&lt;br /&gt;
||run number or ID number of experiment&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_any | {any}]]&lt;br /&gt;
||&lt;br /&gt;
||any non-cansas1d/1.0 element can be used at this point&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASdata | SASdata]]&lt;br /&gt;
||&lt;br /&gt;
||this is where the reduced 1-D SAS data is stored&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASdata | Idata]]&lt;br /&gt;
||&lt;br /&gt;
||a single data point in the dataset&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_any | {any}]]&lt;br /&gt;
||&lt;br /&gt;
||any non-cansas1d/1.0 element can be used at this point&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASsample | SASsample]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the sample&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASinstrument | SASinstrument]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the instrument&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASsource | SASsource]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the source&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SAScollimation | SAScollimation]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the collimation&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASdetector | SASdetector]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the detector&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASprocess | SASprocess]]&lt;br /&gt;
||&lt;br /&gt;
||for each processing or analysis step&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASnote | SASnote]]&lt;br /&gt;
||&lt;br /&gt;
||anything at all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Required XML file header ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;?xml-stylesheet type=&amp;quot;text/xsl&amp;quot; href=&amp;quot;example.xsl&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;SASroot version=&amp;quot;1.0&amp;quot;&lt;br /&gt;
    xmlns=&amp;quot;cansas1d/1.0&amp;quot;&lt;br /&gt;
    xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;
    xsi:schemaLocation=&amp;quot;cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rules ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Q-geometry.jpg|thumb|definition of Q geometry for small-angle scattering]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Translation-orientation-geometry-2.jpg|thumb|definition of translation and orientation geometry]]&lt;br /&gt;
&lt;br /&gt;
# canSAS1d/1.0 XML data files will adhere to the standard if they can successfully [[cansas1d_documentation#Validation_of_XML_against_the_Schema | validate]] against the established XML Schema ([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d.xsd])&lt;br /&gt;
# Q=(4 &amp;amp;pi; / &amp;amp;lambda;) sin(&amp;amp;theta;) &amp;lt;br&amp;gt; where &amp;amp;lambda; is the wavelength of the radiation and 2&amp;amp;theta; is the angle through which the detected radiation has been scattered.&lt;br /&gt;
# units to be given in standard SI abbreviations (eg, m, cm, mm, nm, K) with the following exceptions: &lt;br /&gt;
##um=micrometres&lt;br /&gt;
##C=celsius&lt;br /&gt;
##A=Angstroms&lt;br /&gt;
##percent=%.&lt;br /&gt;
##fraction&lt;br /&gt;
##a.u.=arbitrary units&lt;br /&gt;
##none=no units are relevant (such as dimensionless)&lt;br /&gt;
# where reciprocal units need to be quoted the format shall be &amp;quot;1/abbreviation&amp;quot;&lt;br /&gt;
# when raised to a power, use similar to &amp;quot;A^3&amp;quot; or &amp;quot;1/m^4&amp;quot; (and not &amp;quot;A3&amp;quot; or &amp;quot;m-4&amp;quot;)&lt;br /&gt;
# axes:&lt;br /&gt;
##z is along the flight path (positive value in the direction of the detector)&lt;br /&gt;
##x is orthogonal to z in the horizontal plane (positive values increase to the right when viewed towards the incoming radiation)&lt;br /&gt;
##y is orthogonal to z and x in the vertical plane (positive values increase upwards)&lt;br /&gt;
#orientation (angles): &lt;br /&gt;
##roll is about z&lt;br /&gt;
##pitch is about x&lt;br /&gt;
##yaw is about y&lt;br /&gt;
# Unicode characters MUST NOT be used&lt;br /&gt;
# Binary data is not supported&lt;br /&gt;
&lt;br /&gt;
=== Compatibility of Geometry Definitions ===&lt;br /&gt;
&lt;br /&gt;
Note:  translation and orientation geometry used by canSAS are consistent with:&lt;br /&gt;
#http://en.wikipedia.org/wiki/Cartesian_coordinate_system&lt;br /&gt;
#http://en.wikipedia.org/wiki/Right-hand_rule&lt;br /&gt;
#http://www.nexusformat.org/Coordinate_Systems&lt;br /&gt;
#http://mcstas.risoe.dk/documentation/tutorial/node6.html&lt;br /&gt;
#http://webhost5.nts.jhu.edu/reza/book/kinematics/kinematics.htm&lt;br /&gt;
&lt;br /&gt;
The translation and orientation geometry definitions used &lt;br /&gt;
here are different than those used by&lt;br /&gt;
&#039;&#039;&#039;SHADOW&#039;&#039;&#039; ([http://www.nanotech.wisc.edu/shadow/ http://www.nanotech.wisc.edu/shadow/]) &lt;br /&gt;
where the &#039;&#039;y&#039;&#039; and &#039;&#039;z&#039;&#039; axes are swapped &lt;br /&gt;
and the direction of &#039;&#039;x&#039;&#039; is changed.&lt;br /&gt;
&lt;br /&gt;
= Documentation and Definitions =&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Documentation&#039;&#039;&#039;: [[cansas1d_documentation]]  (this page)&lt;br /&gt;
* &#039;&#039;&#039;Definitions&#039;&#039;&#039;:   [[cansas1d_definition_of_terms]]&lt;br /&gt;
* &#039;&#039;&#039;Block diagrams&#039;&#039;&#039;: [[cansas1d_block_diagrams]]&lt;br /&gt;
&lt;br /&gt;
== XML Schema ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XML Schema&#039;&#039;&#039;: The [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d.xsd] [http://www.w3schools.com/xsd XML Schema] defines the rules for the XML file format ([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd TRAC], [http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd SVN]) and is used to validate&lt;br /&gt;
any XML file for adherence to the format.&lt;br /&gt;
&lt;br /&gt;
== XML Stylesheets ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;example.xsl&#039;&#039;&#039;: [http://www.w3schools.com/xsl/ XSLT stylesheets] can be used to extract metadata or to convert into another file format.  The default canSAS stylesheet [[http://svn.smallangles.net/svn/canSAS/1dwg/trunk/example.xsl | example.xsl]] should be copied into the each folder with canSAS XML data file(s).   It can be used to display the data in a supporting WWW browser (such as Firefox or Internet Explorer) or to import into Microsoft Excel (with the added XML support in Excel).   By default, MS Windows binds &#039;&#039;&#039;*.xml&#039;&#039;&#039; files to start Internet Explorer.  Double-clicking on a canSAS XML data file with the [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/example.xsl &#039;&#039;&#039;example.xsl&#039;&#039;&#039;] stylesheet in the same directory will produce a WWW page with the SAS data and selected metadata.&lt;br /&gt;
&lt;br /&gt;
== Examples and Case Studies ==&lt;br /&gt;
&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] basic example: Note that, for clarity, only one row of data is shown.  This is probably a very good example to use as a starting point for creating XML files with a text editor.&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/bimodal-test1.xml bimodal-test1.xml]: Simulated SAS data to test size distribution calculation routines.&lt;br /&gt;
* [[cansas1d_casestudy_collagen | dry chick collagen]]: illustrates the minimum information necessary to meet the requirements of the standard format&lt;br /&gt;
* [[cansas1d_casestudy_af1410 | AF1410 steel]]: SANS study using magnetic contrast variation (with multiple samples and multiple data sets for each sample), the files can be viewed from TRAC (no description yet):  [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/examples/af1410/ http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/examples/af1410/]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d-template.xml cansas1d-template.xml]: This is used to test all the rules in the XML Schema.  This is probably not a very good example to use as a starting point for creating XML files with a text editor since it tests many of the special-case rules.&lt;br /&gt;
&lt;br /&gt;
=== XML layout for multiple experiments ===&lt;br /&gt;
&lt;br /&gt;
Each experiment is described with a single &#039;&#039;&#039;SASentry&#039;&#039;&#039; element.&lt;br /&gt;
The fragment below shows how multiple experiments can be included &lt;br /&gt;
in a single XML file.  Full examples of canSAS XML files with multiple experiments include:&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/W1W2.XML ISIS LOQ SANS instrument]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cs_af1410.xml NIST SANS data]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;?xml-stylesheet type=&amp;quot;text/xsl&amp;quot; href=&amp;quot;example.xsl&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;SASroot version=&amp;quot;1.0&amp;quot;&lt;br /&gt;
    xmlns=&amp;quot;cansas1d/1.0&amp;quot;&lt;br /&gt;
    xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;
    xsi:schemaLocation=&amp;quot;cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;071121.dat#S22&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- contents of the first experiment in the file go here --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;example temperature series&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- example with two SAS data sets related to the same sample --&amp;gt;&lt;br /&gt;
    &amp;lt;Title&amp;gt;title of this series&amp;lt;/Title&amp;gt;&lt;br /&gt;
    &amp;lt;Run name=&amp;quot;run1&amp;quot;&amp;gt;42-001&amp;lt;/Run&amp;gt;&lt;br /&gt;
    &amp;lt;Run name=&amp;quot;run2&amp;quot;&amp;gt;42-002&amp;lt;/Run&amp;gt;&lt;br /&gt;
    &amp;lt;SASdata name=&amp;quot;run1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;!-- data from 42-001 run comes here --&amp;gt;&lt;br /&gt;
    &amp;lt;/SASdata&amp;gt;&lt;br /&gt;
    &amp;lt;SASdata name=&amp;quot;run2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;!-- data from 42-002 run comes here --&amp;gt;&lt;br /&gt;
    &amp;lt;/SASdata&amp;gt;&lt;br /&gt;
    &amp;lt;!-- other elements come here for this entry --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;other sample&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- any number of additional experiments can be included, as desired --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- SASentry elements in the same XML file do not have to be related --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
&amp;lt;/SASroot&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Foreign Elements ==&lt;br /&gt;
&lt;br /&gt;
To allow for inclusion of elements that are not defined by the cansas1d.xsd XML Schema, &lt;br /&gt;
XML &#039;&#039;foreign elements&#039;&#039; are permitted at select locations in the cansas1d/1.0 format.&lt;br /&gt;
Please refer to the references (and others) [[#Help_for_XML | below]] for deeper discussions on foreign elements.&lt;br /&gt;
&lt;br /&gt;
An example of the use of foreign elements in the cansas1d/1.0 format is given by&lt;br /&gt;
* http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/s81-polyurea.xml&lt;br /&gt;
&lt;br /&gt;
== Support tools for Visualization &amp;amp; Analysis software ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;(under development as of May 2008)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Binding for IgorPro ===&lt;br /&gt;
&lt;br /&gt;
An import tool (a.k.a. binding) for [http://www.wavemetrics.com/ IgorPro] has been created&lt;br /&gt;
([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/IgorPro/cansasXML.ipf cansasXML.ipf]).&lt;br /&gt;
[[cansas1d_binding_IgorPro | Documentation]] is available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that this tool is not a true [http://en.wikipedia.org/wiki/Binding_%28computer_science%29 binding] in that the structure of the XML file is not replicated in IgorPro data structures.  This tool reads the vectors of 1-D SAS data (Q, I, ...) into IgorPro waves (Qsas, Isas, ...).  The tool also reads most of the metadata into an IgorPro textWave for use by other support in IgorPro.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Status:&lt;br /&gt;
* Capabilities&lt;br /&gt;
** test suite of XML files developed&lt;br /&gt;
** import the XML files into IgorPro&lt;br /&gt;
* open TRAC tickets (as of 2008-05-15)&lt;br /&gt;
** http://svn.smallangles.net/trac/canSAS/ticket/3&lt;br /&gt;
** http://svn.smallangles.net/trac/canSAS/ticket/10&lt;br /&gt;
* Further&lt;br /&gt;
** conversation with Andrew Nelson shows more efficiency can be gained from minor redesign.&lt;br /&gt;
** Development of a GUI (to support the [http://usaxs.xor.aps.anl.gov/staff/ilavsky/irena.html Irena] package) has begun&lt;br /&gt;
** Development to add export capabilities (from IgorPro) back to the cansas1d/1.0 format has begun&lt;br /&gt;
&lt;br /&gt;
=== Binding for Java ===&lt;br /&gt;
&lt;br /&gt;
A [http://java.sun.com/developer/technicalArticles/WebServices/jaxb/ JAXB] [http://en.wikipedia.org/wiki/Binding_%28computer_science%29 binding] for Java has been created.&lt;br /&gt;
(http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/java/cansas1d).&lt;br /&gt;
[[cansas1d_binding_Java | Documentation]] is in progress.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that this tool replicates the structure of the XML file into Java data structures.  Additional Java software must be applied to convert the /SASdata/Idata/* elements into vectors of &#039;&#039;I(Q)&#039;&#039; data.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Status:&lt;br /&gt;
* Capabilities&lt;br /&gt;
** import the XML files into Java&lt;br /&gt;
** tested by use in collimation-correction (desmearing) software (not publicly available at this time)&lt;br /&gt;
* Further&lt;br /&gt;
** need to test export capabilities&lt;br /&gt;
&lt;br /&gt;
=== Support for Python ===&lt;br /&gt;
&lt;br /&gt;
Specific support for the cansas1d/1.0 data standard in Python has not been developed.&lt;br /&gt;
However, some constructive suggestions are being gathered on a specific &lt;br /&gt;
[[cansas1d_binding_Python | Python Documentation]] page.&lt;br /&gt;
&lt;br /&gt;
=== Support for ForTran ===&lt;br /&gt;
&lt;br /&gt;
Specific support for the cansas1d/1.0 data standard in FORTRAN (remember? It stands for FORmula TRANslation) has not been developed.&lt;br /&gt;
However, some information is gathered on a specific &lt;br /&gt;
[[cansas1d_binding_Fortran | Fortran Documentation]] page.&lt;br /&gt;
&lt;br /&gt;
== Software repositories ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;TRAC&#039;&#039;&#039;:       [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk]&lt;br /&gt;
* &#039;&#039;&#039;Subversion&#039;&#039;&#039;: [http://svn.smallangles.net/svn/canSAS/1dwg http://svn.smallangles.net/svn/canSAS/1dwg]  &amp;lt;br /&amp;gt;(&amp;lt;nowiki&amp;gt;svn checkout http://svn.smallangles.net/svn/canSAS/1dwg/trunk/ cansas-1dwg&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
= Validation of XML against the Schema =&lt;br /&gt;
# open browser to:   http://www.xmlvalidation.com/&lt;br /&gt;
# paste content of candidate XML file (with reference in the header to the XML Schema as shown above) into the form&lt;br /&gt;
# press &amp;lt;validate&amp;gt;&lt;br /&gt;
# paste content of [http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd cansas1d.xsd] XSD file into form and press &amp;lt;continue validation&amp;gt;&lt;br /&gt;
# check the results&lt;br /&gt;
&lt;br /&gt;
= Help for XML =&lt;br /&gt;
; XML: EXtensible Markup Language &amp;lt;br /&amp;gt; http://www.w3schools.com/xml/ &amp;lt;br /&amp;gt; http://www.w3.org/XML/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XML &amp;lt;br /&amp;gt; http://www.zvon.org/xxl/XPathTutorial/General/examples.html&lt;br /&gt;
; XSL (or XSLT): EXtensible Stylesheet Language &amp;lt;br /&amp;gt; http://www.w3schools.com/xsl/ &amp;lt;br /&amp;gt; http://www.w3.org/Style/XSL/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/Extensible_Stylesheet_Language &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XSLT&lt;br /&gt;
; XPath: XPath is a language for finding information in an XML document. &amp;lt;br /&amp;gt; http://www.w3schools.com/xpath/ &amp;lt;br /&amp;gt; http://www.w3.org/Style/XSL/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XPath&lt;br /&gt;
; Schema: An XML Schema describes the structure of an XML document. &amp;lt;br /&amp;gt; http://www.w3schools.com/schema/ &amp;lt;br /&amp;gt; http://www.w3.org/XML/Schema &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XSD&lt;br /&gt;
; XML Namespaces: XML namespaces are used for providing uniquely named elements and attributes in an XML instance. &amp;lt;br /&amp;gt; http://www.zvon.org/xxl/NamespaceTutorial/Output &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XML_namespaces &amp;lt;br /&amp;gt; http://www.w3schools.com/XML/xml_namespaces.asp&lt;br /&gt;
; XML Foreign Elements: Inclusion of elements, at select locations, that are not defined by the cansas1d.xsd XML Schema &amp;lt;br /&amp;gt; http://books.xmlschemata.org/relaxng/relax-CHP-11-SECT-4.html &amp;lt;br /&amp;gt; http://www.w3.org/TR/SVG/extend.html &amp;lt;br /&amp;gt; http://www.google.com/search?q=XML+foreign+elements&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_documentation&amp;diff=431</id>
		<title>cansas1d documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_documentation&amp;diff=431"/>
		<updated>2008-05-19T10:06:25Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: /* Support for ForTran */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Disclaimer =&lt;br /&gt;
&lt;br /&gt;
This description is meant to inform the community how to layout&lt;br /&gt;
the information within the XML files.  However, should the&lt;br /&gt;
information in this document and the [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d/1.0 SAS XML Schema]&lt;br /&gt;
differ, the XML Schema will be deemed to have the most correct description&lt;br /&gt;
of the standard.&lt;br /&gt;
&lt;br /&gt;
= Objective =&lt;br /&gt;
&lt;br /&gt;
One of the first aims of the canSAS (Collective Action for Nomadic Small-Angle Scatterers) forum of users, software developers, and facility staff was to discuss better sharing of SAS data analysis software. [http://www.smallangles.net/canSAS/ CanSAS] identified that a significant need within the SAS community can be satisfied by a robust, self-describing, text-based, standard format to communicate reduced one-dimensional small-angle scattering data, &#039;&#039;I(Q)&#039;&#039;, between users of our facilities.  Our goal has been to define such a format that leaves the data file instantly human-readable, editable in the simplest of editors, and importable by simple text import filters in programs that need not recognise advanced structure in the file nor require advanced programming interfaces.  The file should contain both the primary data of &#039;&#039;I(Q)&#039;&#039; and also any other descriptive information (metadata) about the sample, measurement, instrument, processing, or analysis steps.&lt;br /&gt;
	&lt;br /&gt;
The cansas1d/1.0 standard meets the objectives for a 1D standard, incorporating metadata about the measurement, parameters and results of processing or analysis steps.  Even multiple measurements (related or unrelated) may be included within a single XML file.&lt;br /&gt;
&lt;br /&gt;
= General Layout of the XML Data =&lt;br /&gt;
&lt;br /&gt;
The canSAS 1-D standard for reduced 1-D SAS data is implemented using XML files.&lt;br /&gt;
A single file can contain SAS data from a single experiment or multiple experiments.&lt;br /&gt;
All types of relevant data (&#039;&#039;I(Q)&#039;&#039;, metadata) are described for each experiment.&lt;br /&gt;
More details are provided below.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[Image:cansas1d-v1-10-minimum.png|thumb|block diagram of minimum elements required for cansas1d/1.0 standard]]&lt;br /&gt;
&lt;br /&gt;
The basic elements of the cansas1d/1.0 standard are shown in the following table.&lt;br /&gt;
After an XML header, the root element of the file is [[cansas1d_SASroot | SASroot]] which &lt;br /&gt;
contains one or more [[cansas1d_SASentry | SASentry]] elements, each of which describes&lt;br /&gt;
a single experiment (data set, time-slice, step in a series, new &lt;br /&gt;
sample, etc.).  Details of the [[cansas1d_SASentry | SASentry]] element are also&lt;br /&gt;
shown in the next figure.  Refer to the [[cansas1d_block_diagrams | block diagrams]] &lt;br /&gt;
for alternative depictions.  See [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] for an example XML file.&lt;br /&gt;
Examples, Case Studies, and other background information are below.  More discussion can be found on the [[1D_Data_Formats_Working_Group|canSAS 1D Data Formats Working Group]] page and its [[Talk:1D_Data_Formats_Working_Group|discussion]] page.  Details about &lt;br /&gt;
each specific field (XPath string, XML elements and attributes) are described &lt;br /&gt;
on the [[cansas1d_definition_of_terms]] page.&lt;br /&gt;
&lt;br /&gt;
* [[cansas1d_SASroot | &#039;&#039;&#039;SASroot&#039;&#039;&#039;: the root element of the file (after the XML header)]]&lt;br /&gt;
* [[cansas1d_SASentry | &#039;&#039;&#039;SASentry&#039;&#039;&#039;: describes a single experiment (data set, time-slice, step in a series, new sample, etc.)]]&lt;br /&gt;
* [[cansas1d_block_diagrams | block diagrams]]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] example XML file&lt;br /&gt;
* discussion of this format: [[1D_Data_Formats_Working_Group | basic]] [[Talk:1D_Data_Formats_Working_Group | more]]&lt;br /&gt;
* [[# Help_for_XML | Seek outside help for XML]]&lt;br /&gt;
* [[cansas1d_definition_of_terms | &#039;&#039;&#039;Definition of terms&#039;&#039;&#039;: Details about each specific field (XPath string, XML elements and attributes)]]&lt;br /&gt;
&lt;br /&gt;
=== Basic elements of the cansas1d/1.0 standard ===&lt;br /&gt;
&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
! {{Headcellstyle}} | element&lt;br /&gt;
|| &amp;amp;nbsp;&lt;br /&gt;
! {{Headcellstyle}} | description&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
[[cansas1d_XML_header | XML header]]&lt;br /&gt;
||&lt;br /&gt;
||descriptive info required at the start of every XML file&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:[[cansas1d_SASroot | SASroot]]&lt;br /&gt;
||&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::[[cansas1d_SASentry | SASentry]]&lt;br /&gt;
||&lt;br /&gt;
||data set, time-slice, step in a series, new sample, etc.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::Title&lt;br /&gt;
||&lt;br /&gt;
||for this particular SASentry&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::Run&lt;br /&gt;
||&lt;br /&gt;
||run number or ID number of experiment&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_any | {any}]]&lt;br /&gt;
||&lt;br /&gt;
||any non-cansas1d/1.0 element can be used at this point&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASdata | SASdata]]&lt;br /&gt;
||&lt;br /&gt;
||this is where the reduced 1-D SAS data is stored&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASdata | Idata]]&lt;br /&gt;
||&lt;br /&gt;
||a single data point in the dataset&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_any | {any}]]&lt;br /&gt;
||&lt;br /&gt;
||any non-cansas1d/1.0 element can be used at this point&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASsample | SASsample]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the sample&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASinstrument | SASinstrument]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the instrument&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASsource | SASsource]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the source&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SAScollimation | SAScollimation]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the collimation&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASdetector | SASdetector]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the detector&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASprocess | SASprocess]]&lt;br /&gt;
||&lt;br /&gt;
||for each processing or analysis step&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASnote | SASnote]]&lt;br /&gt;
||&lt;br /&gt;
||anything at all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Required XML file header ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;?xml-stylesheet type=&amp;quot;text/xsl&amp;quot; href=&amp;quot;example.xsl&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;SASroot version=&amp;quot;1.0&amp;quot;&lt;br /&gt;
    xmlns=&amp;quot;cansas1d/1.0&amp;quot;&lt;br /&gt;
    xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;
    xsi:schemaLocation=&amp;quot;cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rules ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Q-geometry.jpg|thumb|definition of Q geometry for small-angle scattering]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Translation-orientation-geometry-2.jpg|thumb|definition of translation and orientation geometry]]&lt;br /&gt;
&lt;br /&gt;
# canSAS1d/1.0 XML data files will adhere to the standard if they can successfully [[cansas1d_documentation#Validation_of_XML_against_the_Schema | validate]] against the established XML Schema ([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d.xsd])&lt;br /&gt;
# Q=(4 &amp;amp;pi; / &amp;amp;lambda;) sin(&amp;amp;theta;) &amp;lt;br&amp;gt; where &amp;amp;lambda; is the wavelength of the radiation and 2&amp;amp;theta; is the angle through which the detected radiation has been scattered.&lt;br /&gt;
# units to be given in standard SI abbreviations (eg, m, cm, mm, nm, K) with the following exceptions: &lt;br /&gt;
##um=micrometres&lt;br /&gt;
##C=celsius&lt;br /&gt;
##A=Angstroms&lt;br /&gt;
##percent=%.&lt;br /&gt;
##fraction&lt;br /&gt;
##a.u.=arbitrary units&lt;br /&gt;
##none=no units are relevant (such as dimensionless)&lt;br /&gt;
# where reciprocal units need to be quoted the format shall be &amp;quot;1/abbreviation&amp;quot;&lt;br /&gt;
# when raised to a power, use similar to &amp;quot;A^3&amp;quot; or &amp;quot;1/m^4&amp;quot; (and not &amp;quot;A3&amp;quot; or &amp;quot;m-4&amp;quot;)&lt;br /&gt;
# axes:&lt;br /&gt;
##z is along the flight path (positive value in the direction of the detector)&lt;br /&gt;
##x is orthogonal to z in the horizontal plane (positive values increase to the right when viewed towards the incoming radiation)&lt;br /&gt;
##y is orthogonal to z and x in the vertical plane (positive values increase upwards)&lt;br /&gt;
#orientation (angles): &lt;br /&gt;
##roll is about z&lt;br /&gt;
##pitch is about x&lt;br /&gt;
##yaw is about y&lt;br /&gt;
# Unicode characters MUST NOT be used&lt;br /&gt;
# Binary data is not supported&lt;br /&gt;
&lt;br /&gt;
=== Compatibility of Geometry Definitions ===&lt;br /&gt;
&lt;br /&gt;
Note:  translation and orientation geometry used by canSAS are consistent with:&lt;br /&gt;
#http://en.wikipedia.org/wiki/Cartesian_coordinate_system&lt;br /&gt;
#http://en.wikipedia.org/wiki/Right-hand_rule&lt;br /&gt;
#http://www.nexusformat.org/Coordinate_Systems&lt;br /&gt;
#http://mcstas.risoe.dk/documentation/tutorial/node6.html&lt;br /&gt;
#http://webhost5.nts.jhu.edu/reza/book/kinematics/kinematics.htm&lt;br /&gt;
&lt;br /&gt;
The translation and orientation geometry definitions used &lt;br /&gt;
here are different than those used by&lt;br /&gt;
&#039;&#039;&#039;SHADOW&#039;&#039;&#039; ([http://www.nanotech.wisc.edu/shadow/ http://www.nanotech.wisc.edu/shadow/]) &lt;br /&gt;
where the &#039;&#039;y&#039;&#039; and &#039;&#039;z&#039;&#039; axes are swapped &lt;br /&gt;
and the direction of &#039;&#039;x&#039;&#039; is changed.&lt;br /&gt;
&lt;br /&gt;
= Documentation and Definitions =&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Documentation&#039;&#039;&#039;: [[cansas1d_documentation]]  (this page)&lt;br /&gt;
* &#039;&#039;&#039;Definitions&#039;&#039;&#039;:   [[cansas1d_definition_of_terms]]&lt;br /&gt;
* &#039;&#039;&#039;Block diagrams&#039;&#039;&#039;: [[cansas1d_block_diagrams]]&lt;br /&gt;
&lt;br /&gt;
== XML Schema ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XML Schema&#039;&#039;&#039;: The [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d.xsd] [http://www.w3schools.com/xsd XML Schema] defines the rules for the XML file format ([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd TRAC], [http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd SVN]) and is used to validate&lt;br /&gt;
any XML file for adherence to the format.&lt;br /&gt;
&lt;br /&gt;
== XML Stylesheets ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;example.xsl&#039;&#039;&#039;: [http://www.w3schools.com/xsl/ XSLT stylesheets] can be used to extract metadata or to convert into another file format.  The default canSAS stylesheet [[http://svn.smallangles.net/svn/canSAS/1dwg/trunk/example.xsl | example.xsl]] should be copied into the each folder with canSAS XML data file(s).   It can be used to display the data in a supporting WWW browser (such as Firefox or Internet Explorer) or to import into Microsoft Excel (with the added XML support in Excel).   By default, MS Windows binds &#039;&#039;&#039;*.xml&#039;&#039;&#039; files to start Internet Explorer.  Double-clicking on a canSAS XML data file with the [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/example.xsl &#039;&#039;&#039;example.xsl&#039;&#039;&#039;] stylesheet in the same directory will produce a WWW page with the SAS data and selected metadata.&lt;br /&gt;
&lt;br /&gt;
== Examples and Case Studies ==&lt;br /&gt;
&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] basic example: Note that, for clarity, only one row of data is shown.  This is probably a very good example to use as a starting point for creating XML files with a text editor.&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/bimodal-test1.xml bimodal-test1.xml]: Simulated SAS data to test size distribution calculation routines.&lt;br /&gt;
* [[cansas1d_casestudy_collagen | dry chick collagen]]: illustrates the minimum information necessary to meet the requirements of the standard format&lt;br /&gt;
* [[cansas1d_casestudy_af1410 | AF1410 steel]]: SANS study using magnetic contrast variation (with multiple samples and multiple data sets for each sample), the files can be viewed from TRAC (no description yet):  [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/examples/af1410/ http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/examples/af1410/]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d-template.xml cansas1d-template.xml]: This is used to test all the rules in the XML Schema.  This is probably not a very good example to use as a starting point for creating XML files with a text editor since it tests many of the special-case rules.&lt;br /&gt;
&lt;br /&gt;
=== XML layout for multiple experiments ===&lt;br /&gt;
&lt;br /&gt;
Each experiment is described with a single &#039;&#039;&#039;SASentry&#039;&#039;&#039; element.&lt;br /&gt;
The fragment below shows how multiple experiments can be included &lt;br /&gt;
in a single XML file.  Full examples of canSAS XML files with multiple experiments include:&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/W1W2.XML ISIS LOQ SANS instrument]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cs_af1410.xml NIST SANS data]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;?xml-stylesheet type=&amp;quot;text/xsl&amp;quot; href=&amp;quot;example.xsl&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;SASroot version=&amp;quot;1.0&amp;quot;&lt;br /&gt;
    xmlns=&amp;quot;cansas1d/1.0&amp;quot;&lt;br /&gt;
    xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;
    xsi:schemaLocation=&amp;quot;cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;071121.dat#S22&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- contents of the first experiment in the file go here --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;example temperature series&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- example with two SAS data sets related to the same sample --&amp;gt;&lt;br /&gt;
    &amp;lt;Title&amp;gt;title of this series&amp;lt;/Title&amp;gt;&lt;br /&gt;
    &amp;lt;Run name=&amp;quot;run1&amp;quot;&amp;gt;42-001&amp;lt;/Run&amp;gt;&lt;br /&gt;
    &amp;lt;Run name=&amp;quot;run2&amp;quot;&amp;gt;42-002&amp;lt;/Run&amp;gt;&lt;br /&gt;
    &amp;lt;SASdata name=&amp;quot;run1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;!-- data from 42-001 run comes here --&amp;gt;&lt;br /&gt;
    &amp;lt;/SASdata&amp;gt;&lt;br /&gt;
    &amp;lt;SASdata name=&amp;quot;run2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;!-- data from 42-002 run comes here --&amp;gt;&lt;br /&gt;
    &amp;lt;/SASdata&amp;gt;&lt;br /&gt;
    &amp;lt;!-- other elements come here for this entry --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;other sample&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- any number of additional experiments can be included, as desired --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- SASentry elements in the same XML file do not have to be related --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
&amp;lt;/SASroot&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Foreign Elements ==&lt;br /&gt;
&lt;br /&gt;
To allow for inclusion of elements that are not defined by the cansas1d.xsd XML Schema, &lt;br /&gt;
XML &#039;&#039;foreign elements&#039;&#039; are permitted at select locations in the cansas1d/1.0 format.&lt;br /&gt;
Please refer to the references (and others) [[#Help_for_XML | below]] for deeper discussions on foreign elements.&lt;br /&gt;
&lt;br /&gt;
An example of the use of foreign elements in the cansas1d/1.0 format is given by&lt;br /&gt;
* http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/s81-polyurea.xml&lt;br /&gt;
&lt;br /&gt;
== Support tools for Visualization &amp;amp; Analysis software ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;(under development as of May 2008)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Binding for IgorPro ===&lt;br /&gt;
&lt;br /&gt;
An import tool (a.k.a. binding) for [http://www.wavemetrics.com/ IgorPro] has been created&lt;br /&gt;
([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/IgorPro/cansasXML.ipf cansasXML.ipf]).&lt;br /&gt;
[[cansas1d_binding_IgorPro | Documentation]] is available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that this tool is not a true [http://en.wikipedia.org/wiki/Binding_%28computer_science%29 binding] in that the structure of the XML file is not replicated in IgorPro data structures.  This tool reads the vectors of 1-D SAS data (Q, I, ...) into IgorPro waves (Qsas, Isas, ...).  The tool also reads most of the metadata into an IgorPro textWave for use by other support in IgorPro.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Status:&lt;br /&gt;
* Capabilities&lt;br /&gt;
** test suite of XML files developed&lt;br /&gt;
** import the XML files into IgorPro&lt;br /&gt;
* open TRAC tickets (as of 2008-05-15)&lt;br /&gt;
** http://svn.smallangles.net/trac/canSAS/ticket/3&lt;br /&gt;
** http://svn.smallangles.net/trac/canSAS/ticket/10&lt;br /&gt;
* Further&lt;br /&gt;
** conversation with Andrew Nelson shows more efficiency can be gained from minor redesign.&lt;br /&gt;
** Development of a GUI (to support the [http://usaxs.xor.aps.anl.gov/staff/ilavsky/irena.html Irena] package) has begun&lt;br /&gt;
** Development to add export capabilities (from IgorPro) back to the cansas1d/1.0 format has begun&lt;br /&gt;
&lt;br /&gt;
=== Binding for Java ===&lt;br /&gt;
&lt;br /&gt;
A [http://java.sun.com/developer/technicalArticles/WebServices/jaxb/ JAXB] [http://en.wikipedia.org/wiki/Binding_%28computer_science%29 binding] for Java has been created.&lt;br /&gt;
(http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/java/cansas1d).&lt;br /&gt;
[[cansas1d_binding_Java | Documentation]] is in progress.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that this tool replicates the structure of the XML file into Java data structures.  Additional Java software must be applied to convert the /SASdata/Idata/* elements into vectors of &#039;&#039;I(Q)&#039;&#039; data.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Status:&lt;br /&gt;
* Capabilities&lt;br /&gt;
** import the XML files into Java&lt;br /&gt;
** tested by use in collimation-correction (desmearing) software (not publicly available at this time)&lt;br /&gt;
* Further&lt;br /&gt;
** need to test export capabilities&lt;br /&gt;
&lt;br /&gt;
=== Support for Python ===&lt;br /&gt;
&lt;br /&gt;
Specific support for the cansas1d/1.0 data standard in Python has not been developed.&lt;br /&gt;
However, some constructive suggestions are being gathered on a specific &lt;br /&gt;
[[cansas1d_binding_Python | Python Documentation]] page.&lt;br /&gt;
&lt;br /&gt;
=== Support for ForTran ===&lt;br /&gt;
&lt;br /&gt;
Specific support for the cansas1d/1.0 data standard in FORTRAN (remember?  FORTRAN stands for FORmula TRANslation) has not been developed.&lt;br /&gt;
However, some constructive suggestions could be gathered on a specific &lt;br /&gt;
[[cansas1d_binding_Fortran | Fortran Documentation]] page.&lt;br /&gt;
&lt;br /&gt;
== Software repositories ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;TRAC&#039;&#039;&#039;:       [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk]&lt;br /&gt;
* &#039;&#039;&#039;Subversion&#039;&#039;&#039;: [http://svn.smallangles.net/svn/canSAS/1dwg http://svn.smallangles.net/svn/canSAS/1dwg]  &amp;lt;br /&amp;gt;(&amp;lt;nowiki&amp;gt;svn checkout http://svn.smallangles.net/svn/canSAS/1dwg/trunk/ cansas-1dwg&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
= Validation of XML against the Schema =&lt;br /&gt;
# open browser to:   http://www.xmlvalidation.com/&lt;br /&gt;
# paste content of candidate XML file (with reference in the header to the XML Schema as shown above) into the form&lt;br /&gt;
# press &amp;lt;validate&amp;gt;&lt;br /&gt;
# paste content of [http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd cansas1d.xsd] XSD file into form and press &amp;lt;continue validation&amp;gt;&lt;br /&gt;
# check the results&lt;br /&gt;
&lt;br /&gt;
= Help for XML =&lt;br /&gt;
; XML: EXtensible Markup Language &amp;lt;br /&amp;gt; http://www.w3schools.com/xml/ &amp;lt;br /&amp;gt; http://www.w3.org/XML/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XML &amp;lt;br /&amp;gt; http://www.zvon.org/xxl/XPathTutorial/General/examples.html&lt;br /&gt;
; XSL (or XSLT): EXtensible Stylesheet Language &amp;lt;br /&amp;gt; http://www.w3schools.com/xsl/ &amp;lt;br /&amp;gt; http://www.w3.org/Style/XSL/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/Extensible_Stylesheet_Language &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XSLT&lt;br /&gt;
; XPath: XPath is a language for finding information in an XML document. &amp;lt;br /&amp;gt; http://www.w3schools.com/xpath/ &amp;lt;br /&amp;gt; http://www.w3.org/Style/XSL/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XPath&lt;br /&gt;
; Schema: An XML Schema describes the structure of an XML document. &amp;lt;br /&amp;gt; http://www.w3schools.com/schema/ &amp;lt;br /&amp;gt; http://www.w3.org/XML/Schema &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XSD&lt;br /&gt;
; XML Namespaces: XML namespaces are used for providing uniquely named elements and attributes in an XML instance. &amp;lt;br /&amp;gt; http://www.zvon.org/xxl/NamespaceTutorial/Output &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XML_namespaces &amp;lt;br /&amp;gt; http://www.w3schools.com/XML/xml_namespaces.asp&lt;br /&gt;
; XML Foreign Elements: Inclusion of elements, at select locations, that are not defined by the cansas1d.xsd XML Schema &amp;lt;br /&amp;gt; http://books.xmlschemata.org/relaxng/relax-CHP-11-SECT-4.html &amp;lt;br /&amp;gt; http://www.w3.org/TR/SVG/extend.html &amp;lt;br /&amp;gt; http://www.google.com/search?q=XML+foreign+elements&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=cansas1d_documentation&amp;diff=430</id>
		<title>cansas1d documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=cansas1d_documentation&amp;diff=430"/>
		<updated>2008-05-19T10:05:20Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: /* Support for ForTran */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Disclaimer =&lt;br /&gt;
&lt;br /&gt;
This description is meant to inform the community how to layout&lt;br /&gt;
the information within the XML files.  However, should the&lt;br /&gt;
information in this document and the [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d/1.0 SAS XML Schema]&lt;br /&gt;
differ, the XML Schema will be deemed to have the most correct description&lt;br /&gt;
of the standard.&lt;br /&gt;
&lt;br /&gt;
= Objective =&lt;br /&gt;
&lt;br /&gt;
One of the first aims of the canSAS (Collective Action for Nomadic Small-Angle Scatterers) forum of users, software developers, and facility staff was to discuss better sharing of SAS data analysis software. [http://www.smallangles.net/canSAS/ CanSAS] identified that a significant need within the SAS community can be satisfied by a robust, self-describing, text-based, standard format to communicate reduced one-dimensional small-angle scattering data, &#039;&#039;I(Q)&#039;&#039;, between users of our facilities.  Our goal has been to define such a format that leaves the data file instantly human-readable, editable in the simplest of editors, and importable by simple text import filters in programs that need not recognise advanced structure in the file nor require advanced programming interfaces.  The file should contain both the primary data of &#039;&#039;I(Q)&#039;&#039; and also any other descriptive information (metadata) about the sample, measurement, instrument, processing, or analysis steps.&lt;br /&gt;
	&lt;br /&gt;
The cansas1d/1.0 standard meets the objectives for a 1D standard, incorporating metadata about the measurement, parameters and results of processing or analysis steps.  Even multiple measurements (related or unrelated) may be included within a single XML file.&lt;br /&gt;
&lt;br /&gt;
= General Layout of the XML Data =&lt;br /&gt;
&lt;br /&gt;
The canSAS 1-D standard for reduced 1-D SAS data is implemented using XML files.&lt;br /&gt;
A single file can contain SAS data from a single experiment or multiple experiments.&lt;br /&gt;
All types of relevant data (&#039;&#039;I(Q)&#039;&#039;, metadata) are described for each experiment.&lt;br /&gt;
More details are provided below.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[Image:cansas1d-v1-10-minimum.png|thumb|block diagram of minimum elements required for cansas1d/1.0 standard]]&lt;br /&gt;
&lt;br /&gt;
The basic elements of the cansas1d/1.0 standard are shown in the following table.&lt;br /&gt;
After an XML header, the root element of the file is [[cansas1d_SASroot | SASroot]] which &lt;br /&gt;
contains one or more [[cansas1d_SASentry | SASentry]] elements, each of which describes&lt;br /&gt;
a single experiment (data set, time-slice, step in a series, new &lt;br /&gt;
sample, etc.).  Details of the [[cansas1d_SASentry | SASentry]] element are also&lt;br /&gt;
shown in the next figure.  Refer to the [[cansas1d_block_diagrams | block diagrams]] &lt;br /&gt;
for alternative depictions.  See [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] for an example XML file.&lt;br /&gt;
Examples, Case Studies, and other background information are below.  More discussion can be found on the [[1D_Data_Formats_Working_Group|canSAS 1D Data Formats Working Group]] page and its [[Talk:1D_Data_Formats_Working_Group|discussion]] page.  Details about &lt;br /&gt;
each specific field (XPath string, XML elements and attributes) are described &lt;br /&gt;
on the [[cansas1d_definition_of_terms]] page.&lt;br /&gt;
&lt;br /&gt;
* [[cansas1d_SASroot | &#039;&#039;&#039;SASroot&#039;&#039;&#039;: the root element of the file (after the XML header)]]&lt;br /&gt;
* [[cansas1d_SASentry | &#039;&#039;&#039;SASentry&#039;&#039;&#039;: describes a single experiment (data set, time-slice, step in a series, new sample, etc.)]]&lt;br /&gt;
* [[cansas1d_block_diagrams | block diagrams]]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] example XML file&lt;br /&gt;
* discussion of this format: [[1D_Data_Formats_Working_Group | basic]] [[Talk:1D_Data_Formats_Working_Group | more]]&lt;br /&gt;
* [[# Help_for_XML | Seek outside help for XML]]&lt;br /&gt;
* [[cansas1d_definition_of_terms | &#039;&#039;&#039;Definition of terms&#039;&#039;&#039;: Details about each specific field (XPath string, XML elements and attributes)]]&lt;br /&gt;
&lt;br /&gt;
=== Basic elements of the cansas1d/1.0 standard ===&lt;br /&gt;
&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
! {{Headcellstyle}} | element&lt;br /&gt;
|| &amp;amp;nbsp;&lt;br /&gt;
! {{Headcellstyle}} | description&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
[[cansas1d_XML_header | XML header]]&lt;br /&gt;
||&lt;br /&gt;
||descriptive info required at the start of every XML file&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:[[cansas1d_SASroot | SASroot]]&lt;br /&gt;
||&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::[[cansas1d_SASentry | SASentry]]&lt;br /&gt;
||&lt;br /&gt;
||data set, time-slice, step in a series, new sample, etc.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::Title&lt;br /&gt;
||&lt;br /&gt;
||for this particular SASentry&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::Run&lt;br /&gt;
||&lt;br /&gt;
||run number or ID number of experiment&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_any | {any}]]&lt;br /&gt;
||&lt;br /&gt;
||any non-cansas1d/1.0 element can be used at this point&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASdata | SASdata]]&lt;br /&gt;
||&lt;br /&gt;
||this is where the reduced 1-D SAS data is stored&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASdata | Idata]]&lt;br /&gt;
||&lt;br /&gt;
||a single data point in the dataset&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_any | {any}]]&lt;br /&gt;
||&lt;br /&gt;
||any non-cansas1d/1.0 element can be used at this point&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASsample | SASsample]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the sample&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASinstrument | SASinstrument]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the instrument&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASsource | SASsource]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the source&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SAScollimation | SAScollimation]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the collimation&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
::::[[cansas1d_SASdetector | SASdetector]]&lt;br /&gt;
||&lt;br /&gt;
|| description of the detector&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASprocess | SASprocess]]&lt;br /&gt;
||&lt;br /&gt;
||for each processing or analysis step&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
:::[[cansas1d_SASnote | SASnote]]&lt;br /&gt;
||&lt;br /&gt;
||anything at all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Required XML file header ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;?xml-stylesheet type=&amp;quot;text/xsl&amp;quot; href=&amp;quot;example.xsl&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;SASroot version=&amp;quot;1.0&amp;quot;&lt;br /&gt;
    xmlns=&amp;quot;cansas1d/1.0&amp;quot;&lt;br /&gt;
    xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;
    xsi:schemaLocation=&amp;quot;cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rules ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Q-geometry.jpg|thumb|definition of Q geometry for small-angle scattering]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Translation-orientation-geometry-2.jpg|thumb|definition of translation and orientation geometry]]&lt;br /&gt;
&lt;br /&gt;
# canSAS1d/1.0 XML data files will adhere to the standard if they can successfully [[cansas1d_documentation#Validation_of_XML_against_the_Schema | validate]] against the established XML Schema ([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d.xsd])&lt;br /&gt;
# Q=(4 &amp;amp;pi; / &amp;amp;lambda;) sin(&amp;amp;theta;) &amp;lt;br&amp;gt; where &amp;amp;lambda; is the wavelength of the radiation and 2&amp;amp;theta; is the angle through which the detected radiation has been scattered.&lt;br /&gt;
# units to be given in standard SI abbreviations (eg, m, cm, mm, nm, K) with the following exceptions: &lt;br /&gt;
##um=micrometres&lt;br /&gt;
##C=celsius&lt;br /&gt;
##A=Angstroms&lt;br /&gt;
##percent=%.&lt;br /&gt;
##fraction&lt;br /&gt;
##a.u.=arbitrary units&lt;br /&gt;
##none=no units are relevant (such as dimensionless)&lt;br /&gt;
# where reciprocal units need to be quoted the format shall be &amp;quot;1/abbreviation&amp;quot;&lt;br /&gt;
# when raised to a power, use similar to &amp;quot;A^3&amp;quot; or &amp;quot;1/m^4&amp;quot; (and not &amp;quot;A3&amp;quot; or &amp;quot;m-4&amp;quot;)&lt;br /&gt;
# axes:&lt;br /&gt;
##z is along the flight path (positive value in the direction of the detector)&lt;br /&gt;
##x is orthogonal to z in the horizontal plane (positive values increase to the right when viewed towards the incoming radiation)&lt;br /&gt;
##y is orthogonal to z and x in the vertical plane (positive values increase upwards)&lt;br /&gt;
#orientation (angles): &lt;br /&gt;
##roll is about z&lt;br /&gt;
##pitch is about x&lt;br /&gt;
##yaw is about y&lt;br /&gt;
# Unicode characters MUST NOT be used&lt;br /&gt;
# Binary data is not supported&lt;br /&gt;
&lt;br /&gt;
=== Compatibility of Geometry Definitions ===&lt;br /&gt;
&lt;br /&gt;
Note:  translation and orientation geometry used by canSAS are consistent with:&lt;br /&gt;
#http://en.wikipedia.org/wiki/Cartesian_coordinate_system&lt;br /&gt;
#http://en.wikipedia.org/wiki/Right-hand_rule&lt;br /&gt;
#http://www.nexusformat.org/Coordinate_Systems&lt;br /&gt;
#http://mcstas.risoe.dk/documentation/tutorial/node6.html&lt;br /&gt;
#http://webhost5.nts.jhu.edu/reza/book/kinematics/kinematics.htm&lt;br /&gt;
&lt;br /&gt;
The translation and orientation geometry definitions used &lt;br /&gt;
here are different than those used by&lt;br /&gt;
&#039;&#039;&#039;SHADOW&#039;&#039;&#039; ([http://www.nanotech.wisc.edu/shadow/ http://www.nanotech.wisc.edu/shadow/]) &lt;br /&gt;
where the &#039;&#039;y&#039;&#039; and &#039;&#039;z&#039;&#039; axes are swapped &lt;br /&gt;
and the direction of &#039;&#039;x&#039;&#039; is changed.&lt;br /&gt;
&lt;br /&gt;
= Documentation and Definitions =&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Documentation&#039;&#039;&#039;: [[cansas1d_documentation]]  (this page)&lt;br /&gt;
* &#039;&#039;&#039;Definitions&#039;&#039;&#039;:   [[cansas1d_definition_of_terms]]&lt;br /&gt;
* &#039;&#039;&#039;Block diagrams&#039;&#039;&#039;: [[cansas1d_block_diagrams]]&lt;br /&gt;
&lt;br /&gt;
== XML Schema ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XML Schema&#039;&#039;&#039;: The [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd cansas1d.xsd] [http://www.w3schools.com/xsd XML Schema] defines the rules for the XML file format ([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xsd TRAC], [http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd SVN]) and is used to validate&lt;br /&gt;
any XML file for adherence to the format.&lt;br /&gt;
&lt;br /&gt;
== XML Stylesheets ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;example.xsl&#039;&#039;&#039;: [http://www.w3schools.com/xsl/ XSLT stylesheets] can be used to extract metadata or to convert into another file format.  The default canSAS stylesheet [[http://svn.smallangles.net/svn/canSAS/1dwg/trunk/example.xsl | example.xsl]] should be copied into the each folder with canSAS XML data file(s).   It can be used to display the data in a supporting WWW browser (such as Firefox or Internet Explorer) or to import into Microsoft Excel (with the added XML support in Excel).   By default, MS Windows binds &#039;&#039;&#039;*.xml&#039;&#039;&#039; files to start Internet Explorer.  Double-clicking on a canSAS XML data file with the [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/example.xsl &#039;&#039;&#039;example.xsl&#039;&#039;&#039;] stylesheet in the same directory will produce a WWW page with the SAS data and selected metadata.&lt;br /&gt;
&lt;br /&gt;
== Examples and Case Studies ==&lt;br /&gt;
&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d.xml cansas1d.xml] basic example: Note that, for clarity, only one row of data is shown.  This is probably a very good example to use as a starting point for creating XML files with a text editor.&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/bimodal-test1.xml bimodal-test1.xml]: Simulated SAS data to test size distribution calculation routines.&lt;br /&gt;
* [[cansas1d_casestudy_collagen | dry chick collagen]]: illustrates the minimum information necessary to meet the requirements of the standard format&lt;br /&gt;
* [[cansas1d_casestudy_af1410 | AF1410 steel]]: SANS study using magnetic contrast variation (with multiple samples and multiple data sets for each sample), the files can be viewed from TRAC (no description yet):  [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/examples/af1410/ http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/examples/af1410/]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cansas1d-template.xml cansas1d-template.xml]: This is used to test all the rules in the XML Schema.  This is probably not a very good example to use as a starting point for creating XML files with a text editor since it tests many of the special-case rules.&lt;br /&gt;
&lt;br /&gt;
=== XML layout for multiple experiments ===&lt;br /&gt;
&lt;br /&gt;
Each experiment is described with a single &#039;&#039;&#039;SASentry&#039;&#039;&#039; element.&lt;br /&gt;
The fragment below shows how multiple experiments can be included &lt;br /&gt;
in a single XML file.  Full examples of canSAS XML files with multiple experiments include:&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/W1W2.XML ISIS LOQ SANS instrument]&lt;br /&gt;
* [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/cs_af1410.xml NIST SANS data]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;?xml-stylesheet type=&amp;quot;text/xsl&amp;quot; href=&amp;quot;example.xsl&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;SASroot version=&amp;quot;1.0&amp;quot;&lt;br /&gt;
    xmlns=&amp;quot;cansas1d/1.0&amp;quot;&lt;br /&gt;
    xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;
    xsi:schemaLocation=&amp;quot;cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;071121.dat#S22&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- contents of the first experiment in the file go here --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;example temperature series&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- example with two SAS data sets related to the same sample --&amp;gt;&lt;br /&gt;
    &amp;lt;Title&amp;gt;title of this series&amp;lt;/Title&amp;gt;&lt;br /&gt;
    &amp;lt;Run name=&amp;quot;run1&amp;quot;&amp;gt;42-001&amp;lt;/Run&amp;gt;&lt;br /&gt;
    &amp;lt;Run name=&amp;quot;run2&amp;quot;&amp;gt;42-002&amp;lt;/Run&amp;gt;&lt;br /&gt;
    &amp;lt;SASdata name=&amp;quot;run1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;!-- data from 42-001 run comes here --&amp;gt;&lt;br /&gt;
    &amp;lt;/SASdata&amp;gt;&lt;br /&gt;
    &amp;lt;SASdata name=&amp;quot;run2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;!-- data from 42-002 run comes here --&amp;gt;&lt;br /&gt;
    &amp;lt;/SASdata&amp;gt;&lt;br /&gt;
    &amp;lt;!-- other elements come here for this entry --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
  &amp;lt;SASentry name=&amp;quot;other sample&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- any number of additional experiments can be included, as desired --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- SASentry elements in the same XML file do not have to be related --&amp;gt;&lt;br /&gt;
  &amp;lt;/SASentry&amp;gt;&lt;br /&gt;
&amp;lt;/SASroot&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Foreign Elements ==&lt;br /&gt;
&lt;br /&gt;
To allow for inclusion of elements that are not defined by the cansas1d.xsd XML Schema, &lt;br /&gt;
XML &#039;&#039;foreign elements&#039;&#039; are permitted at select locations in the cansas1d/1.0 format.&lt;br /&gt;
Please refer to the references (and others) [[#Help_for_XML | below]] for deeper discussions on foreign elements.&lt;br /&gt;
&lt;br /&gt;
An example of the use of foreign elements in the cansas1d/1.0 format is given by&lt;br /&gt;
* http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/s81-polyurea.xml&lt;br /&gt;
&lt;br /&gt;
== Support tools for Visualization &amp;amp; Analysis software ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;(under development as of May 2008)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Binding for IgorPro ===&lt;br /&gt;
&lt;br /&gt;
An import tool (a.k.a. binding) for [http://www.wavemetrics.com/ IgorPro] has been created&lt;br /&gt;
([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/IgorPro/cansasXML.ipf cansasXML.ipf]).&lt;br /&gt;
[[cansas1d_binding_IgorPro | Documentation]] is available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that this tool is not a true [http://en.wikipedia.org/wiki/Binding_%28computer_science%29 binding] in that the structure of the XML file is not replicated in IgorPro data structures.  This tool reads the vectors of 1-D SAS data (Q, I, ...) into IgorPro waves (Qsas, Isas, ...).  The tool also reads most of the metadata into an IgorPro textWave for use by other support in IgorPro.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Status:&lt;br /&gt;
* Capabilities&lt;br /&gt;
** test suite of XML files developed&lt;br /&gt;
** import the XML files into IgorPro&lt;br /&gt;
* open TRAC tickets (as of 2008-05-15)&lt;br /&gt;
** http://svn.smallangles.net/trac/canSAS/ticket/3&lt;br /&gt;
** http://svn.smallangles.net/trac/canSAS/ticket/10&lt;br /&gt;
* Further&lt;br /&gt;
** conversation with Andrew Nelson shows more efficiency can be gained from minor redesign.&lt;br /&gt;
** Development of a GUI (to support the [http://usaxs.xor.aps.anl.gov/staff/ilavsky/irena.html Irena] package) has begun&lt;br /&gt;
** Development to add export capabilities (from IgorPro) back to the cansas1d/1.0 format has begun&lt;br /&gt;
&lt;br /&gt;
=== Binding for Java ===&lt;br /&gt;
&lt;br /&gt;
A [http://java.sun.com/developer/technicalArticles/WebServices/jaxb/ JAXB] [http://en.wikipedia.org/wiki/Binding_%28computer_science%29 binding] for Java has been created.&lt;br /&gt;
(http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/java/cansas1d).&lt;br /&gt;
[[cansas1d_binding_Java | Documentation]] is in progress.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that this tool replicates the structure of the XML file into Java data structures.  Additional Java software must be applied to convert the /SASdata/Idata/* elements into vectors of &#039;&#039;I(Q)&#039;&#039; data.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Status:&lt;br /&gt;
* Capabilities&lt;br /&gt;
** import the XML files into Java&lt;br /&gt;
** tested by use in collimation-correction (desmearing) software (not publicly available at this time)&lt;br /&gt;
* Further&lt;br /&gt;
** need to test export capabilities&lt;br /&gt;
&lt;br /&gt;
=== Support for Python ===&lt;br /&gt;
&lt;br /&gt;
Specific support for the cansas1d/1.0 data standard in Python has not been developed.&lt;br /&gt;
However, some constructive suggestions are being gathered on a specific &lt;br /&gt;
[[cansas1d_binding_Python | Python Documentation]] page.&lt;br /&gt;
&lt;br /&gt;
=== Support for ForTran ===&lt;br /&gt;
&lt;br /&gt;
Specific support for the cansas1d/1.0 data standard in ForTran (remember?  ForTran stands for Formula Translation) has not been developed.&lt;br /&gt;
However, some constructive suggestions could be gathered on a specific &lt;br /&gt;
[[cansas1d_binding_Fortran | Fortran Documentation]] page.&lt;br /&gt;
&lt;br /&gt;
== Software repositories ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;TRAC&#039;&#039;&#039;:       [http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk]&lt;br /&gt;
* &#039;&#039;&#039;Subversion&#039;&#039;&#039;: [http://svn.smallangles.net/svn/canSAS/1dwg http://svn.smallangles.net/svn/canSAS/1dwg]  &amp;lt;br /&amp;gt;(&amp;lt;nowiki&amp;gt;svn checkout http://svn.smallangles.net/svn/canSAS/1dwg/trunk/ cansas-1dwg&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
= Validation of XML against the Schema =&lt;br /&gt;
# open browser to:   http://www.xmlvalidation.com/&lt;br /&gt;
# paste content of candidate XML file (with reference in the header to the XML Schema as shown above) into the form&lt;br /&gt;
# press &amp;lt;validate&amp;gt;&lt;br /&gt;
# paste content of [http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd cansas1d.xsd] XSD file into form and press &amp;lt;continue validation&amp;gt;&lt;br /&gt;
# check the results&lt;br /&gt;
&lt;br /&gt;
= Help for XML =&lt;br /&gt;
; XML: EXtensible Markup Language &amp;lt;br /&amp;gt; http://www.w3schools.com/xml/ &amp;lt;br /&amp;gt; http://www.w3.org/XML/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XML &amp;lt;br /&amp;gt; http://www.zvon.org/xxl/XPathTutorial/General/examples.html&lt;br /&gt;
; XSL (or XSLT): EXtensible Stylesheet Language &amp;lt;br /&amp;gt; http://www.w3schools.com/xsl/ &amp;lt;br /&amp;gt; http://www.w3.org/Style/XSL/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/Extensible_Stylesheet_Language &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XSLT&lt;br /&gt;
; XPath: XPath is a language for finding information in an XML document. &amp;lt;br /&amp;gt; http://www.w3schools.com/xpath/ &amp;lt;br /&amp;gt; http://www.w3.org/Style/XSL/ &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XPath&lt;br /&gt;
; Schema: An XML Schema describes the structure of an XML document. &amp;lt;br /&amp;gt; http://www.w3schools.com/schema/ &amp;lt;br /&amp;gt; http://www.w3.org/XML/Schema &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XSD&lt;br /&gt;
; XML Namespaces: XML namespaces are used for providing uniquely named elements and attributes in an XML instance. &amp;lt;br /&amp;gt; http://www.zvon.org/xxl/NamespaceTutorial/Output &amp;lt;br /&amp;gt; http://en.wikipedia.org/wiki/XML_namespaces &amp;lt;br /&amp;gt; http://www.w3schools.com/XML/xml_namespaces.asp&lt;br /&gt;
; XML Foreign Elements: Inclusion of elements, at select locations, that are not defined by the cansas1d.xsd XML Schema &amp;lt;br /&amp;gt; http://books.xmlschemata.org/relaxng/relax-CHP-11-SECT-4.html &amp;lt;br /&amp;gt; http://www.w3.org/TR/SVG/extend.html &amp;lt;br /&amp;gt; http://www.google.com/search?q=XML+foreign+elements&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
	<entry>
		<id>https://wiki.cansas.org/index.php?title=Talk:Data_Formats_Working_Group&amp;diff=113</id>
		<title>Talk:Data Formats Working Group</title>
		<link rel="alternate" type="text/html" href="https://wiki.cansas.org/index.php?title=Talk:Data_Formats_Working_Group&amp;diff=113"/>
		<updated>2007-12-18T11:32:33Z</updated>

		<summary type="html">&lt;p&gt;130.246.132.26: /* In the Idata tag */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----&lt;br /&gt;
&lt;br /&gt;
==Which way to declare the units?==&lt;br /&gt;
--[[User:Jemian|Jemian]] 18:06, 17 December 2007 (EST)&lt;br /&gt;
Cast your vote by attaching initials to one of these three methods.&lt;br /&gt;
&lt;br /&gt;
===In the Idata tag===&lt;br /&gt;
votes: PRJ, ARJN, SMK&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;SASdata&amp;gt;&lt;br /&gt;
      &amp;lt;Idata&amp;gt;&lt;br /&gt;
        &amp;lt;Q units=&amp;quot;1/A&amp;quot;&amp;gt;&amp;lt;/Q&amp;gt;&lt;br /&gt;
        &amp;lt;I units=&amp;quot;1/cm&amp;quot;&amp;gt;&amp;lt;/I&amp;gt;&lt;br /&gt;
        &amp;lt;Qdev units=&amp;quot;1/A&amp;quot;&amp;gt;&amp;lt;/Qdev&amp;gt;&lt;br /&gt;
        &amp;lt;Idev units=&amp;quot;1/cm&amp;quot;&amp;gt;&amp;lt;/Idev&amp;gt;&lt;br /&gt;
        &amp;lt;Qfwhm units=&amp;quot;1/A&amp;quot;&amp;gt;&amp;lt;!--  Qfwhm is optional  --&amp;gt;&amp;lt;/Qfwhm&amp;gt;&lt;br /&gt;
        &amp;lt;Qmean units=&amp;quot;1/A&amp;quot;&amp;gt;&amp;lt;!--  Qmean is optional  --&amp;gt;&amp;lt;/Qmean&amp;gt;&lt;br /&gt;
        &amp;lt;ShadowFactor units=&amp;quot;1/A&amp;quot;&amp;gt;&amp;lt;!--  ShadowFactor is optional  --&amp;gt;&amp;lt;/ShadowFactor&amp;gt;&lt;br /&gt;
      &amp;lt;/Idata&amp;gt;&lt;br /&gt;
    &amp;lt;/SASdata&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===As attributes of the SASdata tag===&lt;br /&gt;
votes: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;SASdata &lt;br /&gt;
         entries=&amp;quot;Q:I:Qdev:Idev:Qfwhm:Qmean:ShadowFactor&amp;quot; &lt;br /&gt;
         units=&amp;quot;1/A:1/cm:1/A:1/cm:1/A:1/A:1/A&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;Idata&amp;gt;&lt;br /&gt;
        &amp;lt;Q&amp;gt;&amp;lt;/Q&amp;gt;&lt;br /&gt;
        &amp;lt;I&amp;gt;&amp;lt;/I&amp;gt;&lt;br /&gt;
        &amp;lt;Qdev&amp;gt;&amp;lt;/Qdev&amp;gt;&lt;br /&gt;
        &amp;lt;Idev&amp;gt;&amp;lt;/Idev&amp;gt;&lt;br /&gt;
        &amp;lt;Qfwhm&amp;gt;&amp;lt;!  Qfwhm is optional  &amp;gt;&amp;lt;/Qfwhm&amp;gt;&lt;br /&gt;
        &amp;lt;Qmean&amp;gt;&amp;lt;!--  Qmean is optional  --&amp;gt;&amp;lt;/Qmean&amp;gt;&lt;br /&gt;
        &amp;lt;ShadowFactor&amp;gt;&amp;lt;!--  ShadowFactor is optional  --&amp;gt;&amp;lt;/ShadowFactor&amp;gt;&lt;br /&gt;
      &amp;lt;/Idata&amp;gt;&lt;br /&gt;
    &amp;lt;/SASdata&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===As axis declarations within the SASdata tag===&lt;br /&gt;
votes: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;SASdata&amp;gt;&lt;br /&gt;
      &amp;lt;axis name=&amp;quot;Q&amp;quot;     units=&amp;quot;1/A&amp;quot;  type=&amp;quot;Idata&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;axis name=&amp;quot;I&amp;quot;     units=&amp;quot;1/cm&amp;quot; type=&amp;quot;Idata&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;axis name=&amp;quot;Qdev&amp;quot;  units=&amp;quot;1/A&amp;quot;  type=&amp;quot;constant&amp;quot; &amp;gt;0.000085&amp;lt;/axis&amp;gt;&lt;br /&gt;
      &amp;lt;axis name=&amp;quot;Idev&amp;quot;  units=&amp;quot;1/cm&amp;quot; type=&amp;quot;Idata&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;axis name=&amp;quot;Qfwhm&amp;quot; units=&amp;quot;1/A&amp;quot;  type=&amp;quot;constant&amp;quot; &amp;gt;0.000191&amp;lt;/axis&amp;gt;&lt;br /&gt;
      &amp;lt;axis name=&amp;quot;Qmean&amp;quot; units=&amp;quot;1/A&amp;quot;  type=&amp;quot;undefined&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;axis name=&amp;quot;ShadowFactor&amp;quot; units=&amp;quot;1/A&amp;quot;  type=&amp;quot;undefined&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;Idata&amp;gt;&lt;br /&gt;
        &amp;lt;Q&amp;gt;&amp;lt;/Q&amp;gt;&lt;br /&gt;
        &amp;lt;I&amp;gt;&amp;lt;/I&amp;gt;&lt;br /&gt;
        &amp;lt;Qdev&amp;gt;&amp;lt;/Qdev&amp;gt;&lt;br /&gt;
        &amp;lt;Idev&amp;gt;&amp;lt;/Idev&amp;gt;&lt;br /&gt;
        &amp;lt;Qfwhm&amp;gt;&amp;lt;!  Qfwhm is optional  &amp;gt;&amp;lt;/Qfwhm&amp;gt;&lt;br /&gt;
        &amp;lt;Qmean&amp;gt;&amp;lt;!--  Qmean is optional  --&amp;gt;&amp;lt;/Qmean&amp;gt;&lt;br /&gt;
        &amp;lt;ShadowFactor&amp;gt;&amp;lt;!--  ShadowFactor is optional  --&amp;gt;&amp;lt;/ShadowFactor&amp;gt;&lt;br /&gt;
      &amp;lt;/Idata&amp;gt;&lt;br /&gt;
    &amp;lt;/SASdata&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Jemian|Jemian]] 12:01, 14 December 2007 (EST) items moved from main page&lt;br /&gt;
==Considerations==&lt;br /&gt;
* a key point of what we discussed at NIST:  &lt;br /&gt;
namely that our goal is to agree a format which that whilst using as much best XML practice as is reasonable, leaves the file instantly human-readable, editable in the simplest of editors, and importable by simple text import filters in programs that don&#039;t recognise the XML.&lt;br /&gt;
* document what we decide&lt;br /&gt;
**1DWG will take care of documenting the format it defines.&lt;br /&gt;
*** make that definition with a schema (for absolute validation of any proposed XML file against the standard)&lt;br /&gt;
*** instructions on how to use that schema&lt;br /&gt;
*** XSL style sheets to present the XML contents in various forms (also serves as examples)&lt;br /&gt;
*** a couple of examples&lt;br /&gt;
*** maybe also some words.&lt;br /&gt;
** move some of this discussion to&lt;br /&gt;
*** discussion page&lt;br /&gt;
*** other wiki pages&lt;br /&gt;
*** /dev/null after its usefulness has been exhausted&lt;br /&gt;
* coordinate with other communities&lt;br /&gt;
** [http://www.nexusformat.org NeXus (http://www.nexusformat.org)]&lt;br /&gt;
** reflectivity &lt;br /&gt;
** powder diffraction&lt;br /&gt;
*** [http://www.xrdml.com XRDML (http://www.xrdml.com)]&lt;br /&gt;
* should we consider a file naming convention?&lt;br /&gt;
* should we consider a SAS scan naming convention?&lt;br /&gt;
** sequential run number from facility&lt;br /&gt;
** convention set by the detector software provider&lt;br /&gt;
* XML representation of the I vs. Q data&lt;br /&gt;
** tabular format&lt;br /&gt;
** vector format&lt;br /&gt;
* general XML coding style&lt;br /&gt;
** readability by humans&lt;br /&gt;
*** with lots of computer skills&lt;br /&gt;
*** with rudimentary computer skills&lt;br /&gt;
** readability by computers&lt;br /&gt;
*** standard XML libraries&lt;br /&gt;
*** generic visualization tools&lt;br /&gt;
*** common software such as MS Excel   or Open Office   or [ftp://ftp.ill.fr/pub/cs/rxml XMLPLO source code for windows/linux/OSX86]&lt;br /&gt;
*** A plugin for IGOR has been written, [http://www.igorexchange.com/project/XMLutils XMLutils.xop], that can handle XML data.  The [[sasXML and IGOR]] page gives details on the IGOR code required to write the prototype sasXML file. &lt;br /&gt;
** availability of style sheets&lt;br /&gt;
* scalability of XML format to 2D data?&lt;br /&gt;
* What is required?&lt;br /&gt;
* What is optional?&lt;br /&gt;
* Use the same tags again in similar contexts&lt;br /&gt;
** X,Y pairs for example, whether detector position, beam center, sample position&lt;br /&gt;
{|  width=&amp;quot;100%&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;border:1px solid navy; border-collapse: collapse&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; | inconsistent&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; | consistent&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;beam_size axis=&amp;quot;x&amp;quot; units=&amp;quot;mm&amp;quot;&amp;gt;12.00&amp;lt;/beam_size&amp;gt;&lt;br /&gt;
&amp;lt;beam_size axis=&amp;quot;y&amp;quot; units=&amp;quot;mm&amp;quot;&amp;gt;12.00&amp;lt;/beam_size&amp;gt;&lt;br /&gt;
&amp;lt;x0 units=&amp;quot;mm&amp;quot;&amp;gt;322.64&amp;lt;/x0&amp;gt;&lt;br /&gt;
&amp;lt;y0 units=&amp;quot;mm&amp;quot;&amp;gt;327.68&amp;lt;/y0&amp;gt;&lt;br /&gt;
&amp;lt;pixel_x units=&amp;quot;mm&amp;quot;&amp;gt;5.00&amp;lt;/pixel_x&amp;gt;&lt;br /&gt;
&amp;lt;pixel_y units=&amp;quot;mm&amp;quot;&amp;gt;5.00&amp;lt;/pixel_y&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
| &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;beam_size axis=&amp;quot;x&amp;quot; units=&amp;quot;mm&amp;quot;&amp;gt;12.00&amp;lt;/beam_size&amp;gt;&lt;br /&gt;
&amp;lt;beam_size axis=&amp;quot;y&amp;quot; units=&amp;quot;mm&amp;quot;&amp;gt;12.00&amp;lt;/beam_size&amp;gt;&lt;br /&gt;
&amp;lt;beam_center axis=&amp;quot;x&amp;quot; units=&amp;quot;mm&amp;quot;&amp;gt;322.64&amp;lt;/beam_center&amp;gt;&lt;br /&gt;
&amp;lt;beam_center axis=&amp;quot;y&amp;quot; units=&amp;quot;mm&amp;quot;&amp;gt;327.68&amp;lt;/beam_center&amp;gt;&lt;br /&gt;
&amp;lt;pixel_size  axis=&amp;quot;x&amp;quot; units=&amp;quot;mm&amp;quot;&amp;gt;5.00&amp;lt;/pixel_size&amp;gt;&lt;br /&gt;
&amp;lt;pixel_size  axis=&amp;quot;y&amp;quot; units=&amp;quot;mm&amp;quot;&amp;gt;5.00&amp;lt;/pixel_size&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Points for Discussion===&lt;br /&gt;
&lt;br /&gt;
*Do we want to advocate/recommend particular names for particular tags; eg, SASdata, SASsample, Idata, etc.?&lt;br /&gt;
** which ones?&lt;br /&gt;
* provide for (optional) inclusion of sample prep details&lt;br /&gt;
* provide for (optional) inclusion of other (non-SAS) data in the XML&lt;br /&gt;
* Need to allow for more than a single SAS data set in one .xml file&lt;br /&gt;
&lt;br /&gt;
===Other Points===&lt;br /&gt;
* It&#039;s not clear how to specify that multiple runs were reduced together&lt;br /&gt;
**(AJJ) Assuming that those multiple runs were first stored as XML then referencing the individual files would give all that back information (a la Ghosh suggestion). At NIST we take absolute I vs Q files and combine them to produce an absolute I vs Q file thus that is reasonable here. What about elsewhere?&lt;br /&gt;
* How does one include the instrument information of the many runs that we used to make up the composite file&lt;br /&gt;
* If we have reduction information, then everything needs to be in there, i.e. the run numbers for the can, the standard, the uniform field, etc.&lt;br /&gt;
* Information on the averaging, is it radial, sector, rectangular, etc.&lt;/div&gt;</summary>
		<author><name>130.246.132.26</name></author>
	</entry>
</feed>