Operations Menu

Given an input array f(n) = a + ib, an output array g(n) = c + id, and a complex constant (entered from the keyboard) r + is, the available operations are:

T, I      Forward/Inverse Fast Fourier Transform (FFT)        Equation for FFT

The need to demonstrate the principles and characteristics of the Fourier transform provided the original incentive to develop SIGNALS. The convention for the indices is selected in the MAIN MENU (option "I") to either [-N/2, N/2 - 1] or [0, N - 1]. The normalization factor A‹ in the forward transform also is selected in the MAIN MENU (option "M"). The allowed values for A are 1/N, 1, or SQR(1/N), with the respective normalization factors in the inverse transform of 1, 1/N, and SQR(1/N). The time required for the computation is displayed, to allow comparison with the discrete Fourier transform (see next item).

K      Discrete Fourier Transform (DFT)        Equation for DFT

This operation is included for demonstrations only. Because the DFT may be computed over "any" number of frequencies within a selected range, the number of samples N in the array would have to be changed whenever the DFT is computed. This would require deleting the other array. The DFT may be computed even at frequencies above/below the Nyquist frequency to demonstrate its periodicity. If computing the DFT of a 256-sample array, select 257 samples in the DFT to produce a set of output frequencies "symmetric" about 0. The values of the displayed transform may be examined by using the VALUES option in the DFT display menu.

C, B     Discrete Cosine Transform (DCT)       

This is the fundamental operation for a number of signal/image compression algorithms. The DCT of the entire N-pixel array is computed while assuming that the array is indexed from [0,N-1]. The indices of the array are changed to make this so. The DCT of any real-valued array is real, and the DCT of a complex-valued array is complex. The DCT is computed by FFT on a "symmetric" array of size 2N (with the appropriate phase factor to force symmetry).

H            Hartley Transform       Equation for Hartley Transform

This is a variant of the Fourier transform which sums the cosine and sine functions without the imaginary weight factor. It has the arguable advantage of yielding a real-valued transform for a real-valued input. The transforms of the even and odd real parts of the input are summed, rather than existing in different arrays as is true for the Fourier transform.

W, Y      Forward/Inverse Walsh-Hadamard Transform

This operation, used in image compression, may be viewed as a transform using a bitonal function (values +/- 1). It is most often applied to arrays indexed over the range [0, N - 1], but the generalization to indices [-N/2, N/2 - 1] also is valid.

: ;      Forward/Inverse Complex Cepstrum       Equation for Complex Cepstrum

The cepstrum (anagram of "spectrum") is the cascade of the operation of the Fourier transform, complex logarithm, and inverse Fourier transform, and is used in "homomorphic" filtering to segment functions that have been multiplied. The logarithm function uses double-precision arithmetic. The inverse cepstrum is the cascade of the inverse Fourier transform, complex exponentiation, and the forward Fourier transform.

R         Convert a Magnitude/Phase array to Real/Imaginary Parts  

 Equation for Converstion from Magnitude/Phase to Real/Imaginary Parts

M        Convert a Real/Imaginary array to Magnitude/Phase       Conversion from Real/Imaginary array to Magnitude/Phase

-         Threshold at selected amplitude

|      Clip at selected amplitude

\      Quantize real and imaginary parts of f(n) separately

~      Quantize complex amplitudes of f(n) as 2-D vectors.

=       Equalize the histogram of f(n)

Q      Compute Squared Magnitude of the array

+      Add complex-valued constant to array:            g(n) = f(n) + (r + is)

x      Multiply array by complex-valued constant:     g(n) = f(n) x (r + is)

^      Raise complex amplitude to complex-valued power:   g(n) = (f(n))(r + is) = e(r+is) LOG(f(n)) = e(r+is) LOG(a+ib)

L      Logarithm 

Several options are available, including the complex logarithm of the magnitude (suboption L:   g(n) = LOG|f(n)| + 0i = LOG|a + ib|), where the output is the natural logarithm of the magnitude of the complex number; the resulting imaginary part is 0. The output is set to -88 when a = b = 0, which is the limit for single-precision arithmetic. The complete complex logarithm evaluates g(n) = LOG|a + ib| + i TAN-1(b/a), where the imaginary part of the output is the unwrapped phase of the array values. The result is the complex logarithm; the imaginary part of the output is the phase of the array after unwrapping. The magnitude of the logarithm is set to -88 when a = b = 0.

E      Complex Exponential:     g(n) = e(f(n)) = e(a + ib) = ea COS(b) + i ea SIN(b)

N      Complex Inverse (reciprocal): g(n) = (a + ib)-1 = (a/(a + ib)2) - i (b/(a + ib)2)

'      Differentiation

$       Integration:

>      Circularly Translate Array

V      "Time"-Reversal

J      Complex Conjugate: g(n) = f*(n) = (a - i b)

&      Autocorrelation (computed via FFTs): g(n) = f(n) & f(n) = SUM( f(n' - n) f*(n') ) over n'

*      Convolution with a small kernel h(x): g(n) = f(n) * h(n) = SUM( f(n') h(n - n') ) over n'

Z      Normalize array: g(n) =   f(n) / f(0)    or   f(n) / fmax

!      "Checkerboard" (multiply odd-index pixels by -1): g(n) = f(n) x (-1)n

S      Swap Real/Imaginary Parts of the array

)      Nonlinear Filtering over a neighborhood (Median, Maximum, Minimum, Variance)

|      Compute Absolute Value of Real Array (only in Modulation Menu for Real Array)

   OPTIONS in FUNCTIONS MENU    (suggest that "Image Autoload" be turned off!)
   OPTIONS in PLOT MENU                (suggest that "Image Autoload" be turned off!)