boundaries: Various boundary conditions for the 2D wavelet transform.

boundariesR Documentation

Various boundary conditions for the 2D wavelet transform.

Description

Extend a matrix to the desired size.

Usage

pad(x, N, Ny = N, value = min(x, na.rm = TRUE))

put_in_mirror(x, N, Ny = N)

period_bc(x, N, Ny = N)

Arguments

x

a real matrix

N

the number of rows of the desired output

Ny

the number of columns of the desired output, defaults to N

value

the value with which the picture is padded by pad

Details

pad pads the fields with a constant value on all sides, be careful what you pick here. put_in_mirror reflects the input at all edges (with repeated end samples), period_bc simply repeats the input periodically. In any case, you can retrieve the initial area via bc$res[ bc$px, bc$py ].

Value

a list containing the extended matrix ($res) and the positions of the original matrix within the extended one ($px and $py).

Note

N and Ny must be at least as big as the input.

Examples

bc <- put_in_mirror( blossom, N=300 )
plot( bc )
print( range( bc$res[ bc$px, bc$py ] - blossom ) )

dualtrees documentation built on Oct. 4, 2023, 5:10 p.m.