``` NAME:
sincfltr
PURPOSE: (one line)
Pass 1-d data through a low-pass filter (damped sinc).
DESCRIPTION:
This procedure will filter an array of data with a low pass filter.
The input value, smofac, determines the high-frequency cut-off in the
output data.  The new cutoff will be 1/smofac times the old cutoff
frequency which is defined to be 1/2 the sampling interval in the
original data.

Thus, a smofac of 1 will return the original array and a smofac greater
than one will reduce the resolution of the input by that factor.  Large
values of smofac ( > 6 ) should be avoided.  For large values it is
much faster to do the filtering in multiple steps (provided you
sub-sample the output vector).

The filter is a damped sinc function and requires 21*smofac points in
the convolution kernel.

Note: The convolution will not be complete for any data point near the
edge, so those points cannot be trusted.  The edge effect will be
larger for larger values of the smofac.

If smofac is greater than 2, not all smoothed points are required.
Since the filter reduces the band-limit of the data, you can
sub-sample the output array with no loss of information.  For instance,
a smofac=4 will reduce the resolution of the data by a factor of 4.
That means all you need to save is every fourth point to retain all
of the information in the smoothed vector, ie., a step_by of 4.
In practice, it is probably wise to use a step_by value that is slightly
smaller than the value of smofac, eg., smofac=6, step_by=5.

For a more detailed description of filtering, convolution, sub-sampling,
and other related topics, consult the excellent reference: "The Fourier
Transform and Its Applications", by Ronald N. Bracewell, 2nd ed.,
McGraw Hill.

CATEGORY:
Numerical
CALLING SEQUENCE:
ans = sincfltr(x,smofac,step_by)
INPUTS:
x       - Input data to be smoothed.
smofac  - Smoothing factor relative to current sampling of data.
step_by - Sub-sampling factor for output vector (integer).
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
OUTPUTS:
return = smoothed and (possibly) sub-sampled data.
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
92/11/03 - Ported from an equivalent Zodiac function written in C.
Marc W. Buie, Lowell Observatory.
94/08/29, MWB, fixed bug for when length of input not evenly divisible
by the sub-sample factor.
95/03/29, MWB, fixed bug
2003/10/20, MWB, fixed error with convpts, now code forces convpts to
be odd.  Previously, if it came up even then the
output data was shifted by one point.
```