While the basic array structure of FITS can handle a data matrix when the data are distributed evenly along all axes, sometimes the data may not be distributed uniformly along one or more axes. The random groups structure was created to handle such situations. Instead of being followed by a data array, the primary header is followed by a special set of records, of standard FITS 23040-bit size, called random groups records. These records contain a series of groups, each consisting of a sequence of parameters followed by an array. The parameters carry the data whose spacing is not uniform and which are not ordered, i.e., random, hence the name. The number of random parameters and the dimensions of the array must be the same in all groups.

On application is for *uv* interferometric visibility data;
in fact, random groups are
sometimes referred to as UV FITS. Consider a set of weighted complex
fringe visibilities for the four Stokes polarizations at a sequence of
evenly spaced frequencies. The axes are *u*, *v*, *w*, hour
angle, baseline, fringe visibility information (real part, complex part,
and weight), Stokes parameter, and frequency. The points along the
frequency axis are evenly spaced, and the fringe visibility and Stokes
axes can both be handled by using ``evenly spaced'' integer index points
to represent the separate components - real, complex, and weight - for the
visibility and the four Stokes parameters. Thus, an individual
observation can easily be structured as a matrix with axes of visibility
components, Stokes parameter, and frequency. However, the individual
matrices are at nonuniformly distributed values of baseline, hour angle,
and (*u*, *v*, *w*).

Using the random groups structure, the values of baseline, hour angle, and
(*u*, *v*, *w*) would be specified as parameters
before each (visibility, polarization, frequency) matrix. The combination of
parameters and array constitutes a group. The structure of the group would be
given by the form

(3.6) |

where are random parameters|, time, baselineu,v,w|(visibility component, Stokes parameter, frequency)|