Common features of NEWSTAR programs
All NEWSTAR programs run under the Dwingeloo Westerbork Astronomical Reduction Facility (DWARF). This means that the programs communicate with the user via the DWARF interface, especially the DWARF parameter interface. DWARF also provides the user with various commands to modify the environment in which programs will be executed. This chapter tells you enough of DWARF to be able to run your first NEWSTAR programs.
A full explanation of all the DWARF possibilities can be found in the ``DWARF User's Guide'', written by Friso Olnon.
Before running the programs some symbols and logicals (aliases) should be known. Ask the System manager about the proper login commands.
The current values of the DWARF environment variables can be viewed:
> dwv dwarf
dwview (see below)
DWARF$0_STREAM(program) = 1
DWARF$0_CURNODE(program) = 0
DWARF$0_ASK(program) = NO
DWARF$0_SAVELAST(program) = NO
DWARF$0_USERLEVEL(program) = BEGINNER
DWARF$0_BELL(program) = ON
DWARF$0_MESSAGEDEVICE(program) = TERMINAL
DWARF$0_EXTENDSIZE(program) = 64
DWARF$0_IOBUFSIZE(program) = 32768
DWARF$0_TEST(program) = NO
DWARF$0_LOGLEVEL(program) = 4
DWARF$0_LOGFATAL(program) = NO
DWARF$0_IDENT(local) = 143
DWARF$0_IBMODE(local) = INTERACTIVE
The DWARF environment variables can also be changed by typing:
> dws dwarf
dwspecify (see below)
Programs are normally run by typing:
> exe programname>
(e.g. exe[cute] NSCAN)
Note: exe stands for execute, and can, and this is preferred, also be given as dwe or dwexe.
The program starts running, and asks questions (parameters, or `keywords') that will specify the action of the program. All questions have some prompt information, and more help on the specific question can be obtained by typing a `?' as answer.
The type of answer (value, name, option, yes/no, ...) depends on the question. Some answer should be a single value, some should be a list separated by commas. In the case of a numeric list, the answer can also be of the form: start-value [by increment] [to end-value] There are three special answers that can always be given:
In general (but with the exception of obvious interactive programs) all questions for the program are asked and checked for consistency, availability of files etc, before the program starts actually executing.
After the program is finished, a log of the program, including the questions and their answers and all data produced by the program, may be spooled to the lineprinter (controlled by the common NEWSTAR keyword LOG, see below). On this log you will see the answers to some questions that were never asked. The default answers to these hidden questions need normally sufficient, and are, therefore, not asked. Ways to change them are given in below.
It is sometimes useful to run the same program in parallel, or to run a program regularly with a specified set of answers. To be able to differentiate between the programs, programs can be run in different streams. For all practical purposes the program (and its parameters) have different names. Streamnames can be any alpha-numeric string, although for practical reasons integers may be preferred by the user:
`program-name'$`stream'
(e.g. dwe nscan$5)
The zero stream has a special meaning in specifying values across streams.
In addition to answering questions asked, keyword values can be also be specified beforehand. This is especially handy if you want to run programs in Batch mode, or you want to make sure that for a set of programs the keyword values will be the same.
Keyword values can be specified before a program is run, by using the dws(pecify) command. To answer all questions, type:
> dws `program-name'
(e.g. dws NSCAN)
All keywords (and their current values) will now be displayed one after the other, and may be modified by the user. The process can be stopped at any time by giving D (Z) as answer. If you only want to specify a few keyword values only (and know the name of the keyword), type:
> dws `program-name'/nomenu
(e.g. dws nscan/nom)
: keyword=`value'
(e.g. ha-range=-10,10)
:
The prog-name can be replaced by `prog-name'$`stream' to specify keyword values for a separate stream (the default stream is in general $1). NB: The program name and/or stream can contain the wildcard .
Some questions are asked more than once in the program, for instance in an interactive loop. To specify all answers beforehand, seperate them in dws with a semi-colon (;). However, to make really sure that all answers are given, it is much safer to use the `Dry-run' or the `Saved-run' method (see below).
Keywords in DWARF have several levels of default values. The decision process is as follows:
- is there a value for this keyword in the currect stream? If yes: use it.
- is there a value for this keyword in stream 0? If yes: use it.
- is there a value for this keyword in NGEN in this stream? If yes: use it.
- is there a value for this keyword in NGEN for stream 0? If yes: use it.
- should the program ask the keyword? If no: use program default.
- prompt the user for a value and use it.
Note: NGEN is a collection of special NEWSTAR keywords, described below.
All questions (including the hidden ones) will be asked if you run the program as:
> dwe `name' /ask
(e.g. dwe nscan/ask)
Asking can also be enabled for all runs of all programs by setting the global DWARF parameter ASK:
> dws dwarf/nomenu
: ask=yes
:
From the above it is clear that the variety of possibilities to specify keyword values also makes the possibility of errors quite large. It is therefore recommended to make sure that programs are run as intended. To aid in maintaining the specified answers, run the following regularly:
> dwv(iew) 'prog-name'[$`stream']/extern
shows all current values for the specified program and stream.
> dwc(lear) `prog-name'[$`stream']
clears all current values for the specified program and stream.
The following keywords (parameters) are used for most NEWSTAR programs, but they are usually hidden from the user (default switch /NOASK). Their current values can be inspected by:
> dwv ngen
NGEN$1_LOG(program) = SPOOL /NOASK
NGEN$1_RUN(program) = YES /NOASK
NGEN$1_DATAB(program) = "" /NOASK
NGEN$1_INFIX(program) = "" /NOASK
NGEN$1_APPLY(program) = * /NOASK
NGEN$1_DE_APPLY(program) = NONE /NOASK
NGEN$1_LOOPS(program) = "" /ASK
NGEN$1_DELETE_NODE(program) = NO /ASK
More information about these keywords can be found in the Summary of Common keywords in the next section.
Usually, their default values are taken for the NGEN keywords, but they may also be specified by the user in a number of ways, for instance with dwspecify:
> dws `prog-name'[$`stream']/nomenu
will set the keyword for specified program and stream.
> dws `prog-name'$0/nomenu
will set the keyword for specified program and all streams.
> dws ngen[$`stream']/nomenu
will set the keyword for all programs in the stream.
> dws ngen$0/nomenu
will set the keyword for all programs and streams.
It is also possible to give (any) keyword values as switches when running the program:
> dwe `prog-name'[$`stream']/keyw[=`value']
or
> dwe `prog-name'[$`stream']/nokeyw
will set the keyword for the specified program and stream
Some examples in the case of NGEN keywords:
Some other keywords are also used by many NEWSTAR programs, but not hidden to the user. They are usually concerned with the selection of data: SETS, POLARISATION, SELECT_IFRS, HA_RANGE, AREA. There are also some others. They have been collected into this `common' section to emphasize their communality, and also to make it possible to treat some of them in some more detail. More information about these keywords can be found in the Summary of Common keywords in the next section.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.