next up previous 222
Next: Continuation lines for long lists of columns and expressions
Up: Browsing and selecting from the command line
Previous: Browsing and selecting from the command line


Running catview from a script

In order to run catview from a script simply type the commands and responses that you would have issued interactively into a text file. They should be typed exactly as you would enter them interactively.

Figure [*] shows an example of a script for catview. It selects quasars with redshift greater than three and brighter than nineteenth magnitude from a catalogue8and writes selected columns from the subset to a file in a format suitable for passing to subsequent applications (that is, without any annotation). The individual commands are:

OPEN
Open the catalogue, here called `qsover'.

SETSEL
Select the objects with redshift greater than three and brighter than nineteenth magnitude.

SETCMP
Specify the columns to be listed: ra, dec, redshift, v.

SETFILE
Set the configuration options for the information to be included in the text file. The options given correspond to including only the specified columns, without any annotation.

FILE
Write the text file. All the rows in the selection are written to file qso.lis.

EXIT
Terminate catview.

Figure: Example script for catview
\begin{figure}\begin{center}
\par
\begin{tabular}{l}
{\tt OPEN} \\
{\tt qsover}...
...\tt qso.lis} \\
{\tt EXIT} \\
\end{tabular}\par\par
\end{center}\end{figure}

To run catview from a script simply use Unix's input redirection mechanism:

catview < catview_script.lis

where catview_script.lis is the name of the script.


next up previous 222
Next: Continuation lines for long lists of columns and expressions
Up: Browsing and selecting from the command line
Previous: Browsing and selecting from the command line

CURSA Catalogue and Table Manipulation Applications
Starlink User Note 190
A.C. Davenhall
4th November 2001
E-mail:starlink@jiscmail.ac.uk

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