This file is indexed.

/usr/share/doc/python-pywt-doc/html/ref/wavelets.html is in python-pywt-doc 0.3.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Wavelets &mdash; PyWavelets Documentation</title>
    
    <link rel="stylesheet" href="../_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.3.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within PyWavelets Documentation"
          href="../_static/opensearch.xml"/>
    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="top" title="PyWavelets Documentation" href="../index.html" />
    <link rel="up" title="API Reference" href="index.html" />
    <link rel="next" title="Signal extension modes" href="signal-extension-modes.html" />
    <link rel="prev" title="API Reference" href="index.html" />
 
<meta name="description" content="PyWavelets is a scientific Python module for Wavelet Transform calculations."/>
<meta name="keywords" content="PyWavelets, wavelets, Python, wavelet transform, discrete wavelet transform, dwt, idwt, swt, wavelet packets, stationary wavelet transform, pywt"/>
<meta name="author" content="Filip Wasilewski"/>
<meta name="Distribution" content="Global"/>
<meta name="Robots" content="INDEX,FOLLOW"/>

<script type="text/javascript">
    (function ($) {
        $(document).ready(function () {
            $("#toggle-edit-info").click(function (e) {
                e.preventDefault();
                $("#edit-info").toggle();
            });
        });
    })(jQuery);
</script>

  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="signal-extension-modes.html" title="Signal extension modes"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="API Reference"
             accesskey="P">previous</a> |</li>
    <li><a href="../index.html">Home &raquo;</a></li>
          <li class="nav-item nav-item-1"><a href="../contents.html" >PyWavelets</a> &raquo;</li>
          <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">API Reference</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="wavelets">
<span id="ref-wavelets"></span><h1>Wavelets<a class="headerlink" href="#wavelets" title="Permalink to this headline"></a></h1>
<div class="section" id="wavelet-families">
<h2>Wavelet <code class="docutils literal"><span class="pre">families()</span></code><a class="headerlink" href="#wavelet-families" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="pywt.families">
<code class="descclassname">pywt.</code><code class="descname">families</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pywt.families" title="Permalink to this definition"></a></dt>
<dd><p>Returns a list of available built-in wavelet families. Currently the built-in
families are:</p>
<ul class="simple">
<li>Haar (<code class="docutils literal"><span class="pre">haar</span></code>)</li>
<li>Daubechies (<code class="docutils literal"><span class="pre">db</span></code>)</li>
<li>Symlets (<code class="docutils literal"><span class="pre">sym</span></code>)</li>
<li>Coiflets (<code class="docutils literal"><span class="pre">coif</span></code>)</li>
<li>Biorthogonal (<code class="docutils literal"><span class="pre">bior</span></code>)</li>
<li>Reverse biorthogonal (<code class="docutils literal"><span class="pre">rbio</span></code>)</li>
<li><cite>&#8220;Discrete&#8221;</cite> FIR approximation of Meyer wavelet (<code class="docutils literal"><span class="pre">dmey</span></code>)</li>
</ul>
<p><strong>Example:</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">pywt</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">pywt</span><span class="o">.</span><span class="n">families</span><span class="p">()</span>
<span class="go">[&#39;haar&#39;, &#39;db&#39;, &#39;sym&#39;, &#39;coif&#39;, &#39;bior&#39;, &#39;rbio&#39;, &#39;dmey&#39;]</span>
</pre></div>
</div>
</dd></dl>

</div>
<div class="section" id="built-in-wavelets-wavelist">
<h2>Built-in wavelets - <code class="docutils literal"><span class="pre">wavelist()</span></code><a class="headerlink" href="#built-in-wavelets-wavelist" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="pywt.wavelist">
<code class="descclassname">pywt.</code><code class="descname">wavelist</code><span class="sig-paren">(</span><span class="optional">[</span><em>family</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#pywt.wavelist" title="Permalink to this definition"></a></dt>
<dd><p>The <a class="reference internal" href="#pywt.wavelist" title="pywt.wavelist"><code class="xref py py-func docutils literal"><span class="pre">wavelist()</span></code></a> function returns a list of names of the built-in
wavelets.</p>
<p>If the <em>family</em> name is <code class="docutils literal"><span class="pre">None</span></code> then names of all the built-in wavelets
are returned. Otherwise the function returns names of wavelets that belong
to the given family.</p>
<p><strong>Example:</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">pywt</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">pywt</span><span class="o">.</span><span class="n">wavelist</span><span class="p">(</span><span class="s">&#39;coif&#39;</span><span class="p">)</span>
<span class="go">[&#39;coif1&#39;, &#39;coif2&#39;, &#39;coif3&#39;, &#39;coif4&#39;, &#39;coif5&#39;]</span>
</pre></div>
</div>
<p>Custom user wavelets are also supported through the <a class="reference internal" href="#pywt.Wavelet" title="pywt.Wavelet"><code class="xref py py-class docutils literal"><span class="pre">Wavelet</span></code></a> object
constructor as described below.</p>
</dd></dl>

</div>
<div class="section" id="wavelet-object">
<h2><code class="docutils literal"><span class="pre">Wavelet</span></code> object<a class="headerlink" href="#wavelet-object" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="pywt.Wavelet">
<em class="property">class </em><code class="descclassname">pywt.</code><code class="descname">Wavelet</code><span class="sig-paren">(</span><em>name</em><span class="optional">[</span>, <em>filter_bank=None</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#pywt.Wavelet" title="Permalink to this definition"></a></dt>
<dd><p>Describes properties of a wavelet identified by the specified wavelet <em>name</em>.
In order to use a built-in wavelet the <em>name</em> parameter must be a valid
wavelet name from the <a class="reference internal" href="#pywt.wavelist" title="pywt.wavelist"><code class="xref py py-func docutils literal"><span class="pre">pywt.wavelist()</span></code></a> list.</p>
<p>Custom Wavelet objects can be created by passing a user-defined filters set
with the <em>filter_bank</em> parameter.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> &#8211; Wavelet name</li>
<li><strong>filter_bank</strong> &#8211; Use a user supplied filter bank instead of a built-in <a class="reference internal" href="#pywt.Wavelet" title="pywt.Wavelet"><code class="xref py py-class docutils literal"><span class="pre">Wavelet</span></code></a>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>The filter bank object can be a list of four filters coefficients or an object
with <a class="reference internal" href="#pywt.Wavelet.filter_bank" title="pywt.Wavelet.filter_bank"><code class="xref py py-attr docutils literal"><span class="pre">filter_bank</span></code></a> attribute, which returns a list of such
filters in the following order:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="n">dec_lo</span><span class="p">,</span> <span class="n">dec_hi</span><span class="p">,</span> <span class="n">rec_lo</span><span class="p">,</span> <span class="n">rec_hi</span><span class="p">]</span>
</pre></div>
</div>
<p>Wavelet objects can also be used as a base filter banks. See section on
<a class="reference internal" href="#custom-wavelets"><span>using custom wavelets</span></a> for more information.</p>
<p><strong>Example:</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">pywt</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">wavelet</span> <span class="o">=</span> <span class="n">pywt</span><span class="o">.</span><span class="n">Wavelet</span><span class="p">(</span><span class="s">&#39;db1&#39;</span><span class="p">)</span>
</pre></div>
</div>
<dl class="attribute">
<dt id="pywt.Wavelet.name">
<code class="descname">name</code><a class="headerlink" href="#pywt.Wavelet.name" title="Permalink to this definition"></a></dt>
<dd><p>Wavelet name.</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.short_name">
<code class="descname">short_name</code><a class="headerlink" href="#pywt.Wavelet.short_name" title="Permalink to this definition"></a></dt>
<dd><p>Short wavelet name.</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.dec_lo">
<code class="descname">dec_lo</code><a class="headerlink" href="#pywt.Wavelet.dec_lo" title="Permalink to this definition"></a></dt>
<dd><p>Decomposition filter values.</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.dec_hi">
<code class="descname">dec_hi</code><a class="headerlink" href="#pywt.Wavelet.dec_hi" title="Permalink to this definition"></a></dt>
<dd><p>Decomposition filter values.</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.rec_lo">
<code class="descname">rec_lo</code><a class="headerlink" href="#pywt.Wavelet.rec_lo" title="Permalink to this definition"></a></dt>
<dd><p>Reconstruction filter values.</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.rec_hi">
<code class="descname">rec_hi</code><a class="headerlink" href="#pywt.Wavelet.rec_hi" title="Permalink to this definition"></a></dt>
<dd><p>Reconstruction filter values.</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.dec_len">
<code class="descname">dec_len</code><a class="headerlink" href="#pywt.Wavelet.dec_len" title="Permalink to this definition"></a></dt>
<dd><p>Decomposition filter length.</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.rec_len">
<code class="descname">rec_len</code><a class="headerlink" href="#pywt.Wavelet.rec_len" title="Permalink to this definition"></a></dt>
<dd><p>Reconstruction filter length.</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.filter_bank">
<code class="descname">filter_bank</code><a class="headerlink" href="#pywt.Wavelet.filter_bank" title="Permalink to this definition"></a></dt>
<dd><p>Returns filters list for the current wavelet in the following order:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="n">dec_lo</span><span class="p">,</span> <span class="n">dec_hi</span><span class="p">,</span> <span class="n">rec_lo</span><span class="p">,</span> <span class="n">rec_hi</span><span class="p">]</span>
</pre></div>
</div>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.inverse_filter_bank">
<code class="descname">inverse_filter_bank</code><a class="headerlink" href="#pywt.Wavelet.inverse_filter_bank" title="Permalink to this definition"></a></dt>
<dd><p>Returns list of reverse wavelet filters coefficients. The mapping from the
<cite>filter_coeffs</cite> list is as follows:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="n">rec_lo</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">rec_hi</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">dec_lo</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">dec_hi</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">]]</span>
</pre></div>
</div>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.short_family_name">
<code class="descname">short_family_name</code><a class="headerlink" href="#pywt.Wavelet.short_family_name" title="Permalink to this definition"></a></dt>
<dd><p>Wavelet short family name</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.family_name">
<code class="descname">family_name</code><a class="headerlink" href="#pywt.Wavelet.family_name" title="Permalink to this definition"></a></dt>
<dd><p>Wavelet family name</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.orthogonal">
<code class="descname">orthogonal</code><a class="headerlink" href="#pywt.Wavelet.orthogonal" title="Permalink to this definition"></a></dt>
<dd><p>Set if wavelet is orthogonal</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.biorthogonal">
<code class="descname">biorthogonal</code><a class="headerlink" href="#pywt.Wavelet.biorthogonal" title="Permalink to this definition"></a></dt>
<dd><p>Set if wavelet is biorthogonal</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.symmetry">
<code class="descname">symmetry</code><a class="headerlink" href="#pywt.Wavelet.symmetry" title="Permalink to this definition"></a></dt>
<dd><p><code class="docutils literal"><span class="pre">asymmetric</span></code>, <code class="docutils literal"><span class="pre">near</span> <span class="pre">symmetric</span></code>, <code class="docutils literal"><span class="pre">symmetric</span></code></p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.vanishing_moments_psi">
<code class="descname">vanishing_moments_psi</code><a class="headerlink" href="#pywt.Wavelet.vanishing_moments_psi" title="Permalink to this definition"></a></dt>
<dd><p>Number of vanishing moments for the wavelet function</p>
</dd></dl>

<dl class="attribute">
<dt id="pywt.Wavelet.vanishing_moments_phi">
<code class="descname">vanishing_moments_phi</code><a class="headerlink" href="#pywt.Wavelet.vanishing_moments_phi" title="Permalink to this definition"></a></dt>
<dd><p>Number of vanishing moments for the scaling function</p>
</dd></dl>

<p><strong>Example:</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">format_array</span><span class="p">(</span><span class="n">arr</span><span class="p">):</span>
<span class="gp">... </span>    <span class="k">return</span> <span class="s">&quot;[</span><span class="si">%s</span><span class="s">]&quot;</span> <span class="o">%</span> <span class="s">&quot;, &quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="s">&quot;</span><span class="si">%.14f</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">arr</span><span class="p">])</span>

<span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">pywt</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">wavelet</span> <span class="o">=</span> <span class="n">pywt</span><span class="o">.</span><span class="n">Wavelet</span><span class="p">(</span><span class="s">&#39;db1&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">wavelet</span>
<span class="go">Wavelet db1</span>
<span class="go">  Family name:    Daubechies</span>
<span class="go">  Short name:     db</span>
<span class="go">  Filters length: 2</span>
<span class="go">  Orthogonal:     True</span>
<span class="go">  Biorthogonal:   True</span>
<span class="go">  Symmetry:       asymmetric</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">format_array</span><span class="p">(</span><span class="n">wavelet</span><span class="o">.</span><span class="n">dec_lo</span><span class="p">),</span> <span class="n">format_array</span><span class="p">(</span><span class="n">wavelet</span><span class="o">.</span><span class="n">dec_hi</span><span class="p">)</span>
<span class="go">[0.70710678118655, 0.70710678118655] [-0.70710678118655, 0.70710678118655]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">format_array</span><span class="p">(</span><span class="n">wavelet</span><span class="o">.</span><span class="n">rec_lo</span><span class="p">),</span> <span class="n">format_array</span><span class="p">(</span><span class="n">wavelet</span><span class="o">.</span><span class="n">rec_hi</span><span class="p">)</span>
<span class="go">[0.70710678118655, 0.70710678118655] [0.70710678118655, -0.70710678118655]</span>
</pre></div>
</div>
</dd></dl>

<div class="section" id="approximating-wavelet-and-scaling-functions-wavelet-wavefun">
<h3>Approximating wavelet and scaling functions - <code class="docutils literal"><span class="pre">Wavelet.wavefun()</span></code><a class="headerlink" href="#approximating-wavelet-and-scaling-functions-wavelet-wavefun" title="Permalink to this headline"></a></h3>
<dl class="method">
<dt id="pywt.Wavelet.wavefun">
<code class="descclassname">Wavelet.</code><code class="descname">wavefun</code><span class="sig-paren">(</span><em>level</em><span class="sig-paren">)</span><a class="headerlink" href="#pywt.Wavelet.wavefun" title="Permalink to this definition"></a></dt>
<dd><div class="versionchanged">
<p><span class="versionmodified">Changed in version 0.2: </span>The time (space) localisation of approximation function points was
added.</p>
</div>
<p>The <a class="reference internal" href="#pywt.Wavelet.wavefun" title="pywt.Wavelet.wavefun"><code class="xref py py-meth docutils literal"><span class="pre">wavefun()</span></code></a> method can be used to calculate approximations of
scaling function (<em>phi</em>) and wavelet function (<em>psi</em>) at the given level of
refinement.</p>
<p>For <a class="reference internal" href="#pywt.Wavelet.orthogonal" title="pywt.Wavelet.orthogonal"><code class="xref py py-attr docutils literal"><span class="pre">orthogonal</span></code></a> wavelets returns approximations of
scaling function and wavelet function with corresponding x-grid coordinates:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="n">phi</span><span class="p">,</span> <span class="n">psi</span><span class="p">,</span> <span class="n">x</span><span class="p">]</span> <span class="o">=</span> <span class="n">wavelet</span><span class="o">.</span><span class="n">wavefun</span><span class="p">(</span><span class="n">level</span><span class="p">)</span>
</pre></div>
</div>
<p><strong>Example:</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">pywt</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">wavelet</span> <span class="o">=</span> <span class="n">pywt</span><span class="o">.</span><span class="n">Wavelet</span><span class="p">(</span><span class="s">&#39;db2&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">phi</span><span class="p">,</span> <span class="n">psi</span><span class="p">,</span> <span class="n">x</span> <span class="o">=</span> <span class="n">wavelet</span><span class="o">.</span><span class="n">wavefun</span><span class="p">(</span><span class="n">level</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
</pre></div>
</div>
<p>For other (<a class="reference internal" href="#pywt.Wavelet.biorthogonal" title="pywt.Wavelet.biorthogonal"><code class="xref py py-attr docutils literal"><span class="pre">biorthogonal</span></code></a> but not
<a class="reference internal" href="#pywt.Wavelet.orthogonal" title="pywt.Wavelet.orthogonal"><code class="xref py py-attr docutils literal"><span class="pre">orthogonal</span></code></a>) wavelets returns approximations of
scaling and wavelet function both for decomposition and reconstruction and
corresponding x-grid coordinates:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="n">phi_d</span><span class="p">,</span> <span class="n">psi_d</span><span class="p">,</span> <span class="n">phi_r</span><span class="p">,</span> <span class="n">psi_r</span><span class="p">,</span> <span class="n">x</span><span class="p">]</span> <span class="o">=</span> <span class="n">wavelet</span><span class="o">.</span><span class="n">wavefun</span><span class="p">(</span><span class="n">level</span><span class="p">)</span>
</pre></div>
</div>
<p><strong>Example:</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">pywt</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">wavelet</span> <span class="o">=</span> <span class="n">pywt</span><span class="o">.</span><span class="n">Wavelet</span><span class="p">(</span><span class="s">&#39;bior3.5&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">phi_d</span><span class="p">,</span> <span class="n">psi_d</span><span class="p">,</span> <span class="n">phi_r</span><span class="p">,</span> <span class="n">psi_r</span><span class="p">,</span> <span class="n">x</span> <span class="o">=</span> <span class="n">wavelet</span><span class="o">.</span><span class="n">wavefun</span><span class="p">(</span><span class="n">level</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">You can find live examples of <a class="reference internal" href="#pywt.Wavelet.wavefun" title="pywt.Wavelet.wavefun"><code class="xref py py-meth docutils literal"><span class="pre">wavefun()</span></code></a> usage and
images of all the built-in wavelets on the
<a class="reference external" href="http://wavelets.pybytes.com">Wavelet Properties Browser</a> page.</p>
</div>
</dd></dl>

</div>
</div>
<div class="section" id="custom-wavelets">
<span id="using-custom-wavelets"></span><span id="id1"></span><h2>Using custom wavelets<a class="headerlink" href="#custom-wavelets" title="Permalink to this headline"></a></h2>
<p>PyWavelets comes with a <a class="reference internal" href="#pywt.wavelist" title="pywt.wavelist"><code class="xref py py-func docutils literal"><span class="pre">long</span> <span class="pre">list</span></code></a> of the most popular
wavelets built-in and ready to use. If you need to use a specific wavelet which
is not included in the list it is very easy to do so. Just pass a list of four
filters or an object with a <a class="reference internal" href="#pywt.Wavelet.filter_bank" title="pywt.Wavelet.filter_bank"><code class="xref py py-attr docutils literal"><span class="pre">filter_bank</span></code></a> attribute as a
<em>filter_bank</em> argument to the <a class="reference internal" href="#pywt.Wavelet" title="pywt.Wavelet"><code class="xref py py-class docutils literal"><span class="pre">Wavelet</span></code></a> constructor.</p>
<div class="compound">
<p class="compound-first">The filters list, either in a form of a simple Python list or returned via
the <a class="reference internal" href="#pywt.Wavelet.filter_bank" title="pywt.Wavelet.filter_bank"><code class="xref py py-attr docutils literal"><span class="pre">filter_bank</span></code></a> attribute, must be in the following order:</p>
<blockquote class="compound-middle">
<div><ul class="simple">
<li>lowpass decomposition filter</li>
<li>highpass decomposition filter</li>
<li>lowpass reconstruction filter</li>
<li>highpass reconstruction filter</li>
</ul>
</div></blockquote>
<p class="compound-last">just as for the <a class="reference internal" href="#pywt.Wavelet.filter_bank" title="pywt.Wavelet.filter_bank"><code class="xref py py-attr docutils literal"><span class="pre">filter_bank</span></code></a> attribute of the
<a class="reference internal" href="#pywt.Wavelet" title="pywt.Wavelet"><code class="xref py py-class docutils literal"><span class="pre">Wavelet</span></code></a> class.</p>
</div>
<p>The Wavelet object created in this way is a standard <a class="reference internal" href="#pywt.Wavelet" title="pywt.Wavelet"><code class="xref py py-class docutils literal"><span class="pre">Wavelet</span></code></a> instance.</p>
<p>The following example illustrates the way of creating custom Wavelet objects
from plain Python lists of filter coefficients and a <em>filter bank-like</em> objects.</p>
<blockquote>
<div><p><strong>Example:</strong></p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">pywt</span><span class="o">,</span> <span class="nn">math</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dec_lo</span><span class="p">,</span> <span class="n">dec_hi</span><span class="p">,</span> <span class="n">rec_lo</span><span class="p">,</span> <span class="n">rec_hi</span> <span class="o">=</span> <span class="p">[</span><span class="n">c</span><span class="p">,</span> <span class="n">c</span><span class="p">],</span> <span class="p">[</span><span class="o">-</span><span class="n">c</span><span class="p">,</span> <span class="n">c</span><span class="p">],</span> <span class="p">[</span><span class="n">c</span><span class="p">,</span> <span class="n">c</span><span class="p">],</span> <span class="p">[</span><span class="n">c</span><span class="p">,</span> <span class="o">-</span><span class="n">c</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">filter_bank</span> <span class="o">=</span> <span class="p">[</span><span class="n">dec_lo</span><span class="p">,</span> <span class="n">dec_hi</span><span class="p">,</span> <span class="n">rec_lo</span><span class="p">,</span> <span class="n">rec_hi</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">myWavelet</span> <span class="o">=</span> <span class="n">pywt</span><span class="o">.</span><span class="n">Wavelet</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&quot;myHaarWavelet&quot;</span><span class="p">,</span> <span class="n">filter_bank</span><span class="o">=</span><span class="n">filter_bank</span><span class="p">)</span>
<span class="go">&gt;&gt;&gt;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">HaarFilterBank</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="gp">... </span>    <span class="nd">@property</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="nf">filter_bank</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="gp">... </span>        <span class="n">c</span> <span class="o">=</span> <span class="n">math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span>
<span class="gp">... </span>        <span class="n">dec_lo</span><span class="p">,</span> <span class="n">dec_hi</span><span class="p">,</span> <span class="n">rec_lo</span><span class="p">,</span> <span class="n">rec_hi</span> <span class="o">=</span> <span class="p">[</span><span class="n">c</span><span class="p">,</span> <span class="n">c</span><span class="p">],</span> <span class="p">[</span><span class="o">-</span><span class="n">c</span><span class="p">,</span> <span class="n">c</span><span class="p">],</span> <span class="p">[</span><span class="n">c</span><span class="p">,</span> <span class="n">c</span><span class="p">],</span> <span class="p">[</span><span class="n">c</span><span class="p">,</span> <span class="o">-</span><span class="n">c</span><span class="p">]</span>
<span class="gp">... </span>        <span class="k">return</span> <span class="p">[</span><span class="n">dec_lo</span><span class="p">,</span> <span class="n">dec_hi</span><span class="p">,</span> <span class="n">rec_lo</span><span class="p">,</span> <span class="n">rec_hi</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">filter_bank</span> <span class="o">=</span> <span class="n">HaarFilterBank</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">myOtherWavelet</span> <span class="o">=</span> <span class="n">pywt</span><span class="o">.</span><span class="n">Wavelet</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&quot;myHaarWavelet&quot;</span><span class="p">,</span> <span class="n">filter_bank</span><span class="o">=</span><span class="n">filter_bank</span><span class="p">)</span>
</pre></div>
</div>
</div></blockquote>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Wavelets</a><ul>
<li><a class="reference internal" href="#wavelet-families">Wavelet <code class="docutils literal"><span class="pre">families()</span></code></a></li>
<li><a class="reference internal" href="#built-in-wavelets-wavelist">Built-in wavelets - <code class="docutils literal"><span class="pre">wavelist()</span></code></a></li>
<li><a class="reference internal" href="#wavelet-object"><code class="docutils literal"><span class="pre">Wavelet</span></code> object</a><ul>
<li><a class="reference internal" href="#approximating-wavelet-and-scaling-functions-wavelet-wavefun">Approximating wavelet and scaling functions - <code class="docutils literal"><span class="pre">Wavelet.wavefun()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#custom-wavelets">Using custom wavelets</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="index.html"
                        title="previous chapter">API Reference</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="signal-extension-modes.html"
                        title="next chapter">Signal extension modes</a></p><div>
<h3>Python Development</h3>
<p><a href="http://en.ig.ma/">Django web development for startups and businesses.</a></p>
<p><a href="http://en.ig.ma/">Quality Python development and scientific applications.</a></p>
<h3>Quick links</h3>
<ul>
<li><a href="https://github.com/nigma/pywt"><img src="../_static/github.png" height="16" width="16" alt="" /> Fork on Github</a></li>
<li><a href="http://groups.google.com/group/pywavelets"><img src="../_static/comments.png" height="16" width="16" alt="" /> Discussion Group</a></li>
<li><a href="http://wavelets.pybytes.com/"><img src="../_static/wave.png" height="16" width="16" alt="" /> Explore Wavelets</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>


<div id="edit-instructions">
    <h3>Edit this document</h3>
    <p>
        <a href="#" id="toggle-edit-info">
        <img src="../_static/page_edit.png" height="16" width="16" alt="" />
        The source code of this file is hosted on GitHub. Everyone can
        update and fix errors in this document with few clicks -
        no downloads needed.
        </a>
    </p>
    <ol id="edit-info" style="display: none;">
        <li>
            Go to
            <i><a href="https://github.com/nigma/pywt/blob/develop/doc/source/ref/wavelets.rst" target="_blank">
                Wavelets
            </a></i> on GitHub.
        </li>
        <li>
            Press <b>Edit this file</b> button.
        </li>
        <li>
            Edit file contents using GitHub's text editor in your web browser
        </li>
        <li>
            Fill in the <b>Commit message</b> text box at the end of the page
            telling <i>why</i> you did the changes.
            Press <b>Propose file change</b> button next to it when done.
        </li>
        <li>
            On <i>Send a pull request</i> page you don't need to fill in text
            anymore. Just press <b>Send pull request</b> button.
        </li>
        <li>
            Your changes are now queued for review under project's
            <a href="https://github.com/nigma/pywt/pulls" target="_blank">Pull requests</a> tab
            on Github.
        </li>
    </ol>
</div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="signal-extension-modes.html" title="Signal extension modes"
             >next</a> |</li>
        <li class="right" >
          <a href="index.html" title="API Reference"
             >previous</a> |</li>
    <li><a href="../index.html">Home &raquo;</a></li>
          <li class="nav-item nav-item-1"><a href="../contents.html" >PyWavelets</a> &raquo;</li>
          <li class="nav-item nav-item-2"><a href="index.html" >API Reference</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &copy; Copyright 2006-2015, <a href="https://groups.google.com/forum/#!forum/pywavelets">The PyWavelets Developers</a>.
      Last updated on November 04, 2015.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.
    </div>
  </body>
</html>