4 Command Input

 4.1 Command Line Recall and Editing

DIPSO is basically command driven, although for some of the more complex algorithms the program prompts on a step-by-step basis. Many commands can be input on a single line (in upper or lower case), each command (with its associated parameters) being separated from its neighbours by a comma. Parameters associated with a particular command follow it on the command line, separated by spaces. Parameter values which include commas and/or spaces need to be enclosed in double quotes when given on the command line, otherwise the commas and spaces will be interpreted as delimiters. Any mandatory parameters not specified with a particular command are prompted for, and failure to complete a command will generally result in any remaining commands on the line being ignored. e.g., the line:

  READ TEST, DRED, PM, PUSH

will read in the NDF test from the disk file test.sdf. If DIPSO fails to read the NDF successfully, you get an error message and the remainder of the line is ignored. Otherwise, it will attempt to de-redden the data using a ‘standard’ extinction law (DRED). Since a value of E(B-V) is mandatory for this command, but has not been provided, it is prompted for:

  DRED: E(B-V)?

(Similarly, if READ hadn’t been told which NDF to read, this parameter would have been prompted for.) On provision of the appropriate number, the data are de-reddened, plotted (PM) on the (previously assigned) plotting device, and then PUSHed onto the STACK. (If a plotting device were not previously assigned, DIPSO would again report an error and terminate execution of the command line.)

If you’re letting DIPSO prompt you for mandatory parameters, and decide that you want to abort the command line, you can respond to the parameter prompt with one or two exclamation marks (e.g. ! or !!). In the first case, the current command will abort, the remainder of the command line will be rejected, and you will be returned to the DIPSO command prompt. In the second case, the current command will abort, and DIPSO will also abort (saving the stack to EXIT_STK.sdf or EXIT.STK in the process), returning you to the operating system.

Some commands have optional parameters in addition to any mandatory ones. For example, DRED has three associated parameters:

  DRED E(B-V) R MODE

of which E(B-V) is the only mandatory one, and therefore the only one prompted for if not supplied. The other two parameters are R (= A(V)/E(B-V)) and MODE, a switch which allows an LMC-type extinction law to be invoked. Optional parameters have defaults supplied; in this case, R=3.1 and MODE=0 (Galactic law). If you want an LMC-type law with R=3.1 you must provide all parameters:

  DRED 0.5 3.1 1

but if you want a Galactic law with R not equal to 3.1 you only need type (e.g.)

  DRED 0.5 2.0

If you provide too many parameters, the command will use those it can, issuing a warning about those it can’t; e.g.

  DRED 0.5 3.1 0 99.99

will provoke a warning that redundant parameters have been provided.

4.1 Command Line Recall and Editing

Command line recall and editing is available in DIPSO. Use the up/down arrows or the RECA command to recall commands, and the left/right arrows and the delete/backspace key to edit them. The following control characters are recognised:

Control-A :
Jump to the start of the input buffer
Control-E :
Jump to the end of the buffer
Control-N :
Toggle overstrike/insert mode
Control-U :
Empty the input buffer

Two separate lists of text strings are kept; one for the command lines given in response to the DIPSO command prompt, and one for the strings given in response to the prompts issued by each command. The up and down arrows, and the RECA command operate within each list, independently of the other list.