Create 2D Cosine Packet Function

DESCRIPTION:
Creates a 2D cosine packet function.

USAGE:
cosine.packet.2d(taper="poly2", level=0, block=0, frequency=0,
                 dct.type=2, interval=c(0, 1), epsilon=.5)

OPTIONAL ARGUMENTS:
taper:
one of the following character strings, indicating the taper function: "boxcar", "poly1", "poly2", "poly3", "poly4", "poly5","trig", or a character vector of length two with elements drawn from this set. If the length is one, the same taper function is used for both row and column. "boxcar", "poly1", "poly2", "poly3", "poly4", "poly5", and "trig".
level:
an integer or an integer vector of length two.
block:
an integer or an integer vector of length two, block number in the given level.
frequency:
an integer or an integer vector of length two.
interval:
a vector of length two or four.
dct.type:
one of the integers 2 or 4 or a vector of length 2 with elements 2 and/or 4 indicating which discrete cosine transform, DCT-II or DCT-IV to use. See dct for the definitions of DCT-II and DCT-IV.
epsilon:
a number or a vector of length 2, widths of the left and right "cutoff" (folding) regions.

VALUE:
an object of class cosine.packet.2d.


DETAILS:
General forms of 2D type-II/type-IV cosine packet functions are the tensor product of 1D type-II/type-IV cosine packet functions.

If only a single integer or string is given for arguments dct.type, taper or boundary, then the same function or rule is used for both rows and columns. Different taper functions, boundary rules, DCT types can be used for rows and columns by using a vector of length two for that argument. The first element of the vector applies to the rows and the second to the columns.

The algorithms for the taper functions are given in the S+WAVELETS User's Manual, in the section "Cosine Packet Algorithms". They are discussed in greater depth in Wickerhauser (1994).

Generic functions such as print, plot, support have methods to show the properties of the cosine.packet.2d object.


REFERENCES:
Wickerhauser, M. V. (1994). Adapted Wavelet Analysis -- from theory to software.

SEE ALSO:
cosine.packet , dct.2d , fft , plot.cosine.packet.2d .

EXAMPLES:
plot(cosine.packet.2d(taper="poly1", frequency=4))
plot(cosine.packet.2d(taper="poly1", level=2, frequency=4))