The simplest way to ensure that your original data goes smoothly to zero at the ends is to multiply it by a filter that is unity for most of the spectral range but goes down to zero at each end in a smooth manner. The most common form for such a filter is the `cosine bell', and this is what is generated by the Figaro `cosbell' function. (For a detailed discussion, see Brault & White, 1971, and the references they quote).
The only parameter needed by `cosbell' is the percentage of the data that is to be covered by the bell shapes at each end of the data. 10% is a common value to use. `cosbell' uses an input data structure as a template and generates a structure that is the same as the template except for the data itself. Usually, you use the data to which you intend to apply the filter as the template. So, for example, to apply a 10% cosine bell to the data in `myspect',
ICL> cosbell myspect 10 bell ICL> imult myspect bell myspect
At present, `cosbell' cannot handle data with more than two dimensions.
FIGARO A general data reduction system