`xcatview`

is a powerful and flexible catalogue browser. However, it can only be used from a terminal
(or workstation console) capable of displaying X output. Before starting `xcatview`

you
should ensure that your terminal (or console) is configured to receive X output. Then simply
type:

and follow the ensuing dialogue boxes. Copious on-line help is available within `xcatview`

. To
obtain it simply click on the ‘`Help`

’ button; every dialogue box in `xcatview`

contains a ‘`Help`

’
button.

In addition to accessing local catalogues `xcatview`

provides some limited facilities to access remote
catalogues held on-line at various astronomical data centres and archives around the world. These
facilities provide the same functionality as the application `catremote`

and are described in greater
detail in Section 25. Obviously they will only be available if the computer on which CURSA is
running has appropriate network connections (which will usually be the case at a normal Starlink
node).

`xcatview`

provides the following facilities:

- list columns in a catalogue,
- list parameters and textual information from a catalogue,
- list new columns computed ‘on the fly’ using an algebraic expression defined in terms of
existing columns and parameters. For example, if the catalogue contained columns
`V`

and`B_V`

(corresponding to the $V$ magnitude and $B-V$ colour) then the $B$ magnitude could be listed by specifying the expression ‘`V + B_V`

’. The syntax for expressions is described in Appendix A, - fast creation of a subset within a specified range for a sorted column (see Section 15 for details of how to create a catalogue sorted on a specified column),
- creation of subsets defined by algebraic criteria. For example, if the catalogue again contained
columns
`V`

and`B_V`

then to find the stars in the catalogue fainter than twelfth magnitude and with a $B-V$ of greater than 0.5 the criteria would be ‘`V > 12.0 .AND. B_V > 0.5`

’. Again see Appendix A for the syntax of expressions, - compute statistics for one or more columns. The statistics are computed from either all the rows in the catalogue or just the subset of rows contained in a previously created selection. The statistics computed are described in detail in Section 11.1 below,
- plot a simple scatter-plot from two columns. The scatter-plot can show either all the rows in the catalogue or just the subset of rows contained in a previously created selection,
- plot a histogram from a column. The histogram can be computed from either all the rows in the catalogue or just the subset of rows contained in a previously created selection,
- subsets extracted from the catalogue can be saved as new catalogues. These subsets can include new columns computed from expressions as well as columns present in the original catalogue,
- subsets extracted from the catalogue can be saved in a text file in a form suitable for printing, or in a form suitable for passing to other applications (that is, unencumbered with extraneous annotation).

A tutorial example of using `xcatview`

to select stars which meet specified criteria from a catalogue (a
‘recipe’ in the jargon of cookbooks) is included in SC/6: *The CCD Photometric Calibration
Cookbook*[22].

Statistics can be computed for one or more individual columns. They can be computed from either all the rows in the catalogue or just the subset of rows comprising a selection which has been created previously. Obviously, only non-null rows are used in the calculations. Statistics can be displayed for columns of any data type, though for CHARACTER and LOGICAL columns the only quantity which can be determined is the number of non-null rows.

For each chosen column its name, data type and the number of non-null rows (that is, the number of
rows used in the calculation) are displayed and the statistics listed in Table 5 are computed. Though
all these quantities are standard statistics there is a remarkable amount of muddle and confusion over
their definitions, with textbooks giving divers differing formulæ. For completeness, and to avoid any
possible ambiguity, the definitions used in `xcatview`

and `catview`

are given below. These
formulæ follow the *CRC Standard Mathematical Tables*[4] except for the definition of skewness which is
taken from Wall[30].

Minimum |

Maximum |

Total range |

First quartile |

Third quartile |

Interquartile range |

Median |

Mean |

Mode (approximate) |

Standard deviation |

Skewness |

Kurtosis |

In the following the set of rows for which statistics are computed is called the ‘current selection’ and it contains $n$ non-null rows. ${x}_{i}$ is the value of the column for the $i$th non-null row in the current selection. The definitions of the various statistics are then as follows.

- The minimum and maximum are (obviously) simply the smallest and largest values in the current selection and the total range is simply the positive difference between these two values.
- If the column is sorted into ascending order then the $j$th
quartile, ${Q}_{j}$,
is the value of element $j\left(n+1\right)/4$,
where $j=1$,
2 or 3. Depending on the value $n$,
there may not be an element which corresponds exactly to a given quartile. In this case
the value is computed by averaging the two nearest elements.
The interquartile range is simply the positive difference between ${Q}_{1}$and ${Q}_{3}$.

- The median is simply the second quartile ($j=2$).
The mean has its usual definition: the sum of all the values divided by the number of
values.
The value computed for the mode is not exact. Indeed it is not obvious that the mode is defined for ungrouped data. Rather, the value given is computed from the empirical relation:

$$mode=mean-3\left(mean-median\right)$$ (1) - The standard deviation, $s$,
is defined as:
$$s=\sqrt{\frac{1}{\left(n-1\right)}\sum _{i=1}^{n}{\left({x}_{i}-mean\right)}^{2}}$$ (2) - The skewness and kurtosis are defined in terms of moments. The
$k$th
moment, ${u}_{k}$,
is defined as
$${u}_{k}=\frac{1}{n}\sum _{i=1}^{n}{\left({x}_{i}-mean\right)}^{k}$$ (3) then

$$skewness={u}_{3}^{2}/{u}_{2}^{3}$$ (4) and

$$kurtosis={u}_{4}/{u}_{2}^{2}$$ (5) The expected values for the skewness and kurtosis are:

- skewness = 0 for a symmetrical distribution,
- kurtosis = 3 for a normal (or Gaussian) distribution.

Occasionally, due to some misadventure, `xcatview`

might crash. In this eventuality some temporary
files can be left in existence; these must be deleted before `xcatview`

can be used again. The files will be
in subdirectory `adam`

of your top-level directory (unless you have explicitly assigned this
directory to be elsewhere). The files have names beginning with `catview`

and `xcatview`

, for
example:

Simply delete these files and `xcatview`

can then be started as usual.

Copyright © 2001 Council for the Central Laboratory of the Research Councils