LS2Wsim.cddews | R Documentation |
Simulates a realisation of an LS2W process of a given spectral structure for Daubechies wavelets.
## S3 method for class 'cddews' LS2Wsim(spectrum,innov=rnorm,...)
spectrum |
True spectrum of class |
innov |
The distribution of the innovations of the LS2W process. Defaults to the (unit) normal distribution. |
... |
Any other arguments passed into the |
This function uses the provided spectral structure to simulate an LS2W process. The provided spectral structure should take positive values, any negative values will be set to zero by the function.
The process of simulation for Daubechies wavelets follows by firstly extracting the coefficients from the provided spectrum and squaring. They are then multiplied by random increments (from rnorm()
) and an appropriate multiple of 4 (depending on the scale) which allows for the effect of basis averaging. After converting to the appropriate form (a wst2D
object) the basis average is taken to give a realisation of an LS2W process.
A simulated image matrix that will exhibit the spectral characteristics defined by spectrum
.
Sarah L Taylor
HaarMontage
#Generate an empty spectrum # Spectrum<-cddews(matrix(0,64,64),smooth=FALSE) # #Add power at the first scale, in the vertical direction # Spectrum$S[1,,]<-matrix(1,64,64) # # Simulate an LS2W process with this structure # testimage<- LS2Wsim(Spectrum) #
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.