Jump to content

File:Daubechies4-functions.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia
    Original file (SVG file, nominally 1,000 × 750 pixels, file size: 10 KB)

    Summary

    Description
    English: Daubechies 4 tap wavelet and scaling functions
    Date
    Source Own work
    Author LutzL
    Other versions
    SVG development
    InfoField
     The SVG code is valid.
     This plot was created with gnuplot.
      This plot uses embedded text that can be easily translated using a text editor.

    Licensing

    I, the copyright holder of this work, hereby publish it under the following licenses:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
    GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
    You may select the license of your choice.

    file daubechies.magma

    see Magma computer algebra system, with link for an online calculator.

    R<I>:=ComplexField(30);
    LP<Z> := LaurentSeriesRing(R);
    T:=(-Z+2-Z^-1)/4;
    
    TR<U>:=PowerSeriesRing(R);
    Pol<X>:=PolynomialRing(R);
    
    readi A,"What accuracy should the wavelets have?";
    
    PolarFactorization:=function(A)
    	pp:=Truncate( (1-U+O(U^A))^-A );
    	pp:=Evaluate(pp,X);
    	p:=LP!1;
    	for rr in Roots(pp) do
    		r:=rr[1];r;
    		for ff in Roots(X^2+(4*r-2)*X+1) do
    			f:=ff[1];
    			if Abs(f) ge 1 then p*:=Z-f; end if;
    		end for;
    	end for;
    	p1:=Evaluate(p,1);
    	return LP![ Real(c): c in Eltseq(p/p1) ],pp;
    end function;
    
    p,p2:=PolarFactorization(A);p;a:=2^(1-A)*(1+Z)^A*p;a2:=(1-X)^A*p2;
    "Scaling sequence",Coefficients(a),"product filter", Coefficients(a2);
    	
    
    Decimation:= function(c)
    	return LP![ Coefficient(c,2*k): k in [0..Degree(c) div 2+2] ];
    end function;
    
    // Power iteration for the values of the scaling function at integer locations 
    shape := LP!(Z^A);
    for i := 1 to 10 do
    	for k := 1 to 10 do
    		shape := Decimation(a*shape); shape := shape/Evaluate(shape,1);
    	end for;
    	shape:=LP![ R!(1+Coefficient(shape,k))-1: k in [0..Degree(shape)] ];
    end for;
    
    wave := LP![ (-1)^k*Coefficient(a,2*A-k): k in [1..2*A] ];
    scal := shape;
    
    dx := 1; supp := 2*A-1; pow:=1;
    for i := 1 to 4 do
    	scal := scal*LP!Evaluate(a,Z^pow);
    	dx /:=2; supp *:=2; pow*:=2;
    end for;
    
    wave := scal*LP!Evaluate(wave,Z^pow);	
    scal := scal*LP!Evaluate(a,Z^pow);
    dx /:=2; supp *:=2; pow*:=2;
    
    a2;
    
    fp := Open(Sprintf("daub%o-scal.dat",A),"w");
    RO:=RealField(12); 
    for k := 1 to supp do
    	fprintf fp, "%o\t%o\t%o\t%o\t%o\n",RO!(k*dx),
    	RO!Coefficient(scal,k),
    	RO!Coefficient(wave,k),
    	RO!Abs(Evaluate(scal,Exp(I*2*Pi(RO)*dx^2*k))*dx),
    	RO!Abs(Evaluate(wave,Exp(I*2*Pi(RO)*dx^2*k))*dx);
    end for;
    Flush(fp);
    


    set data style lines
    set zeroa
    set key bottom
    set term svg enhanced size 1000,750 fsize 24
    set out "Daubechies4-functions.svg"
    set title "Daubechies 4 tap wavelet"
    pl "daub2-scal.dat" u 1:2 ti "scaling function" w lines lt 3 lw 3,\
       "daub2-scal.dat" u 1:3 ti "wavelet function" w lines lt 1 lw 3
    set out
    

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    copyright status<\/a>"}},"text\/plain":{"en":{"":"copyright status"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":50423863,\"id\":\"Q50423863\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P6216":"copyrighted<\/a>"}},"text\/plain":{"en":{"P6216":"copyrighted"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P6216 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
    inception<\/a>"}},"text\/plain":{"en":{"":"inception"}}},"{\"value\":{\"time\":\"+2009-09-11T00:00:00Z\",\"timezone\":0,\"before\":0,\"after\":0,\"precision\":11,\"calendarmodel\":\"http:\\\/\\\/www.wikidata.org\\\/entity\\\/Q1985727\"},\"type\":\"time\"}":{"text\/html":{"en":{"P571":"11 September 2009"}},"text\/plain":{"en":{"P571":"11 September 2009"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P571 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

    11 September 2009

    source of file<\/a>"}},"text\/plain":{"en":{"":"source of file"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":66458942,\"id\":\"Q66458942\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P7482":"original creation by uploader<\/a>"}},"text\/plain":{"en":{"P7482":"original creation by uploader"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P7482 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
    media type<\/a>"}},"text\/plain":{"en":{"":"media type"}}},"{\"value\":\"image\\\/svg+xml\",\"type\":\"string\"}":{"text\/html":{"en":{"P1163":"image\/svg+xml"}},"text\/plain":{"en":{"P1163":"image\/svg+xml"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P1163 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

    image/svg+xml

    checksum<\/a>"}},"text\/plain":{"en":{"":"checksum"}}},"{\"value\":\"d5aaa12415d9cfba8d49fb7268be6df14a41dc25\",\"type\":\"string\"}":{"text\/html":{"en":{"P4092":"d5aaa12415d9cfba8d49fb7268be6df14a41dc25"}},"text\/plain":{"en":{"P4092":"d5aaa12415d9cfba8d49fb7268be6df14a41dc25"}}},"{\"value\":{\"entity-type\":\"property\",\"numeric-id\":459,\"id\":\"P459\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"":"determination method or standard<\/a>"}},"text\/plain":{"en":{"":"determination method or standard"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":13414952,\"id\":\"Q13414952\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P459":"SHA-1<\/a>"}},"text\/plain":{"en":{"P459":"SHA-1"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P4092 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

    d5aaa12415d9cfba8d49fb7268be6df14a41dc25

    data size<\/a>"}},"text\/plain":{"en":{"":"data size"}}},"{\"value\":{\"amount\":\"+10112\",\"unit\":\"http:\\\/\\\/www.wikidata.org\\\/entity\\\/Q8799\"},\"type\":\"quantity\"}":{"text\/html":{"en":{"P3575":"10,112 byte<\/span>"}},"text\/plain":{"en":{"P3575":"10,112 byte"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P3575 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

    10,112 byte

    height<\/a>"}},"text\/plain":{"en":{"":"height"}}},"{\"value\":{\"amount\":\"+750\",\"unit\":\"http:\\\/\\\/www.wikidata.org\\\/entity\\\/Q355198\"},\"type\":\"quantity\"}":{"text\/html":{"en":{"P2048":"750 pixel<\/span>"}},"text\/plain":{"en":{"P2048":"750 pixel"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P2048 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

    750 pixel

    width<\/a>"}},"text\/plain":{"en":{"":"width"}}},"{\"value\":{\"amount\":\"+1000\",\"unit\":\"http:\\\/\\\/www.wikidata.org\\\/entity\\\/Q355198\"},\"type\":\"quantity\"}":{"text\/html":{"en":{"P2049":"1,000 pixel<\/span>"}},"text\/plain":{"en":{"P2049":"1,000 pixel"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P2049 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

    1,000 pixel

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current11:25, 11 September 2009Thumbnail for version as of 11:25, 11 September 20091,000 × 750 (10 KB)LutzL{{Information |Description={{en|1=Daubechies 4 tap wavelet and scaling functions}} |Source=Own work by uploader |Author=LutzL |Date=2009-09-11 |Permission= |other_versions=Daubechies4-functions.png }} Category:Wavelets [[Category:Gnupl

    The following 3 pages use this file:

    Global file usage

    The following other wikis use this file:

    Metadata