Convolution and Down Sampling Operator

DESCRIPTION:

Convolution and down sampling (decimation) operator.

USAGE:

convdown(x, filter, boundary, convfast=F) 

REQUIRED ARGUMENTS:

x
a vector or a time series.
filter
a vector of filter coefficients.
boundary
a character string giving the name of the boundary rule, e.g., "periodic". See details below.

OPTIONAL ARGUMENTS:

convfast
logical flag indicating if fast algorithm should be used.

VALUE:

if n=length(x) is even, then the filtered vector is of length n/2. If n is odd, then when filter is a low-pass filter ( is.low.pass(filter)==TRUE), the filtered vector is of length ceiling(n/2) and when filter is a high-pass filter ( is.high.pass(filter)==TRUE), the filtered vector is of length floor(n/2). When boundary="reflection", and both n and m=length(filter) are odd, then if is.dual(filter)==FALSE and is.low.pass(filter)==TRUE, or is.dual(filter)==TRUE and is.high.pass(filter)==TRUE, the filtered vector is of length ceiling(n/2); otherwise the filtered vector is of length floor(n/2) .

DETAILS:



Available boundary rules:

periodic:
x

is assumed to be periodic. Sample size must be even.

polynomial:
x is extended using a polynomial (of degree pdeg) extrapolation. The default pdeg is given by wavelet.options(). To use different pdeg, reset pdeg in wavelet.options() (e.g. wavelet.options(pdeg=1)) or set pdeg as an attribute of boundary.
poly0:
a special case of polynomial with pdeg=0.
poly1:
a special case of polynomial with pdeg=1.
poly2:
a special case of polynomial with pdeg=2.
zero:
x is padded using zeros.
reflection:
x is reflected (and then periodically extended). Symmetric/antisymmetric filter is needed.
interval:
uses Cohen, Daubechies and Vial's interval wavelets. Sample size must be even. For "s4", "s6", "s8", "s10", "s12", "s14", or "s16" filters only.
infinite:
x is padded using a polynomial (of degree pdeg) extrapolation; a fraction (specified by pfrac) of data can be used to fit two polynomial regression models, one for each end. The filtered vector has attributes left.pad and right.pad to store extra coefficients (of maginitude O(length(filter))) so that all coefficients (infinite number of them!) can be recovered based on the polynomial extension model.

SEE ALSO:

, , , .