The user loads two complex arrays f1 and f2 as real/imaginary parts (or as magnitude/phase) from the FUNCTIONS MENU, which is selected by typing F from any menu. The default array to load is the complement of that most recently loaded or viewed, but either may be selected. Until the array is initialized (values set to zero), functions are added to existing data, thus allowing functions to be modified (e.g., truncated) after operations have been performed. All functions generated and displayed in SIGNALS are single-precision floating-point numbers. The largest and smallest allowed magnitudes are approximately 10+38 and 10-45, though the dynamic range is truncated somewhat during calculations to avoid known compatibility problems with some computers and graphics displays. Double-precision computations are used within some operations (such as the transformations, raising amplitudes to a power, and computing statistics). Error handling routines control most over- and underflow conditions, but some computations involving weighted sums of the array (such as in the FFT) may fail if array amplitudes are saturated. However, this likely will never occur in normal use.
Data arrays are loaded in sequence:
(1) REAL PART (or MAGNITUDE),
(2) MODULATION of REAL PART (or MAGNITUDE),
(3) IMAGINARY PART (or PHASE), and
(4) MODULATION of IMAGINARY PART (or PHASE).
At each step, several functions may be summed to "build" the data arrays.
If arrays are loaded as MAGNITUDE-PHASE, remember that all operations and plots assume REAL-IMAGINARY format; option R in the OPERATIONS menu converts MAGNITUDE-PHASE to REAL-IMAGINARY before other processing.
The desired function is selected by typing the highlighted letter, e.g., type S to add SINUSOIDs (sines and/or cosines). The user is prompted to select the parameters of the function; defaults are indicated in brackets [ ]. In this example, the user first selects the number of SINUSOIDs to add (the default is always 1); Note that typing zero or a negative number at this prompt returns to the FUNCTIONS menu -- this allows recovery from mistyping the function selection. Next, the user is prompted for the period of the SINUSOID b [N/2], the phase (in degrees) at the origin [0], and the amplitude [1]. Fractions are allowed ("2/5" is read as 0.4), and reciprocals are indicated by a leading slash / ("/2" is read as 0.5). After the parameters of a function have been selected, the user is returned to the FUNCTIONS menu to add more terms if desired. If the desired function is real valued, the user may type <ESC> to return immediately to the MAIN MENU. Once the REAL/MAGNITUDE array has been filled, the user types a carriage return <CR> (i.e. the "ENTER" key) to produce the same menu of functions; this time a modulating function may be generated which is multiplied by the original REAL PART/MAGNITUDE. If no modulation is desired, type <CR> to continue to the IMAGINARY PART/PHASE, where the same sequence of operations may be performed. You MUST type <CR> from the MODULATION MENU to perform the multiplication; if you <ESCape>" to the MAIN MENU before typing <CR>, the functions will not be multiplied. If a modulation function is started and then the array is re-initialized (zeroed) and not replaced, the initial array will be multiplied by a null array when continuing to the IMAGINARY array. An option ("|") is available in the MODULATION MENU for the REAL PART/MAGNITUDE to compute the absolute value of the array. This is used when data is entered as MAGNITUDE-PHASE.
The options in the FUNCTIONS array are:
Z Zero Array: f(n) = 0(n)
Sets amplitudes of all samples of f(n) to 0.
S Sinusoid
It would probably insult the intelligence of the reader to launch into an extended discussion of the sinusoid function, but it may be useful to point out that the phase [2 pi n/b + phi] of the sinusoid is a linear function of the coordinate n, so that the oscillation frequency (inverse of the period b) is constant. For this reason, the function may be referred to as a linear phase sinusoid, to distinguish it from the more general sinusoid with higher-order phase (such as the quadratic-phase sinusoid, or chirp, see below).
D Discrete
Dirac Delta Function
Discrete Dirac delta functions (also called impulses) may be loaded individually,
or as odd or even pairs. No impulse is added if a noninteger value is entered
for the "center pixel"; this is the "ultimate" example
of a function being aliased by sampling

R Rectangle
Function: f(n) = A RECT(( n - n0 )
/ b)
The amplitude of the RECT function for a continuous domain is unity for distances with 1/2 unit of the center, 1/2 at distances of 1/2, and zero otherwise. This definition requires that the "endpoint" samples of the discrete RECT function have amplitude 0.5A when the width b is an even number. The "support" (number of nonzero samples) of discrete RECT functions of even width b and odd width b + 1 are identically b + 1. The "area" of the RECT may be defined as the sum of the amplitudes of the samples, and is equal to Ab.

T Triangle
Function: f(n) = A TRI(( n - n0 )
/ b)
The definition of the continuous triangle function is: TRI[u] = (1 - |u|) RECT[u/2]. It has support of 2b - 1, and area Ab.

S SINC
Function: f(n) = A SINC(( n - n0 )
/ b)
The convention for the sinc function used in the program includes a factor of pi, so that SINC[u] = SIN(pi u)/(pi u). It has "infinite" support and area Ab.

G Gaussian
Function: f(n) = A GAUS(n - n0)
The amplitude decreases from A at n = n0 to A e-pi = 0.04 at n = n0 +/- b. The area of the function is Ab.

G SIGNUM
Function: f(n) = A SGN(n - n0)
The signum outputs 1 for positive coordinates, 0 at the origin, and -1 for negative coordinates.

P STEP Function: A STEP[n] = 1/2 (1 + SGN[n])

J Bessel
Function of order n
The Bessel functions are solutions of the Bessel differential equation. This option generates the Bessel functions of the first kind of selectable order n. If the array is indexed over the domain [ -N/2, (N/2) - 1], a symmetric (even) Bessel function is loaded. The Bessel function of order 1 is used to compute the BESINC function (see below).


1 Constant: f(n) = A 1(n)
This option allows arbitrary constants to be entered, including any
value that may be typed, and includes a small library of mathematical constants
("e" = 2.71828..., "pi" = 3.14159..., "n"
= number of samples in array) and of mathematical operations (LOG(A), LOG10(A),
SQR(A), and A/B. Reciprocals ("/c, where c is any number")
or fractions (" a/b ", where a and b
are any numbers") may also be entered.
C Chirp Function
(Quadratic-Phase Sinusoid): 
The quadratic-phase signal is a generalization of the sinusoid where the oscillation frequency varies linearly with coordinate. If the initial phase phi = 0, the signal may be referred to as a "COSINE" chirp, while if phi = -90 degrees, it is a "SINE" chirp. However, note that the resulting function is symmetric about the center coordinate n0 regardless of í. The CHIRP signal is used to model optical diffraction as convolution with a constant-magnitude complex quadratic phase signal, and to model the action of spherical lenses, which multiply the input by a constant-magnitude quadratic phase.

F Fresnel Zone
Plate: 
The Fresnel Zone Plate is a thresholded Chirp function, and may be used
to model the well-known diffractive element in an optical system.

M COMB Function:

The COMB function is a set of uniformly spaced discrete Dirac delta functions, and is used to model a sampling operation in a process. As with the discrete Dirac delta function, no impulse is loaded at those elements whose positions are noninteger values; this effect illustrates aliasing when sampling Dirac delta functions.

V Square Wave: 
The square wave may be defined (as above) as a thresholded sinusoidal function, or as a set of identical RECT functions at uniform spacing (RECT convolved with COMB).

This generates three sets of three equally spaced bars, loosely based on the famous USAF three-bar resolution chart. It may be used to model the input to a system. Three selections of varying widths are available.

K DC Blocking Filter: f(n) = 1 - RECT(n/b)
This is merely a centered RECT function of selectable width subtracted from the unit constant. It may be used to remove amplitudes at the center of another function, such as the term at zero spatial frequency (DC term) of a Fourier transform.

E Exponential Function: f(n) = e-n/b STEP(n)
This function appears in many areas of physics and engineering as a decay rate or a damping term. For example, the impulse response of a damped harmonic oscillator may be modeled as the product of a SINE function and this decaying exponential. It also is an interesting function in its own right. As an illustration, display its Fourier transform on the Argand diagram (option [N] in the PLOT MENU).

B BESINC Function 
This function is the 1-D profile of 2-D function also called the "sombrero" (by Gaskill), and is related to the 1-D "jinc" function (larger by -/4) . It is the 1-D profile of the 2-D Fourier transform of the 2-D "cylinder" function (also called the circle or "top hat"). Compare it (generated using the default parameters) to the SINC function (also using defaults), which is the 1-D profile of the 2-D Fourier transform of the 2-D RECT function. Note that the first zero of the Besinc function is farther from the origin by a factor of 1.22.

L Line segments
The segments are specified by the amplitudes at the selected endpoints. The default endpoints are the first and last elements in the array, and the default amplitudes are -SQR(N)/2 and +SQR(N)/2, respectively.
O Power Series Terms: f(n) = A ( n / b )p
Loads monomial functions that are powers of the coordinate n, which are used most often to generate the phase in the transfer function of a magnitude/phase function, such as a quadratic-phase filter. The default value of A limits the maximum change in amplitude to pi between samples at the edge of the array, thus ensuring that the samples of the filter are not aliased.
- Interpolation Functions:
Loads a variety of functions that are used to interpolate arrays consisting of sample amplitudes spaced by a distance parameter b, as may be created by multiplying an input function by COMB[n/b]. The interpolators include the "nearest-neighbor" RECT function w[n] = RECT[n/b], the "first-order" linear interpolator w[n] = TRI[n/b], the second-order interpolator that is proportional to the "triple convolution" of the RECT, etc. Also included is the ideal interpolator SINC[n/b] and approximations to the SINC (considered in Pratt, Digital Image Processing p.115).
> Special Functions:
Lorentzian
Inverse Sine and Tangent
Hyperbolic Trigonometric functions
Error function
These were added for performing some specific experiments for various applications.
For example, the ARCSIN function is used as a lookup table when comparing
spectra of functions before and after thresholding (Van Vleck theorem).
N Noise
from Probability Distributions p(f)
G Gaussian
Noise of selectable mean and standard deviation.
U Uniform
Distribution with selectable mean and range
2 Uniform
Distribution over a range of 2 pi
B Binomial
Distribution of rate p
N Boltzmann
Distribution (negative exponential)
P Poisson
Distribution with selectable rate
S Poisson
Point Process (impulses at Poisson-random intervals)
L Lorentzian
distribution of selectable rate (also called a Cauchy distribution)
R Rayleigh
distribution with selectable parameter
Graphs of Realizations of Noise Distributions
Several of the available noise signals are used to model realistic situations. Many physical processes generate Gaussian noise due to the application of the central limit theorem, which states that the sum of different probability distributions yields a Gaussian distribution. In fact, this result may be demonstrated in SIGNALS by adding several arrays of noise sampled from different distributions and showing that the histogram of the result is Gaussian. The uniform distribution is appropriate to describe the phase of an optical signal from a random scatterer, which follows a uniform distribution over a range of 2 pi radians. This scaled uniform distribution is used frequently enough so that the specific option was included. The Poisson distribution is valid for discrete events, such as the number of photon arrivals in a fixed time interval. The Rayleigh distribution is followed by the magnitude of the Fourier transform of noise with constant magnitude and a random phase of 2 pi radians.
W Data
Windows
B Bartlett
window (triangle weighting)
H
Hanning window (cosine weighting)
M Hamming
window (biased-cosine weighting)
S
Half-cycle Sine window
L
Blackman-Harris window (3 cosine factors)
K
Blackman window (2 cosine factors)
3
Half-cycle Sine3 window
G
Gaussian window
C
Cosine2 window
W
Welch window (parabolic falloff)
E
Extended Cosine bell window (unity over 80% of data)
R
Rectangle window (unity over 96% of data)
P
Parzen window
Y
Cauchy window (similar to Lorentzian)
Equations and Graphs of Window Functions
The data windows are used when processing discrete finite arrays (fixed number of samples N). The FFT assumes that the N-sample array is periodic; if not true in fact, the resulting transform will exhibit "false" frequency content known as "leakage" due to the discontinuity at the edges of the array. The window functions have zero amplitude (or nearly so) at the array "edges", and may be used to modulate the nonperiodic input to ensure that the product function is periodic over N samples. As evident from the library above, there are MANY window functions from which to choose, though the most common are the Hanning, Hamming, Boltzmann, and Extended COSINE Bell. The "width" of the window may be seleted to be less than N, which allows the spectra of the window functions themselves to be analyzed.
RETURN to OVERVIEW of SIGNALS MANUAL
OPTIONS in MAIN MENU
OPTIONS in OPERATIONS MENU
(suggest that "Image Autoload" be turned off!)
OPTIONS in ARITHMETIC MENU
OPTIONS in PLOT MENU (suggest
that "Image Autoload" be turned off!)