Table Of Contents

Previous topic

Examples of the canSAS2012 data format

This Page

Notation used to Represent the canSAS2012 data format

The basic components of storage are:

  • groups (or folders)
  • fields (includes strings, scalers, and arrays, and HDF5 “datasets”)
  • attributes
  • links

Examples

More examples are provided for representations of specific datasets.

1
2
3
4
5
6
7
SASroot
  SASentry
    SASdata
      @Q_indices=0
      @I_axes="Q"
      I: float[100]
      Q: float[100]
1
2
3
4
5
6
7
8
9
SASroot
  SASentry
    SASdata
      @Q_indices=0,1
      @I_axes="Q,Q"
      I: float[100, 512]
      Qx: float[100, 512]
      Qy: float[100, 512]
      Qx: float[100, 512]
1
2
3
4
5
6
7
8
9
SASroot
  SASentry
    SASdata
      @Q_indices=0,1
      @I_axes="Q,Q"
      I: float[300, 300]
        @uncertainty=Idev
      Q: float[300, 300]
      Idev: float[300, 300]
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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]
      Qz: 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]
      Qz: float[256, 256]
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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]
      Qz: float[100, 512]
      Mask: int[100, 512]
1
2
3
4
5
6
7
8
9
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]
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
SASroot
  SASentry
    SASdata
      @name="sans"
      @Q_indices=0
      @I_axes="Q"
      I: float[100*512]
      Qx: float[100*512]
      Qy: float[100*512]
      Qz: float[100*512]
    SASdata
      @name="saxs"
      @Q_indices=0
      @I_axes="Q"
      I: float[256*256]
      Qx: float[256*256]
      Qy: float[256*256]
      Qz: float[256*256]
1
2
3
4
5
6
7
8
9
SASroot
  SASentry
    SASdata
      @Q_indices=0
      @I_axes="Q"
      I: float[100*512  + 2000 + 256*256 - nDiscardedPixels]
      Qx: float[100*512 + 2000 + 256*256 - nDiscardedPixels]
      Qy: float[100*512 + 2000 + 256*256 - nDiscardedPixels]
      Qz: float[100*512 + 2000 + 256*256 - nDiscardedPixels]
1
2
3
4
5
6
7
8
SASroot
  SASentry
    SASdata
      @Q_indices=1
      @I_axes="Time,Q"
      I: float[nTime,100]
      Q: float[100]
      Time: float[nTime]
1
2
3
4
5
6
7
8
SASroot
  SASentry
    SASdata
      @Q_indices=0,1
      @I_axes="Time,Q"
      I: float[nTime,100]
      Q: float[nTime,100]
      Time: float[nTime]
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
SASroot
  SASentry
    SASdata
      @Q_indices=0,1
      @I_axes="Time,Q"
      I: float[nTime,100]
        @uncertainty=Idev
      Idev: float[nTime,100]
      Q: float[nTime,100]
      Time: float[nTime]
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
SASroot
  SASentry
    SASdata
      @Q_indices=1
      @I_axes="Time,Q"
      I: float[nTime,100*512]
      Qx: float[100*512]
      Qy: float[100*512]
      Qz: float[100*512]
      Time: float[nTime]
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
SASroot
  SASentry
    SASdata
      @Q_indices=0,1
      @I_axes="Time,Q"
      I: float[nTime,100*512]
      Qx: float[nTime,100*512]
      Qy: float[nTime,100*512]
      Qz: float[nTime,100*512]
      Time: float[nTime]
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
SASroot
  SASentry
    SASdata
      @Q_indices=0,1,2
      @I_axes="Time,Q,Q"
      @Mask_indices=1,2
      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]
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
SASroot
  SASentry
    SASdata
      @Q_indices=0,1,2,3
      @I_axes="Time,Temperature,Pressure,Q"
      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]
      T: float[nTemperature]
      P: float[nPressure]
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
SASroot
  SASentry
    SASdata
      @Q_indices=1,3,4
      @I_axes="Temperature,Time,Pressure,Q,Q"
      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]

It is possible to represent the components that contribute to the uncertainty by use of a subgroup. Add a @components attribute to the principal uncertainty, naming the subgroup that contains the contributing datasets.

As with all uncertainties, each component should have the same shape (rank and dimensions) as its parent dataset.

Note that a @basis attribute indicates how this uncertainty was determined. The values are expected to be a short list, as yet unspecified.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
SASroot
  SASentry
    SASdata
      @Q_indices=0
      @I_axes=Q
      Q : float[nI]
      I : float[nI]
         @uncertainty=Idev
      Idev : float[nI]
         @components=I_uncertainties
      I_uncertainties:
         electronic : float[nI]
            @basis="Johnson noise"
         counting_statistics: float[nI]
            @basis="shot noise"
         secondary_standard: float[nI]
            @basis="esd"

Note

This is just a proposition. It is based on the assumption that some analysis method might actually know how to handle this case.

If more than one uncertainty contributes to the intensity (and the method described above in Representing Uncertainty Components is not appropriate), it is proposed to name more than one uncertainty dataset in the @uncertainty attribute. The first member in this list would be the principal uncertainty. The @basis attribute can be used to further describe each uncertainty. One example be:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
SASroot
  SASentry
    SASdata
      @Q_indices=0
      @I_axes=Q
      Q : float[nI]
      I : float[nI]
        @uncertainty=Idev,Ierr
      Idev : float[nI]
        @basis="esd"
      Ierr : float[nI]
        @basis="absolute intensity calibration"