International
Tables for
Crystallography
Volume G
Definition and exchange of crystallographic data
Edited by S. R. Hall and B. McMahon

International Tables for Crystallography (2006). Vol. G. ch. 3.7, pp. 200-201

Section 3.7.2.4. Organization and encoding of array data

H. J. Bernsteina*

a Department of Mathematics and Computer Science, Kramer Science Center, Dowling College, Idle Hour Blvd, Oakdale, NY 11769, USA
Correspondence e-mail: yaya@bernstein-plus-sons.com

3.7.2.4. Organization and encoding of array data

| top | pdf |

Data items in these categories are as follows:

(a) ARRAY_STRUCTURE [Scheme scheme4]

(b) ARRAY_STRUCTURE_LIST [Scheme scheme5]

(c) ARRAY_STRUCTURE_LIST_AXIS [Scheme scheme6]

The bullet ([\bullet]) indicates a category key. The arrow ([\rightarrow]) is a reference to a parent data item.

The data items in the ARRAY_STRUCTURE category show how the stream of octets in a binary image is to be reorganized into words of an appropriate size. Each possible encoding is identified by a value of _array_structure.id. In most cases, large images will have been compressed. The type of compression used is given by _array_structure.compression_type. Once a stream of octets has been decompressed, it can be organized into words. The type of each word is given by the value of _array_structure.encoding_type and the order of mapping octets onto words, most significant octet first (`big-endian') or least significant octet first (`little-endian'), is given by the value of _array_structure.byte_order.

The data items in the ARRAY_STRUCTURE_LIST category show how the list of words defined by the ARRAY_STRUCTURE category should be organized into image arrays. The value of _array_structure_list.array_id is a pointer to _array_structure.id. Each dimension (row, column, sheet etc.) of the image is identified by an index, counting from 1, given by _array_structure_list.index. The order of nesting of the indices is given by the values of _array_structure_list.precedence, with the index of precedence 1 varying most rapidly (i.e. having values stored sequentially). The direction of index change for increasing memory location is given by the value of _array_structure_list.direction. For a given index, the number of image elements in that direction is given by the value of _array_structure_list.dimension.

Data items in the ARRAY_STRUCTURE_LIST_AXIS category describe the physical settings of sets of axes for the centres of pixels that correspond to data points described in the ARRAY_STRUCTURE_LIST category.

In the simplest cases, the physical increments of a single axis correspond to the increments of a single array index. More complex organizations (e.g. spiral scans) may require coupled motions along multiple axes.

Note that a spiral scan uses two coupled axes, one for the angular direction and one for the radial direction. This differs from a cylindrical scan for which the two axes are not coupled into one set.

Multiple related axes are gathered together into sets. Each set is identified by the value of the axis set identifier, _array_structure_list_axis.axis_set_id, and each axis within a set is identified by the value of _array_structure_list_axis.axis_id. Each set given by a value of *.axis_set_id is linked to a corresponding value for _array_structure_list.axis_set_id to relate settings of the axes in the axis set to particular image elements in ARRAY_STRUCTURE_LIST.

If axes are all independent, no value need be given for _array_structure_list_axis.axis_set_id, which is then implicitly given the corresponding value of _array_structure_list_axis.axis_id. Each axis given by a value of _array_structure_list_axis.axis_id is linked to a corresponding value for _axis.id to provide a physical description of the axis. _array_structure_list_axis.axis_id and _array_structure_list_axis.axis_set_id together uniquely identify a row of data in an ARRAY_STRUCTURE_LIST_AXIS table.

For the remaining data items, there are two important cases to consider: axes that step by Euclidean distance and axes that step by angle. Fig. 3.7.2.1[link] shows a portion of an array of image elements laid out on a rectangular grid. The starting point of an axis is specified in millimetres by the value of _array_structure_list_axis.displacement and the centre-to-centre distance between pixels is specified in millimetres by the value of _array_structure_list_axis.displacement_increment.

[Figure 3.7.2.1]

Figure 3.7.2.1 | top | pdf |

ARRAY_STRUCTURE_LIST specification of linearly organized image elements.

Fig. 3.7.2.2[link] shows a portion of an array of image elements laid out in concentric cylinders. The starting point of the angular axis is specified in degrees by the value of _array_structure_list_axis.angle and the centre-to-centre angular distance between pixels is specified in degrees by the value of _array_structure_list_axis.angle_increment. The starting point of the radial axis is specified by the value of _array_structure_list_axis.displacement and the radial distance between cylinders of pixels is specified in millimetres by the value of _array_structure_list_axis.radial_pitch. Note that the image elements further from the centre are larger than the image elements closer to the centre.

[Figure 3.7.2.2]

Figure 3.7.2.2 | top | pdf |

ARRAY_STRUCTURE_LIST specification of `constant-angle' image elements in a cylindrical scan. The angular and radial axes are independent. Note that outer-zone image elements are further apart, centre-to-centre, than inner-zone image elements.

Fig. 3.7.2.3[link] shows a portion of a spiral scan array in which the angular and radial axes are coupled. This example represents a `constant-velocity' scan, in which the size of the image elements does not depend on the distance from the centre. The starting point of the angular axis is again specified in degrees by the value of _array_structure_list_axis.angle, but the centre-to-centre distance between pixels is specified in millimetres by the value of _array_structure_list_axis.angular_pitch. The coupled radial axis is handled in much the same way as for the uncoupled radial axis in the cylindrical array.

[Figure 3.7.2.3]

Figure 3.7.2.3 | top | pdf |

ARRAY_STRUCTURE_LIST specification of `constant-velocity' image elements in a cylindrical scan. The angular and radial axes are coupled. Note that outer-zone image elements are the same linear distance apart, centre-to-centre, as the inner-zone image elements.

These examples show some of the more common two-dimensional data structures. By coupling an additional axis not in the plane of the first two, regular three-dimensional arrays of data can be represented without additional tags. The categories in the DIFFRN group allow arrays of data to be associated with frames and thereby with time and/or wavelength. More general data structures, for example ones based on dope vectors or hash tables, would require the definition of additional tags, but any data structure (see Aho et al., 1987[link]) that can be handled by a modern computer should be manageable within this framework.

References

First citation Aho, A. V., Hopcroft, J. E. & Ullman, J. D. (1987). Data structures and algorithms. Reading, MA: Addison–Wesley.Google Scholar








































to end of page
to top of page