function WSOFTTHR, y,t ;+ ; NAME: ; WSOFTTHR ; ; PURPOSE: ; This function applies a soft threshold. ; ; CATEGORY: ; Wavelets ; ; CALLING SEQUENCE: ; x = WSOFTTHR(y,t) ; ; INPUTS: ; y = Noisy Data ; t = Threshold ; ; OUTPUTS: ; x = SIGN(y)(|y|-t) ; ;SEE ALSO: ; whardthr, wdoshrnk ; ; MODIFICATION HISTORY: ; Written by: Amara Graps December, 1994 ;Translated from MatLab Wavelab routine: softthresh.m ;- res = (ABS(y) - t) res = (res + ABS(res))/2 x = WSIGN(y)*res ; ; Algorithm Source: WaveLab Version 0.600 ; WaveLab WWW site: http://playfair.stanford.edu/ ; WaveLab Questions? e-mail wavelab@playfair.stanford.edu ; RETURN, x END ;***************************************************