Learn R Programming

mwaved (version 1.1.8)

gammaBlur: Multichannel Gamma density blur

Description

Create blur of the regular smooth type generated from Gamma densities

Usage

gammaBlur(n, shape, scale)

Arguments

n

An integer specifying the number of observations in each channel.

shape

A numeric vector of length m where each element specifies the shape parameter for the Gamma density used to blur each channel.

scale

A numeric vector of length m where each element specifies the scale parameter for the Gamma density used to blur each channel.

Value

A numeric n by m matrix of normalised Gamma blur.

Details

Function creates a matrix of dimension n by m which contains a normalised (unit energy in each column) set of blur functions of regular smooth type, generated by a Gamma density. These Gamma densities are generated using the dgamma base R function and then normalised to have unit energy.

See Also

dgamma for details of the Gamma density

boxcarBlur, blurSignal

Examples

Run this code
# NOT RUN {
n <- 1024
m <- 3
shape <- seq(from = 0.5, to = 1, length = m)
scale <- rep(0.25,m)

# Plot the smooth (gamma) blur
x <- (1:n)/n
blurMat <- gammaBlur(n, shape, scale)
matplot(x, blurMat, type = 'l', main = paste('Set of Gamma', m,'Gamma blur densities.'))

# Plot a LIDAR signal and its multichannel smooth blurred version
signal <- makeLIDAR(n)
matplot(x, signal, type = 'l', main = 'LIDAR test signal')
blurredSignal <- blurSignal(signal, blurMat)
matplot(x, blurredSignal, type = 'l', main = 'Smooth blurred LIDAR test signals')
# }

Run the code above in your browser using DataLab