2012 Data Discussion Examples: Difference between revisions

From canSAS
mNo edit summary
(add missing _indices for time and other parameters)
 
(36 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Key examples =
see these for a quick overview:
* generic
* pathological


= 1D =
= 1D =
Line 8: Line 15:
SASentry
SASentry
SASdata
SASdata
@Q="Q"
@Q_indices=0
@Qindices="*"
@I_axes="Q"
@Iindices="Q"
I: float[100]
I: float[100]
Q: float[100]
Q: float[100]
Line 23: Line 29:
SASentry
SASentry
SASdata
SASdata
@Q="Q"
@Q_indices=1
@Qindices="*,"
@I_axes="Time,Q"
@Iindices="Q,time"
@Time_indices=0
I: float[100, ntime]
I: float[nTime,100]
Q: float[100]
Q: float[100]
t: float[ntime]
Time: float[nTime]
</pre>
</pre>


== example of generic 1D SAS data in a time series, I(Q(t), t) ==
== example of generic 1D SAS data in a time series, I(Q(t), t) ==
Line 39: Line 44:
SASentry
SASentry
SASdata
SASdata
@Q="Q"
@Q_indices=0,1
@Qindices="*,time"
@I_axes="Time,Q"
@Iindices="Q,time"
@Time_indices=0
I: float[100, ntime]
I: float[nTime,100]
Q: float[100, ntime]
Q: float[nTime,100]
t: float[ntime]
Time: float[nTime]
</pre>
</pre>


Line 58: Line 63:
SASentry
SASentry
SASdata
SASdata
@Q="Qx,Qy"
@Q_indices=0,1
@Qindices="*,*"
@I_axes="Q,Q"
@Iindices="Q,Q"
I: float[100, 512]
Qx: float[100, 512]
Qy: float[100, 512]
</pre>
 
== example of a simple masked 2D (image) SAS data, I(Q) ==
 
<pre>
SASroot
SASentry
SASdata
@Q_indices=0,1
@I_axes="Q,Q"
@Mask_indices=0,1
I: float[100, 512]
I: float[100, 512]
Qx: float[100, 512]
Qx: float[100, 512]
Qy: float[100, 512]
Qy: float[100, 512]
Mask: int[100, 512]
</pre>
</pre>


Line 74: Line 93:
SASentry
SASentry
SASdata
SASdata
@Q="Qx,Qy,Qz"
@Q_indices=0
@Qindices="*"
@I_axes="Q"
@Iindices="Q"
I: float[100*512]
I: float[100*512]
Qx: float[100*512]
Qx: float[100*512]
Line 82: Line 100:
Qz: float[100*512]
Qz: float[100*512]
</pre>
</pre>
== example of simple 2D SAS/WAS data, Isas(Q) & Iwas(Q) ==
Consider the multi-technique experiment that produces
small-angle and wide-angle scattering data images. 
The reduced data results in images as well. 
Each image might be described separately (see
[[2012_Data_Discussion_Examples#example_of_SAS_data_with_several_detectors.2C_I.28Q.29
| example of SAS data with several detectors]] for an alternative). 
Here the SAS data image is 100 x 512 pixels. 
The WAS data (not covered by this canSAS standard) is 256 x 256 pixels.
<pre>
SASroot
SASentry
SASdata
@name="sasdata"
@Q_indices=0,1
@I_axes="Q,Q"
I: float[100, 512]
Qx: float[100, 512]
Qy: float[100, 512]
SASdata
@name="wasdata"
@Q_indices=0,1
@I_axes="Q,Q"
I: float[256, 256]
Qx: float[256, 256]
Qy: float[256, 256]
</pre>
== example of 2D SANS and 2D SAXS, In(Q) & Ix(Q) ==
Consider the multi-technique experiment that produces
small-angle neutron and X-ray scattering data.
Here the SANS data image is 100 x 512 pixels and
the SAXS data is 256 x 256 pixels.
<pre>
SASroot
SASentry
SASdata
@name="sans"
@Q_indices=0
@I_axes="Q"
I: float[100*512]
Qx: float[100*512]
Qy: float[100*512]
SASdata
@name="saxs"
@Q_indices=0
@I_axes="Q"
I: float[256*256]
Qx: float[256*256]
Qy: float[256*256]
</pre>
= 2D with additional varied parameters =


== example of generic 2D SAS data in a time series, I(Q(t),t) ==
== example of generic 2D SAS data in a time series, I(Q(t),t) ==
Line 89: Line 165:
SASentry
SASentry
SASdata
SASdata
@Q="Qx,Qy,Qz"
@Q_indices=0,1
@Qindices="*,time"
@I_axes="Time,Q"
@Iindices="Q,time"
@Time_indices=0
I: float[100*512,ntime]
I: float[nTime,100*512]
Qx: float[100*512,ntime]
Qx: float[nTime,100*512]
Qy: float[100*512,ntime]
Qy: float[nTime,100*512]
Qz: float[100*512,ntime]
Qz: float[nTime,100*512]
t: float[ntime]
Time: float[nTime]
</pre>
</pre>


== example of generic 2D SAS data in a time, T, & P series, I(Q(t,T,P),t,T,P) ==
== example of 2D SAS data as images in a time series with a time-independent mask, I(Q(t),t) ==
 
This example explores a bit of complexity added to the previous example.


<pre>
<pre>
Line 105: Line 183:
SASentry
SASentry
SASdata
SASdata
@Q="Qx,Qy,Qz"
@Q_indices=0,1,2
@Qindices="*,time,T,P"
@I_axes="Time,Q,Q"
@Iindices="Q,time,T,P"
@Mask_indices=1,2
I: float[100*512,ntime,nT,nP]
@Time_indices=0
Qx: float[100*512,ntime,nT,nP]
I: float[nTime,100,512]
Qy: float[100*512,ntime,nT,nP]
Qx: float[nTime,100,512]
Qz: float[100*512,ntime,nT,nP]
Qy: float[nTime,100,512]
t: float[ntime]
Qz: float[nTime,100,512]
T: float[nT]
Time: float[nTime]
P: float[nP]
Mask: int[100,512]
</pre>
</pre>


== example of generic 2D SAS data in a time, T, & P series, I(T,Q(t),t,P) ==
== example of generic 2D SAS data in a time, T, & P series, I(t,T,P,Q(t,T,P)) ==


<pre>
<pre>
Line 123: Line 201:
SASentry
SASentry
SASdata
SASdata
@Q="Qx,Qy,Qz"
@Q_indices=0,1,2,3
@Qindices=",*,*,time,"
@I_axes="Time,Temperature,Pressure,Q"
@Iindices="T,Q,Q,time,P"
@Time_indices=0
I: float[nT,100,512,ntime,nP]
@Temperature_indices=1
Qx: float[100,512,ntime]
@Pressure_indices=2
Qy: float[100,512,ntime]
I: float[nTime,nTemperature,nPressure,100*512]
Qz: float[100,512,ntime]
Qx: float[nTime,nTemperature,nPressure,100*512]
t: float[ntime]
Qy: float[nTime,nTemperature,nPressure,100*512]
T: float[nT]
Qz: float[nTime,nTemperature,nPressure,100*512]
P: float[nP]
Time: float[nTime]
Temperature: float[nTemperature]
Pressure: float[nPressure]
</pre>
</pre>


== example of simple 2D SAS/WAS data, Isas(Q) & Iwas(Q) ==
== example of generic 2D SAS data (images) in a time, T, & P series, I(T,t,P,Q(t)) ==
 
Consider the multi-technique experiment that produces small-angle and wide-angle scattering data images.  The reduced data results in images as well.  Each image might be described separately (see [[2012_Data_Discussion_Examples#example_of_SAS_data_with_several_detectors.2C_I.28Q.29 | example of SAS data with several detectors]] for an alternative).  Here the SAS data image is 100 x 512 pixels.  The WAS data is 256 x 256 pixels.


<pre>
<pre>
Line 143: Line 221:
SASentry
SASentry
SASdata
SASdata
@Q="Qx,Qy"
@Q_indices=1,3,4
@Qindices="*,*"
@I_axes="Temperature,Time,Pressure,Q,Q"
@Iindices="Q,Q"
@Time_indices=1
I: float[100, 512]
@Temperature_indices=0
Qx: float[100, 512]
@Pressure_indices=2
Qy: float[100, 512]
I: float[nTemperature,nTime,nPressure,100,512]
WASdata
Qx: float[nTime,100,512]
@Q="Q1,Q2"
Qy: float[nTime,100,512]
@Qindices="*,*"
Qz: float[nTime,100,512]
@Iindices="Q,Q"
Time: float[nTime]
I: float[256, 256]
Temperature: float[nTemperature]
Q1: float[256, 256]
Pressure: float[nPressure]
Q2: float[256, 256]
</pre>
</pre>


Line 166: Line 243:
* Ib(Q) is derived from a 1D detector (2000 pixels)
* Ib(Q) is derived from a 1D detector (2000 pixels)
* Ic(Q) is derived from a 2D detector (256 x 256 pixels)
* Ic(Q) is derived from a 2D detector (256 x 256 pixels)
Data from a SAXS/MAXS/WAXS instrument might be represented thus.


<pre>
<pre>
Line 171: Line 250:
SASentry
SASentry
SASdata
SASdata
@Q="Qx,Qy,Qz"
@Q_indices=0
@Qindices="*"
@I_axes="Q"
@Iindices="Q"
I: float[100*512 + 2000 + 256*256]
I: float[100*512+2000+256*256]
Qx: float[100*512 + 2000 + 256*256]
Qx: float[100*512+2000+256*256]
Qy: float[100*512 + 2000 + 256*256]
Qy: float[100*512+2000+256*256]
Qz: float[100*512 + 2000 + 256*256]
Qz: float[100*512+2000+256*256]
</pre>
</pre>


Line 194: Line 272:
SASentry
SASentry
SASdata
SASdata
@Q="Qx,Qy"
@Q_indices="*,*"
@Qindices="*,*"
@I_axes=" ??? "
@Iindices=" ??? "
I: float[100, 512]
I: float[100, 512]
Qx: float[100]
Qx: float[100]
Line 208: Line 285:
== SASentry ==
== SASentry ==
some changes from the original 1D format
some changes from the original 1D format
needs a ''version'' attribute that describes the version of the canSAS definition of SASentry (use version="1.0")


== SASdata ==
== SASdata ==
different use from original 1D format, refers to a single reduced data set that can be represented thus (such as from one detector)
different use from original 1D format, refers to a single reduced data set that can be represented thus (such as from one detector)


SASdata has three possible attributes, as shown in this example:
SASdata has some possible attributes, as shown in this example:


<pre>
<pre>
@Q="Qx,Qy,Qz"
@Q_indices=1,3,4
@Qindices=",*,*,time,"
@I_axes="Temperature,Time,Pressure,Q,Q"
@Iindices="T,Q,Q,time,P"
@Mask_indices=3,4
</pre>
</pre>


Commas are used as delimiters in all cases.
To indicate the dependency relationships of other varied parameters, use attributes similar to ''@Mask_indices'' (such as ''@Temperature_indices'' or ''@Pressure_indices'').
 
=== @Q_indices ===
Array attribute that describes which indices (of the I data object) are used to reference Q.
The items in this array use zero-based indexing.


=== @Q ===
=== @I_axes ===
Comma-separated list that describes the names of the actual data objects that describe Q.
Comma-separated list that describes the names of the data objects that correspond to the indices of the I object.


=== @Qindices ===
=== @Mask_indices ===
Comma-separated list that describes which indices are used (from the I object) to reference Q. Leave a position empty if that index is not used to describe Q,  Use a "*" to describe an index that uses the Q definition.  For other data storage objects, name the object for the position where it should appear.
Array attribute that describes which indices (of the I data object) are used to reference Mask.
The items in this array use zero-based indexing.


=== @Iindices ===
= Algorithm for Readers =
Comma-separated list that describes which objects correspond to the indices of the I object.
For indices that involve Q, use the term "Q" and the @Qindices attribute will provide more information.

Latest revision as of 16:00, 10 August 2012

Key examples

see these for a quick overview:

  • generic
  • pathological

1D

example of simple 1D SAS data, I(Q)

SASroot
	SASentry
		SASdata
			@Q_indices=0
			@I_axes="Q"
			I: float[100]
			Q: float[100]

(see the Discussion page for an XML representation with the recommended minimum content)

example of simple 1D SAS data in a time series, I(Q, t)

SASroot
	SASentry
		SASdata
			@Q_indices=1
			@I_axes="Time,Q"
			@Time_indices=0
			I: float[nTime,100]
			Q: float[100]
			Time: float[nTime]

example of generic 1D SAS data in a time series, I(Q(t), t)

SASroot
	SASentry
		SASdata
			@Q_indices=0,1
			@I_axes="Time,Q"
			@Time_indices=0
			I: float[nTime,100]
			Q: float[nTime,100]
			Time: float[nTime]



2D

example of simple 2D (image) SAS data, I(Q)

SASroot
	SASentry
		SASdata
			@Q_indices=0,1
			@I_axes="Q,Q"
			I: float[100, 512]
			Qx: float[100, 512]
			Qy: float[100, 512]

example of a simple masked 2D (image) SAS data, I(Q)

SASroot
	SASentry
		SASdata
			@Q_indices=0,1
			@I_axes="Q,Q"
			@Mask_indices=0,1
			I: float[100, 512]
			Qx: float[100, 512]
			Qy: float[100, 512]
			Mask: int[100, 512]

example of generic 2D SAS data, I(Q)

Could use this model, for example, to describe data from multiple detectors (by listing individual pixels off all detectors). Or, could describe data from one detector of any geometry. This is the most flexible.

SASroot
	SASentry
		SASdata
			@Q_indices=0
			@I_axes="Q"
			I: float[100*512]
			Qx: float[100*512]
			Qy: float[100*512]
			Qz: float[100*512]

example of simple 2D SAS/WAS data, Isas(Q) & Iwas(Q)

Consider the multi-technique experiment that produces small-angle and wide-angle scattering data images. The reduced data results in images as well. Each image might be described separately (see [[2012_Data_Discussion_Examples#example_of_SAS_data_with_several_detectors.2C_I.28Q.29 | example of SAS data with several detectors]] for an alternative). Here the SAS data image is 100 x 512 pixels. The WAS data (not covered by this canSAS standard) is 256 x 256 pixels.

SASroot
	SASentry
		SASdata
			@name="sasdata"
			@Q_indices=0,1
			@I_axes="Q,Q"
			I: float[100, 512]
			Qx: float[100, 512]
			Qy: float[100, 512]
		SASdata
			@name="wasdata"
			@Q_indices=0,1
			@I_axes="Q,Q"
			I: float[256, 256]
			Qx: float[256, 256]
			Qy: float[256, 256]

example of 2D SANS and 2D SAXS, In(Q) & Ix(Q)

Consider the multi-technique experiment that produces small-angle neutron and X-ray scattering data. Here the SANS data image is 100 x 512 pixels and the SAXS data is 256 x 256 pixels.

SASroot
	SASentry
		SASdata
			@name="sans"
			@Q_indices=0
			@I_axes="Q"
			I: float[100*512]
			Qx: float[100*512]
			Qy: float[100*512]
		SASdata
			@name="saxs"
			@Q_indices=0
			@I_axes="Q"
			I: float[256*256]
			Qx: float[256*256]
			Qy: float[256*256]

2D with additional varied parameters

example of generic 2D SAS data in a time series, I(Q(t),t)

SASroot
	SASentry
		SASdata
			@Q_indices=0,1
			@I_axes="Time,Q"
			@Time_indices=0
			I: float[nTime,100*512]
			Qx: float[nTime,100*512]
			Qy: float[nTime,100*512]
			Qz: float[nTime,100*512]
			Time: float[nTime]

example of 2D SAS data as images in a time series with a time-independent mask, I(Q(t),t)

This example explores a bit of complexity added to the previous example.

SASroot
	SASentry
		SASdata
			@Q_indices=0,1,2
			@I_axes="Time,Q,Q"
			@Mask_indices=1,2
			@Time_indices=0
			I: float[nTime,100,512]
			Qx: float[nTime,100,512]
			Qy: float[nTime,100,512]
			Qz: float[nTime,100,512]
			Time: float[nTime]
			Mask: int[100,512]

example of generic 2D SAS data in a time, T, & P series, I(t,T,P,Q(t,T,P))

SASroot
	SASentry
		SASdata
			@Q_indices=0,1,2,3
			@I_axes="Time,Temperature,Pressure,Q"
			@Time_indices=0
			@Temperature_indices=1
			@Pressure_indices=2
			I: float[nTime,nTemperature,nPressure,100*512]
			Qx: float[nTime,nTemperature,nPressure,100*512]
			Qy: float[nTime,nTemperature,nPressure,100*512]
			Qz: float[nTime,nTemperature,nPressure,100*512]
			Time: float[nTime]
			Temperature: float[nTemperature]
			Pressure: float[nPressure]

example of generic 2D SAS data (images) in a time, T, & P series, I(T,t,P,Q(t))

SASroot
	SASentry
		SASdata
			@Q_indices=1,3,4
			@I_axes="Temperature,Time,Pressure,Q,Q"
			@Time_indices=1
			@Temperature_indices=0
			@Pressure_indices=2
			I: float[nTemperature,nTime,nPressure,100,512]
			Qx: float[nTime,100,512]
			Qy: float[nTime,100,512]
			Qz: float[nTime,100,512]
			Time: float[nTime]
			Temperature: float[nTemperature]
			Pressure: float[nPressure]

example of SAS data with several detectors, I(Q)

Here, the data are appended to common data objects. This hypothetical case has reduced data derived from three detectors, Ia(Q), Ib(Q), and Ic(Q):

  • Ia(Q) is derived from a 2D detector (100 x 512 pixels)
  • Ib(Q) is derived from a 1D detector (2000 pixels)
  • Ic(Q) is derived from a 2D detector (256 x 256 pixels)

Data from a SAXS/MAXS/WAXS instrument might be represented thus.

SASroot
	SASentry
		SASdata
			@Q_indices=0
			@I_axes="Q"
			I: float[100*512  + 2000 + 256*256]
			Qx: float[100*512 + 2000 + 256*256]
			Qy: float[100*512 + 2000 + 256*256]
			Qz: float[100*512 + 2000 + 256*256]

invalid case

example of **over-simple** 2D (image) SAS data, I(Q)

Invalid because the method of addressing the Q values is different from all the above.


SASroot
	SASentry
		SASdata
			@Q_indices="*,*"
			@I_axes=" ??? "
			I: float[100, 512]
			Qx: float[100]
			Qy: float[512]

terms

SASroot

same use as original 1D format

SASentry

some changes from the original 1D format

needs a version attribute that describes the version of the canSAS definition of SASentry (use version="1.0")

SASdata

different use from original 1D format, refers to a single reduced data set that can be represented thus (such as from one detector)

SASdata has some possible attributes, as shown in this example:

@Q_indices=1,3,4
@I_axes="Temperature,Time,Pressure,Q,Q"
@Mask_indices=3,4

To indicate the dependency relationships of other varied parameters, use attributes similar to @Mask_indices (such as @Temperature_indices or @Pressure_indices).

@Q_indices

Array attribute that describes which indices (of the I data object) are used to reference Q. The items in this array use zero-based indexing.

@I_axes

Comma-separated list that describes the names of the data objects that correspond to the indices of the I object.

@Mask_indices

Array attribute that describes which indices (of the I data object) are used to reference Mask. The items in this array use zero-based indexing.

Algorithm for Readers