catview is available for browsing catalogues and selecting subsets from the command line. It provides the same
functionality as xcatview7,
but is much less easy to use. Indeed it is not really intended for casual, interactive usage. If at all
possible I recommend that you use xcatview for casual, interactive browsing of a catalogue.
However, if you do not have an X display available then you will have to use catview. It is
also useful for running prepared scripts which perform routine, standard, ‘batch’ type
operations.
In order to run catview type:
and the following prompt should appear:
Using catview you can create an arbitrary number of selections from the catalogue, each defined by its
own criteria. catview has the notion of the ‘current selection’, which is the selection that it is working
on currently. Columns chosen for display to the screen or a text file, are listed from the
current selection and statistics are computed from the current selection. Similarly when a
new selection is created it is extracted from the rows in the current selection. By default
the most recent selection is the current one, though you may choose to make any of the
selections the current one. If no selections have been made, the current selection is the entire
catalogue.
You issue commands to invoke the various functions supported by catview and reply to the prompts
that they issue, as appropriate. Type HELP for a list of the commands available. They are as
follows.
OPEN SHOWCOL DETCOL SHOWPAR DETPAR SHOWTXT SHOWROWS SETCMP LIST’ or ‘PREV’. Both columns in the catalogue and new,
computed columns may be listed. Items in the list should be separated by a semi-colon
(‘;’). New columns have the form:
where name is the name of the new column, expression is the expression which defines it and
units are the units. name and expression are mandatory, but units is optional. See Appendix A
for the syntax of expressions.
As an example, to list catalogue columns V, B_V and a computed column B defined by ‘V + B_V’
you would enter:
Occasionally you may need to enter a list of columns and expressions which is longer than a single line. Such long lists can be entered using a continuation line mechanism. This mechanism is described in Section 12.2.
SHOWSEL CHOSEL SETSEL SHOWRNG SETRNG 3:00:00 | (hours) | |
+45:00:00 | (degrees) | |
0.78539816 | (radians) | |
SETROW LIST PREV SETSTAT ;’). For example, to compute statistics for columns V,
B_V and U_B you would enter:
Occasionally you may need to enter a list of columns which is longer than a single line. Such long lists can be entered using a continuation line mechanism. This mechanism is described in Section 12.2.
SETDECPL STATS none’
if this option is not required. In either case the statistics will be listed on the display
terminal.
SCOPEN GRPHDV TITLE XEXPR YEXPR SCRANGE SCPLOT SCSHRNG SCLOSE HSOPEN GRPHDV TITLE XEXPR HSRANGE HSPLOT HSSHRNG HSCLOSE FILE 0
for the last row number the last row in the selection will be listed (this trick avoids
having to find the number of the last row). The columns specified by SETCMP are
listed.
SAVECAT CATOUT CFLAG TRUE FALSE SETCMP.
TFLAG TRUE FALSE COMM SHOWFMT SETFMT SETCONF SWID SHT SEQNO LIST or PREV is started with a sequence
number. The options are:
TRUE FALSE NLIST LIST or PREV.
ANGRPN SEXAGESIMAL RADIANS ANGRF TRUE FALSE SETFILE FPGSZE FWID FSUMM A F FCOL A S F FPAR A S F FTXT A F FTABL A S F COLNAME HELP EXIT catview.
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 1 shows an example of a script for catview. It selects quasars with
redshift greater than three and brighter than nineteenth magnitude from a
catalogue8
and 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 qsover’.
SETSEL SETCMP ra, dec, redshift, v.
SETFILE FILE qso.lis.
EXIT catview.
OPEN |
qsover |
SETSEL |
Redshift>3.0 .and. v<19.0 |
SETCMP |
ra;dec;redshift;v |
SETFILE |
60 |
132 |
A |
A |
A |
A |
S |
FILE |
1 |
0 |
qso.lis |
EXIT |
catviewTo run catview from a script simply use Unix’s input redirection mechanism:
where catview_script.lis is the name of the script.
Occasionally you might need to enter a long list of columns and expressions for display (catview
option SETCMP) or a long expression for a selection (catview option SETSEL). In both these cases a
continuation line mechanism is available which allows lists and expressions which are longer than a
single input line to be entered. This option is only available in catview, not in xcatview. If you need to
specify long lists of columns and expressions to be displayed, or a long expression defining a selection, then you
must use catview. In practice this restriction is not too onerous because long lines usually arise when
expressions are being used to compute a set of new columns, which is often done from the command
line anyway.
In order to extend the list of columns and expressions to be displayed across several lines simply
append an ‘@’ character to the end of the line to be continued. The prompt:
will be repeated and the line can be continued. The details are as follows.
@’ is assumed to be the last.
@’ used to indicate continuation lines is quite separate from the ‘;’ used to separate
columns and expressions; ending a line in ‘@’ does not allow a ‘;’ to be omitted.
Though this mechanism allows long lists and expressions to be entered, there are necessarily still
limits on the length of the list of columns and expressions for display and on expressions defining
selections, because they are represented within catview as Fortran 77 CHARACTER variables. In
Version 6.4 of CURSA these limits are:
| List of columns and expressions for display: | 1000 characters. |
| Expression defining a selection: | 200 characters. |
ra2000 and dec2000) and sets some existing
columns to be displayed.
ra2000) being split across several
lines.
Exactly the same syntax applies when entering expressions to define selections.
7Technically xcatview is a ‘front-end’ tcl/tk graphical user interface which manages the dialogue boxes and forwards
input from the user to the catview ADAM A-task, which, in turn, manipulates the catalogue. Thus, strictly speaking, you
are running the same application in both cases. However, as a user you will not normally be concerned with these
details.
8The catalogue used in this example is the Catalogue of Quasars and Active Galactic Nuclei by M.-P. Veron-Cetty and P. Veron[29].