*memse* transforms a real-valued
time series (from the specified *input-file*, or from the standard input
if *input-file* is specified as ``-''; *input-file* must be in text form) into a
power spectrum (on the standard output). *memse* is designed to be used
in much the same way as *fft*(1)
; it accepts the same input, produces output
in the same format, and accepts many of the same options used with *fft*.

Unlike *fft*, which bases its spectral estimates on the discrete Fourier
transform, *memse* uses the maximum entropy (all poles) method, also known
as autoregressive (AR) spectral estimation. This method models the spectrum
by a series expansion in which the free parameters are all in the denominators
of its terms; hence each term may represent a pole (corresponding to
infinite power spectral density within an infinitely narrow frequency
band). By contrast, Fourier analysis models the spectrum by a series expansion
in which the free parameters are all in the numerators; hence each term
in a Fourier series may represent a zero. All-poles models are particularly
useful for analysis of spectra which have discrete peaks (in the terminology
of optical spectra, ``lines'').

In order to use *memse*, you should have some
idea of the order of the model you wish to use (i.e., the number of poles).
Although this may be any number up to the number of input points, the
number of poles generally should not exceed the square root of the number
of input points, and usually should be considerably less than that number.
Large numbers of poles lead to lengthy computations (much slower than
the FFT) in which accumulated roundoff error becomes a serious problem.
This problem may also occur if the length of the input series becomes
excessive. The recommended way to use *memse* is to begin by using *fft*,
in order to estimate the model order. Typically this should be a small
multiple of the number of peaks which you *believe* are present. Beware!
*memse* will produce smooth spectral estimates for whatever model order
you choose -- and they may be totally bogus if you choose incorrectly. Varying
the model order can help to weed out some spurious features, but use extreme
care when interpreting *memse* output given noisy input.

*Options* are:

**-f***frequency*- Show the center frequency for each bin in the first column. The
*frequency*argument specifies the input sampling frequency; the center frequencies are given in the same units. **-h**- Print a usage summary.
**-l***n*- Handle input series
up to
*n*points in length. Default:*n*= 16384, although you should be cautious about using*memse*with such long input series. **-n***n*- Produce exactly
*n*power estimates, evenly spaced in frequency from 0 up to half the input sampling frequency inclusive. The default depends on the length of the input series; it is designed to match*fft*'s defaults, to make it easy to compare outputs. You may wish to use values of*n*which are higher than the default in order to improve your estimates of the locations of sharp features in the spectrum; since this is not possible using*fft*, this feature is one of the main advantages of*memse*. **-o***n*- Use an
*n*th order model (i.e., up to*n*poles). Default: the square root of the number of input samples. **-w***window-type*- Apply the specified window to the input data.
*window-type*may be one of: `Bartlett', `Blackman', `Blackman-Harris', `Hamming', `Hanning', `Parzen', `Square', and `Welch'. The `Square' window type is equivalent to using no window at all; this is also variously known as a rectangular or Dirichlet window. **-z**- Add a constant to each input sample, chosen such that the mean value of the entire series is zero.
**-Z**- Set the mean value of the inputs to zero
as for
**-z**, and detrend the series (set its mean first derivative to zero). This is equivalent to subtracting a best-fit (by least squares) line from the input data.

This program
is part of the *psd* package, distributed with the DB Software Package,
version 9.3 and later.