22 Binning columns in a catalogue into a grid

 22.1 Running catgrid

CURSA includes application catgrid for binning columns in a catalogue into a grid. One, two or three columns in a catalogue may be binned into, respectively, a histogram, two-dimensional ‘image’ or data cube. The grid generated might be useful as an aid to visualising the data. It is saved as a file which can be displayed and manipulated with other Starlink software.

You specify the dimensionality required for the grid (one to three) and the names of the columns corresponding to each axis. A regularly-spaced grid is constructed spanning the entire range of the values occurring in the specified columns. The value of each element of the grid is set to the number of points which lie within it. Optionally the grid may be normalised by dividing by the total number of points in the catalogue.

The output file is written in the standard Starlink NDF data format (see SUN/33[33]). It can be displayed and manipulated using packages such as GAIA (see SUN/214[12]), KAPPA (see SUN/95[5]) and Figaro (see SUN/86[26]). Alternatively, the file can be imported into a visualisation package such DX (see SUN/203[3] and SC/2[8]). The latter option is likely to be particularly appropriate for data cubes. The CONVERT package (see SUN/55[6]) is available for converting an NDF format file into a number of other common formats, including FITS images and simple ASCII text files.

22.1 Running catgrid

To generate a grid from columns in a catalogue type:

  catgrid

By default catgrid generates an un-normalised grid. To generate a normalised grid type:

  catgrid  normal=true

There must be one or more spaces between ‘catgrid’ and ‘normal=true’. You then answer the prompts described below. In the descriptions the prompts are identified by the corresponding ADAM parameter name, which appears at the start of the prompt line.

CATIN
Enter the name of the input catalogue.
NDIM
Enter the dimensionality of the output grid. The permitted values are one to three.
COLX
Enter the name of the column to be used for the first (x) axis of the grid.
XBINS
Enter the number of bins required along the first (x) axis of the grid.

If you specified a dimensionality of two or three then prompts corresponding to COLX and XBINS for the second (y) and third (z) axis are issued, as appropriate.

GRID
Enter the name of the file to contain the output grid. Note that NDF files have file type ‘.sdf’, but the name should be entered without the file type.