function WMKOFILT, Type,Par ;+ ; NAME: ; WMKOFILT ; ; PURPOSE: ; This function generates an orthonormal QMF filter for a wavelet ; transform. ; ; CATEGORY: ; Wavelets ; ; CALLING SEQUENCE: ; qmf = WMKOFILT(Type,Par) ; ; INPUTS: ; Type: string, 'Haar', 'Daubechies', 'Coiflet', 'Symmlet' ; Par: integer, e.g. if Type ='Coiflet', Par=3 specifies ; Coiflet3 ; ; OUTPUTS: ; qmf: quadrature mirror filter ; ; EXAMPLE: ; ; SEE ALSO: ; wfwtpo, wiwtpo, wfwt2po, wiwt2po, wpanalys ; ; MODIFICATION HISTORY: ; Written by: Amara Graps October, 1994 ;Translated from MatLab Wavelab routine: makeonfilter.m ;- Checktype = STRCOMPRESS(Type,/remove_all) ;remove white space Checktype = STRUPCASE(Checktype) ;make upper case CASE Checktype OF 'HAAR': BEGIN f = [1,1] / sqrt(2) END 'DAUBECHIES': BEGIN CASE Par OF 4: BEGIN f = [.482962913145 , .836516303738, $ .224143868042 , -.129409522551 ] END ;4 6: BEGIN f = [ .332670552950, .806891509311, $ .459877502118, -.135011020010, $ -.085441273882, .035226291882 ] END ;6 ENDCASE ;Par END ;Daubechies 'COIFLET': BEGIN CASE Par OF 2: BEGIN f = [ .011587596739, -.029320137980, -.047639590310, $ .273021046535, .574682393857, .294867193696, $ -.054085607092, -.042026480461, .016744410163, $ .003967883613, -.001289203356, -.000509505399 ] END ;2 3: BEGIN f = [-.002682418671, .005503126709, .016583560479, $ -.046507764479, -.043220763560, .286503335274, $ .561285256870, .302983571773, -.050770140755, $ -.058196250762, .024434094321, .011229240962, $ -.006369601011, -.001820458916, .000790205101, $ .000329665174, -.000050192775, -.000024465734 ] END ;3 ENDCASE ;Par END ;Coiflet 'SYMMLET': BEGIN CASE Par OF 6: BEGIN f = [ .021784700327, .004936612372, -.166863215412, $ -.068323121587, .694457972958, 1.113892783926, $ .477904371333, -.102724969862, -.029783751299, $ .063250562660, .002499922093, -.011031867509 ] END ;6 8: BEGIN f = [ .002672793393, -.000428394300, -.021145686528, $ .005386388754, .069490465911, -.038493521263, $ -.073462508761, .515398670374, 1.099106630537, $ .680745347190, -.086653615406, -.202648655286, $ .010758611751, .044823623042, -.000766690896, $ -.004783458512 ] END ;8 ENDCASE ;Par END ;Symmlet ELSE: PRINT, 'Not enough information for Filter!' ENDCASE ;Case Checktype f = f /WNNORM(f) ; ; Algorithm Source: WaveLab Version 0.600 ; WaveLab WWW site: http://playfair.stanford.edu/ ; WaveLab Questions? e-mail wavelab@playfair.stanford.edu ; RETURN, f END