functiondenois

1D wavelet denoising

Information

This function carries out the wavelet denoising calculation for a data. The wavelet filter bank must be available for calling this function. This has to be obtained by wavelet filter functions.

It has to be noted that the thresholds calculated by thSelect in this toolbox are valid only if the noise has normal (Gaussian) distribution with zero mean and standard deviation of one! Otherwise, the data have to be pre-conditioned or the thresholds have to be manually selected by the user.

The manual selection of the thresholds has the possibility that the thresholds for the levels can be different. The thresholds are given in the input parameter, th[:], each element of which is used for one level. If a threshold for a level is less than zero, the default threshold automatically calculated by thSelect will be used.

Inputs

TypeNameDefaultDescription
Real[:]u{-1.3853, 1.5788, 2.2041, 3.9822, 3.3831, 6.7019, 5.1197, 5.9217, 4.2061, 3.5389, 3.4177, 2.1313, -0.7999, -2.4885, -3.2673, -4.6569, -4.0413, -5.1036, -5.3449, -6.2969, -3.7925, -3.4697, -3.0802, -0.8552, -1.5134, 1.0541, 2.2248, 3.3398, 3.1799, 4.8989, 4.4210, 4.0804, 3.4891, 5.1387, 2.3952, 1.9965, -0.2529, -0.6175, -4.8076, -3.8146, -5.1278, -5.4474, -5.0879, -5.3228, -2.8489, -4.8475, -3.7284, -4.0229, -1.7457, -1.3380}Data to be denoised
IntegerdecLevel2Wavelet decomposition levels
Real[:]lod{0.7071067811865476, 0.7071067811865476}Wavelet low pass filter for decomposition
Real[:]hid{-0.7071067811865476, 0.7071067811865476}Wavelet high pass filter for decomposition
Real[:]lor{0.7071067811865476, 0.7071067811865476}Wavelet low pass filter for reconstruction
Real[:]hir{0.7071067811865476, -0.7071067811865476}Wavelet high pass filter for reconstruction
Real[:]th{-1, -1}Thresholds for all decomposition levels with th[1] for the first detail level (highest frequency components)
BooleansorhtrueSoft (false) or hard (true) thresholding for all decomposition levels
Types.threshMethodthMethod1Method for automatic threshold calculation

Outputs

TypeNameDefaultDescription
Real[:]yDenoised data
Real[:]noiseNoise removed from the data, = u-y
Real[:]cWavelet coefficients before denoising
Real[:]cthWavelet coefficients after denoising
Integer[:]lenLength of wavelet coefficients of all levels