function WVISUTHR, y, TThresh ;+ ;NAME: ; WVISUTHR ; ;PURPOSE: ; To perform visually calibrated adaptive smoothing. ; ;CATEGORY: ; Wavelets. ; ;CALLING SEQUENCE: ; x = WVISUTHR(y, TThresh) ; ;INPUTS: ; y = data array ; TThresh = Type of Visu Thresholding: ; = 1 (Hard) or = 2 (Soft) ; ;OUTPUTS: ; x = data array thresholded ; ;EXAMPLE: ; ;SEE ALSO: ; WHARDTHR, WSOFTTHR, WDOSHRNK ; ;NOTES: ; See article ``Ideal Spatial Adaptation via Wavelet Shrinkage'' ; By D.L. Donoho and I.M. Johnstone ; ;MODIFICATION HISTORY: ; Written by: Amara Graps September 1995 ;Translated from MatLab Wavelab routine: visuthresh.m ;- thr = SQRT(2*ALOG(N_ELEMENTS(y))) CASE TThresh OF 1: BEGIN ;Hard Thresholding x = WHARDTHR(y,thr) END 2: BEGIN ;Soft Thresholding x = WSOFTTHR(y,thr) END ENDCASE ; ; Algorithm Source: WaveLab Version 0.600 ; WaveLab WWW site: http://playfair.stanford.edu/ ; WaveLab Questions? e-mail wavelab@playfair.stanford.edu ; RETURN, x END ;***************************************************