Windowfilter

From Eigenvector Research Documentation Wiki
Revision as of 19:24, 6 March 2012 by imported>Scott (Created page with "===Purpose=== Spectral filtering. ===Synopsis=== :xf = windowfilter(x,win,options); :xf = windowfilter(x,win,'algorithm'); ===Description=== Rows of X are filtered using a window...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Purpose

Spectral filtering.

Synopsis

xf = windowfilter(x,win,options);
xf = windowfilter(x,win,'algorithm');

Description

Rows of X are filtered using a windowed filtering. Note: To allow robust statistics the filter is based on a moving window (or box), and is slow compared to other filter methods.

Inputs

  • x = data of class 'double' or 'dataset'.
If 'dataset' it must x.type=='data' or 'image'.
If 'double' it must be MxN.
  • win = an odd integer corresponding to the window width of the filter.

Optional Inputs

  • algorithm = an string which will be used as the options.algorithm input (only valid when options input is omitted)

Outputs

  • xf = Filtered spectra class 'dataset'.

Options

options = a structure array with the following fields:

  • plots: [ {'none'} | 'final' ] governs plotting of results, and
  • algorithm: [ {'mean'} | 'median' | 'max' | 'min' | 'meantrimmed' | 'mediantrimmed' ] governs filter method.
  • ntrim: when algorithm = 'meantrimmed' or 'mediantrimmed', (ntrim) is the input (n) to the functions MEANTRIMMED or MEDIANTRIMED {default = 2}.

See Also

line_filter, box_filter