next up previous contents
Next: Punctuation Up: Command Line Previous: Results

Functions

On a given command line, one or more functions can be issued to operate upon the input arguments. The available functions include utility operations for the program, arithmetic, data transformations, standard spectral line and continuum operations, plotting, and a limited amount of two dimensional utilities such as contour maps and spatial velocity diagrams. See Appendix E for an overview and detailed description of the SPA functions. The functions are categorized depending upon the required number of arguments and the number of results. These categories are 1 tex2html_wrap_inline1039 0, 1 tex2html_wrap_inline1039 1, 2 tex2html_wrap_inline1039 1, n tex2html_wrap_inline1039 1 and n tex2html_wrap_inline1039 n. For example 2 tex2html_wrap_inline1039 1 represents a function such as "+" which requires two arguments and calculates a single result. The program follows several rules when processing functions of mixed types. These are:

  1. arguments for functions of type 1 tex2html_wrap_inline1039 1 must precede the function.
  2. arguments for functions of type 2 tex2html_wrap_inline1039 1 must always appear separated by the function
  3. function of type n tex2html_wrap_inline1039 n or n tex2html_wrap_inline1039 1 will use as arguments all implicit results of previous functions plus any explicit arguments between it and the previous function.

For multipixel scans generated by array receivers, SPA functions fall into two processing classes: externally looped and internally looped.

Externally looped functions process data one pixel at a time. A string of externally looped functions typed on a command line will result in data from pixel 1 being processed sequentially by each of the functions in the string. The entire string of functions will then be repeated for pixel 2, etc. Most type 1 tex2html_wrap_inline1039 1 functions are externally looped.

Internally looped functions process the data from all pixels at once. An internally looped function will force externally looped functions preceding it on the command line to finish processing all pixels within a scan before it executes. All functions of type 2 tex2html_wrap_inline1039 1, n tex2html_wrap_inline1039 1, n tex2html_wrap_inline1039 n, and some 1 tex2html_wrap_inline1039 0 functions are internally looped.

Functions of type 0 are executed in a context dependent manner. If a type 0 function is embedded in a string of externally looped functions, it will be executed once for each pixel in the scan. If not, it will only be executed once. In the following example, S5> 1001 baseline line print pause page mplot copy the externally looped functions BASELINE, LINE and PRINT will execute on the scan one pixel at a time. Since type 0 functions PAUSE and PAGE follow this string, they will repeat for all pixels in the scan. The function MPLOT is internally looped and will force the previous functions to loop through all pixels before it executes. The type 0 function COPY follows an internally looped function so it will execute only once.

Each function is associated with constants which modify how that function will operate. When the SFILE is initialized by the SPI program, these constants are set to known default values. The values of the constants may be queried and changed by entering a ? punctuation after the function on the command line. Upon the first execution of the queried function, the program will display a menu which gives the present values of the constants associated with the function. If the values are acceptable, then the user simply enters a carriage return to continue the processing of the command. If the values are to be modified, the user enters the changes according to the following rules:

  1. commas delimit the entries,
  2. two consecutive commas or a blank line indicate unchanged constants,
  3. a D entry indicates that the constant should revert to its default value,
  4. numeric constants may be entered in any format without regard to whether the constant is an integer or floating point value.

The values for the function constants are used for all subsequent arguments on the command line.

There are five distinct blocks of function constants denoted C1 - C5 between which one may switch. For example, the baseline and line function constants in C1 could be set up for an observation of one source, and those of another source in C2. To switch between function blocks, enter the new block name in a command line. The SYNTHETIC function displays the current function block.

In addition to the basic functions, one may define up to 20 aliases of a string of arguments, punctuations, and functions of less than 80 characters. Synthetic functions may refer to other synthetic functions with the limitation that the final command line can not exceed 160 characters after the actual function strings have been substituted for the synthetic functions. The SYNTHETIC function displays the currently defined aliases in the SFILE.


next up previous contents
Next: Punctuation Up: Command Line Previous: Results

World Wide Web admin account
Tue May 14 18:00:20 EDT 1996