SIGNALS is a program to generate, process, and display one-dimensional
complex-valued functions on IBM-PCs and compatibles operating under DOS,
or as a DOS program running in WINDOWSTM 3.0+. It was
written to help the user develop an understanding and intuition of basic
signal processing operations such as Fourier transforms and convolutions,
but also is useful for illustrating concepts in other disciplines, such
as the mathematics of complex-valued functions and the effect of space-invariant
aberrations of the optical transfer function.

The user of SIGNALS selects options from menus, and needs little
or no training in use of the software (though perhaps plenty of
training in linear systems). The original use of the program for classroom
demonstrations (where speed and ease of use are paramount) dictated that
selections be made by keystroke. Experienced users can generate examples
much more rapidly than would be possible if selections were made by mouse
clicks. Most menu selections have defaults denoted by values in brackets
(e.g., [0]), so that keystroke entries often are not necessary.
Two data arrays (f1 and f2) are available, each holding
up to 8192 complex-valued pixels (depending on machine configuration);
arrays may be stored and recalled from disk files. The range of the index
n of the array may be selected to be either [-N/2 <= n <= N/2-1]
or [0 <= n <= N-1]. The former convention is
preferred in optics and imaging applications, where the center of the array
often corresponds to the optical axis. The latter convention is more common
in many electrical engineering applications. The program makes no distinction
between representations in the coordinate or frequency domains; there is
no "label" for the current domain. This is appropriate when considering
discrete functions of integer indices, and makes possible the demonstration
that the discrete Fourier transform of a Fourier transform results in a
"reversed" array.

SIGNALS is a DOS program written in Microsoft QuickBASICTM
and continues to evolve, despite the venerable state of the operating system.
Even when run on an AT-class 80286 processor (if any still can be found!),
the program is fast enough to be useful for interactive learning. Computation
time on common 486 and Pentium machines almost is negligible. When run
in a DOS window in the WINDOWS-XPTM environment (or earlier versions) , the graphics
screens in SIGNALS may be copied to the clipboard and thence pasted into
other applications (e.g., Microsoft PowerPointTM).

The program runs very well in DOSBox (available from www.dosbox.com) under many operating systems, including many flavors of the Windows OS, the Mac OS, and Linux.

When loaded, SIGNALS tests for graphics capability and uses the
highest resolution available in color (VGA or EGA) or monochrome graphics
(HERCULES or CGA, again if any such machines still exist!).

OVERVIEW OF MENUS

User actions are selected from five menus which are accessed by keystroke:
the MAIN MENU, which is selected from any other menu by the <Escape>
key, FUNCTIONS (F), OPERATIONS (O), ARITHMETIC (A),
and the PLOTTING MENU (P). Options from each menu are selected by
typing the appropriate key (denoted by a highlighted letter).

The Manual Pages for the Functions, Operations,
and Plot Menus include MANY graphics files. To save time, it
is suggested that Image Autoload be turned OFF before loading these
pages.

OVERVIEW of MAIN MENU

The MAIN MENU links the four subsidiary menus together, and is called
from any other menu by the <Escape> key. From the MAIN MENU,
the user may select the number of pixels (2 <= N <= Nmax,
default N = 256) and the index range (either [-N/2, N/2 - 1]
or [0, N - 1]). If N is changed, all arrays are cleared.
If the range is changed, existing values are reindexed, but otherwise not
disturbed. The maximum number of pixels is determined by the computer configuration;
typically Nmax = 8192. Other options of the MAIN MENU are initialization
(zeroing) of both arrays, exiting temporarily to the DOS shell, and selecting
the normalization when computing the fast Fourier transform (FFT). The
choices of normalization multiply the amplitudes computed in the forward
transform by 1/N, 1, or SQR(1/N) (default); the corresponding factors in
the inverse transform are 1, 1/N, and SQR(1/N). The normalizations ensure
that a cascade of the forward and inverse FFT produce the original array
amplitudes. Options are also available in the MAIN MENU to load or save
data files in two ASCII formats. The first (file extension ".DAT")
is a column of 2N + 1 elements: the first is the number of pixels N, followed
by the N real samples and N imaginary samples of the data array. The second
format (file extension ".SSF" for SpreadSheet
File) consists of three columns separated by tabs: the index
of the sample, the real part, and the imaginary part. The user exits SIGNALS
by typing <ESC> from the MAIN MENU. The other menus (FUNCTION,
PLOTTING, OPERATIONS, and ARITHMETIC) are accessed
by keying the appropriate letter from any menu.

OVERVIEW of OPERATIONS
MENU

Mathematical operations on a single array are accessed from the OPERATIONS
MENU (type O from any menu). To minimize the effects of roundoff
error, double-precision arithmetic is used in many opeations, most notably
the transformations (Hartley and Walsh-Hadamard transforms, FFT, DFT, and
DCT) and raising to a power (including exponentiation). However, the results
of all computations are converted to single-precision numbers after testing
to ensure that the results do not exceed the available single-precision
dynamic range; overflows are clipped at the maximum amplitude available.

OVERVIEW of ARITHMETIC
MENU

The ARITHMETIC MENU is poorly named, but is meant to convey the idea
that the included operations combine amplitudes in the arrays pixel
by pixel in some way. In all cases, the result is saved in array f1
and f2 is cleared. The primary array (i.e., the "first"
array for order-sensitive processes such as subtraction, division, correlation,
the lookup table, and raising to a power) is the array most recently processed;
the other may be selected by typing the appropriate number for that array.
When dividing, pixels divided by "0" are assigned the value "0".

The uses for most of these operations are obvious. However, note that
the order of the arrays is critical when computing the Correlation, Lookup
Table, and Power operations. The order of the arrays may be exchanged to
give array 1 or 2 "priority" by typing the appropriate number.
The convolution and correlation operations are computed via FFTs, and will
yield outputs that are periodic over N samples.

OVERVIEW of PLOT
MENU

Once created, an array (or its histogram) may be displayed from the
PLOT MENU in several representations. The data may be presented as smooth
curves, discrete segments, or as just the data points without linkages.
Data points are connected by straight line segments in "smooth"
format; this mode is plotted more quickly and is suitable for large data
arrays. "Discrete" format resembles a bar chart and is often
appropriate for small arrays and histograms. Graphical connections are
not made in "points" format. For large arrays (N > 1024) where
multiple samples would be plotted in the same column, a straight line connecting
the extreme values for that column is drawn. This allows the array to be
plotted more quickly with little if any decrease in the information conveyed.

Several graphical displays are available: the data may be plotted as
Real/Imaginary parts, Magnitude/Phase, Power, or as
Log of the Power (displayed in dB). Also, the difference of the
real and imaginary arrays may be displayed on one plot. Several formats
of the Magnitude/Phase plot are available, including with
the range of phase over 2 pi radians, over pi radians, with the phase unwrapped,
and with the magnitudes or squared magntidues of the real and imaginary
arrays computed separately (for comparisons). Arrays may also be displayed
as Argand Diagrams, i.e. a plot of the imaginary part vs.
the real part of the complex value. Often called a "Lissajous"
figure, this format is useful in a number of applications. To return to
the PLOT MENU from any graphic display, just type <ESC>. When SIGNALS
is run as a DOS application in Microsoft WINDOWS, any graphics screens
generated in the PLOT MENU may be saved to the Clipboard by typing ALT-PR
SCRN. These images then may be pasted into other applications, such as
Adobe PhotoShop or Microsoft PowerPoint.

If you have any questions or problems, if you would like to obtain the
source code, or if you have any comments about how to make the program
more useful/easier to use, please contact me at the above address/phone
number. Electronic mail is the best way to reach me ("rlepci@rit.edu").