Dziban N
Dziban N

Reputation: 31

How to set a threshold value from signal to be processed in wavelet thresholding in python

I'm trying to denoise my signal using discrete wavelet transform in python using pywt package. But i cannot define what is threshold value that i should set in pywt.threshold() function

I have no idea what the best threshold value that should be set in order to reconstruct a signal with minimal noise

I used ordinary code: pywt.threshold(mysignal, threshold, 'soft')

yes i am intended to do soft thresholding

I want to know if the threshold value could be determined by looking to my signal or from the other way

Upvotes: 3

Views: 1803

Answers (1)

NRG
NRG

Reputation: 91

There are some helpful graphics on pywt webpage that help visualize what these thresholds are and what they do.

The threshold applies to the coefficients as opposed to your raw signal. So for denoising, this will typically be the last couple of entries returned by pywt.wavedec that will need to be zeroed/thresholded.

I could initial guess is the 0.5*np.std of each coefficeint level you want to threshold.

Upvotes: 2

Related Questions