[Python-modules-commits] [pywavelets] 01/07: Imported Upstream version 0.3.0

Daniele Tricoli eriol-guest at moszumanska.debian.org
Mon Oct 12 02:27:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

eriol-guest pushed a commit to branch master
in repository pywavelets.

commit 34b87011e29e8813e694f2805d58d9d64c6849b5
Author: Daniele Tricoli <eriol at mornie.org>
Date:   Sun Oct 11 23:04:36 2015 +0200

    Imported Upstream version 0.3.0
---
 CHANGES.txt                                        |     5 +
 COPYING.txt                                        |     1 +
 MANIFEST.in                                        |    25 +-
 PKG-INFO                                           |    72 +-
 PyWavelets.egg-info/PKG-INFO                       |    32 -
 PyWavelets.egg-info/SOURCES.txt                    |   118 -
 PyWavelets.egg-info/dependency_links.txt           |     1 -
 PyWavelets.egg-info/not-zip-safe                   |     1 -
 PyWavelets.egg-info/top_level.txt                  |     1 -
 doc/source/index.rst => README                     |    64 +-
 README.rst                                         |   119 -
 cythonize.dat                                      |     1 +
 demo/{dwt_decompose.c => _dwt_decompose.c}         |     5 +
 demo/benchmark.py                                  |    39 +-
 demo/data/ecg.npy                                  |   Bin 0 -> 4176 bytes
 demo/dwt2_dwtn_image.py                            |    57 +
 demo/dwt_multidim.py                               |    12 -
 demo/dwt_signal_decomposition.py                   |    58 +-
 demo/dwt_swt_show_coeffs.py                        |   101 +-
 demo/image_blender.py                              |    12 +-
 demo/plot_wavelets.py                              |   102 +-
 demo/sample_data.py                                |   212 -
 demo/swt2.py                                       |    28 +-
 demo/user_filter_banks.py                          |    50 -
 demo/wavedec.py                                    |    30 -
 demo/waveinfo.py                                   |    47 +-
 demo/wp_2d.py                                      |    53 +-
 demo/wp_scalogram.py                               |    62 +-
 demo/wp_tree.py                                    |    17 -
 demo/wp_visualize_coeffs_distribution.py           |    39 +-
 doc/release/0.3.0-notes.rst                        |   135 +
 doc/source/_templates/page.html                    |     2 +-
 doc/source/_templates/quicklinks.html              |     3 +-
 doc/source/conf.py                                 |    21 +-
 doc/source/contents.rst                            |     1 +
 doc/source/dev/testing.rst                         |    25 +-
 doc/source/index.rst                               |    64 +-
 doc/source/regression/modes.rst                    |    17 -
 doc/source/release.0.3.0.rst                       |     1 +
 doc/source/releasenotes.rst                        |     7 +
 doc/source/resources.rst                           |     4 +-
 pywt/__init__.py                                   |    28 +
 pywt/functions.py                                  |   243 +
 pywt/multidim.py                                   |   423 +
 pywt/multilevel.py                                 |   222 +
 pywt/setup.py                                      |    28 +
 pywt/src/_pywt.c                                   | 45330 +++++++++++++++++++
 {src => pywt/src}/_pywt.h                          |    16 +-
 pywt/src/_pywt.pyx                                 |  1273 +
 {src => pywt/src}/c_wt.pxd                         |    67 +-
 {src => pywt/src}/common.c                         |     8 +-
 pywt/src/common.h                                  |    92 +
 {src => pywt/src}/convolution.c                    |   941 +-
 .../src/convolution.c.src                          |   585 +-
 pywt/src/convolution.h                             |   163 +
 pywt/src/convolution.h.src                         |    84 +
 {src => pywt/src}/wavelets.c                       |   456 +-
 pywt/src/wavelets.c.src                            |   463 +
 pywt/src/wavelets.h                                |    81 +
 {src => pywt/src}/wavelets_coeffs.h                |    47 +-
 .../src/wavelets_coeffs.h.src                      |   153 +-
 {src => pywt/src}/wavelets_list.pxi                |     0
 pywt/src/wt.c                                      |   449 +
 pywt/src/wt.c.src                                  |   225 +
 pywt/src/wt.h                                      |   113 +
 pywt/src/wt.h.src                                  |    64 +
 pywt/tests/test__pywt.py                           |    59 +
 pywt/tests/test_doc.py                             |    20 +
 pywt/tests/test_dwt_idwt.py                        |    87 +
 pywt/tests/test_functions.py                       |    53 +
 pywt/tests/test_matlab_compatibility.py            |    70 +
 pywt/tests/test_modes.py                           |    69 +
 pywt/tests/test_multidim.py                        |   130 +
 pywt/tests/test_multilevel.py                      |    60 +
 pywt/tests/test_perfect_reconstruction.py          |    61 +
 pywt/tests/test_thresholding.py                    |    53 +
 pywt/tests/test_wavelet.py                         |   156 +
 pywt/tests/test_wp.py                              |   147 +
 pywt/tests/test_wp2d.py                            |   149 +
 pywt/thresholding.py                               |   111 +
 pywt/version.py                                    |    10 +
 {src/pywt => pywt}/wavelet_packets.py              |   270 +-
 runtests.py                                        |   262 +
 setup.cfg                                          |    10 -
 setup.py                                           |   278 +-
 src/_pywt.c                                        | 16794 -------
 src/_pywt.pxi                                      |     4 -
 src/_pywt.pyx                                      |   933 -
 src/array_interface.h                              |   112 -
 src/arraytools.pxi                                 |   128 -
 src/c_array_interface.pxd                          |    74 -
 src/c_math.pxd                                     |     7 -
 src/c_python.pxd                                   |    92 -
 src/c_string.pxd                                   |     8 -
 src/c_wt.template.pxd                              |    99 -
 src/common.h                                       |   106 -
 src/convolution.h                                  |    61 -
 src/convolution.template.h                         |    71 -
 src/pywt/__init__.py                               |    28 -
 src/pywt/functions.py                              |   161 -
 src/pywt/multidim.py                               |   307 -
 src/pywt/multilevel.py                             |   141 -
 src/pywt/numerix.py                                |    69 -
 src/pywt/thresholding.py                           |    50 -
 src/wavelets.h                                     |    86 -
 src/wavelets.template.c                            |   427 -
 src/wavelets.template.h                            |    86 -
 src/wt.c                                           |   374 -
 src/wt.h                                           |    94 -
 src/wt.template.c                                  |   195 -
 src/wt.template.h                                  |    62 -
 tests/__init__.py                                  |     0
 tests/test_doc.py                                  |    20 -
 tests/test_matlab_compatibility.py                 |    84 -
 tests/test_perfect_reconstruction.py               |    82 -
 tests/test_regression.py                           |     3 -
 tox.ini                                            |    39 +
 util/appveyor/install.ps1                          |   101 +
 util/appveyor/requirements.txt                     |    14 +
 util/appveyor/run_with_env.cmd                     |    47 +
 util/authors.py                                    |   192 +
 util/commands.py                                   |   234 -
 util/cythonize.py                                  |   188 +
 util/gh_lists.py                                   |   147 +
 util/templating.py                                 |   127 -
 util/templating_src.py                             |    40 +
 126 files changed, 53985 insertions(+), 23155 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 749c519..752fb08 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,10 @@
 Changelog
 
+0.3.0
+    A major refactoring, providing support for Python 3.x while maintaining
+    full backwards compatiblity.
+    Development has moved to https://github.com/PyWavelets/pywt
+
 0.2.2
     maintenance release:
       - resolved setup and build issues
diff --git a/COPYING.txt b/COPYING.txt
index 5d036da..2208f18 100644
--- a/COPYING.txt
+++ b/COPYING.txt
@@ -1,4 +1,5 @@
 Copyright (c) 2006-2012 Filip Wasilewski <http://en.ig.ma/>
+Copyright (c) 2012-2015 The PyWavelets Developers <https://github.com/PyWavelets/pywt>
 
 Permission is hereby granted, free of charge, to any person obtaining a copy of
 this software and associated documentation files (the "Software"), to deal in
diff --git a/MANIFEST.in b/MANIFEST.in
index 9aa1b93..7ed911c 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,14 +1,25 @@
-include setup.py setup.cfg
-include README.rst CHANGES.txt COPYING.txt THANKS.txt
+include setup.py runtests.py
+include README.rst
+include *.txt
 include MANIFEST.in
 
-graft demo
-graft doc
-graft src
-graft tests
-graft util
+# All source files
+recursive-include pywt *
+# All documentation
+recursive-include doc *
+recursive-include demo *
 
+# Cached Cython signatures
+include cythonize.dat
+
+# Add build and testing tools
+include tox.ini
+recursive-include util *
+
+# Exclude what we don't want to include
 prune build
 prune doc/build
+prune */__pycache__
 
 global-exclude *.py[cod] *.egg *.egg-info
+global-exclude *~ *.bak *.swp
diff --git a/PKG-INFO b/PKG-INFO
index d25c1ca..2a6fda3 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,32 +1,40 @@
-Metadata-Version: 1.0
-Name: PyWavelets
-Version: 0.2.2
-Summary: PyWavelets, wavelet transform module
-Home-page: http://www.pybytes.com/pywavelets/
-Author: Filip Wasilewski
-Author-email: en at ig.ma
-License: MIT
-Download-URL: http://pypi.python.org/pypi/PyWavelets/
-Description:     PyWavelets is a Python wavelet transforms module that includes:
-        
-            * 1D and 2D Forward and Inverse Discrete Wavelet Transform (DWT and IDWT)
-            * 1D and 2D Stationary Wavelet Transform (Undecimated Wavelet Transform)
-            * 1D and 2D Wavelet Packet decomposition and reconstruction
-            * Computing Approximations of wavelet and scaling functions
-            * Over seventy built-in wavelet filters and support for custom wavelets
-            * Single and double precision calculations
-            * Results compatibility with Matlab Wavelet Toolbox (tm)
-            
-Keywords: wavelets,wavelet transform,DWT,SWT,scientific,NumPy
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: Intended Audience :: Education
-Classifier: Intended Audience :: Science/Research
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: C
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Metadata-Version: 1.1
+Name: PyWavelets
+Version: 0.3.0
+Summary: PyWavelets, wavelet transform module
+Home-page: https://github.com/PyWavelets/pywt
+Author: The PyWavelets Developers
+Author-email: http://groups.google.com/group/pywavelets
+License: MIT
+Download-URL: https://github.com/PyWavelets/pywt/releases
+Description:         PyWavelets is a Python wavelet transforms module that includes:
+        
+                * 1D and 2D Forward and Inverse Discrete Wavelet Transform (DWT and IDWT)
+                * 1D and 2D Stationary Wavelet Transform (Undecimated Wavelet Transform)
+                * 1D and 2D Wavelet Packet decomposition and reconstruction
+                * Computing Approximations of wavelet and scaling functions
+                * Over seventy built-in wavelet filters and support for custom wavelets
+                * Single and double precision calculations
+                * Results compatibility with Matlab Wavelet Toolbox (tm)
+                
+Keywords: wavelets,wavelet transform,DWT,SWT,scientific
+Platform: Windows
+Platform: Linux
+Platform: Solaris
+Platform: Mac OS-X
+Platform: Unix
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: Education
+Classifier: Intended Audience :: Science/Research
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: C
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/PyWavelets.egg-info/PKG-INFO b/PyWavelets.egg-info/PKG-INFO
deleted file mode 100644
index d25c1ca..0000000
--- a/PyWavelets.egg-info/PKG-INFO
+++ /dev/null
@@ -1,32 +0,0 @@
-Metadata-Version: 1.0
-Name: PyWavelets
-Version: 0.2.2
-Summary: PyWavelets, wavelet transform module
-Home-page: http://www.pybytes.com/pywavelets/
-Author: Filip Wasilewski
-Author-email: en at ig.ma
-License: MIT
-Download-URL: http://pypi.python.org/pypi/PyWavelets/
-Description:     PyWavelets is a Python wavelet transforms module that includes:
-        
-            * 1D and 2D Forward and Inverse Discrete Wavelet Transform (DWT and IDWT)
-            * 1D and 2D Stationary Wavelet Transform (Undecimated Wavelet Transform)
-            * 1D and 2D Wavelet Packet decomposition and reconstruction
-            * Computing Approximations of wavelet and scaling functions
-            * Over seventy built-in wavelet filters and support for custom wavelets
-            * Single and double precision calculations
-            * Results compatibility with Matlab Wavelet Toolbox (tm)
-            
-Keywords: wavelets,wavelet transform,DWT,SWT,scientific,NumPy
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: Intended Audience :: Education
-Classifier: Intended Audience :: Science/Research
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: C
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/PyWavelets.egg-info/SOURCES.txt b/PyWavelets.egg-info/SOURCES.txt
deleted file mode 100644
index fe79719..0000000
--- a/PyWavelets.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,118 +0,0 @@
-CHANGES.txt
-COPYING.txt
-MANIFEST.in
-README.rst
-THANKS.txt
-setup.cfg
-setup.py
-PyWavelets.egg-info/PKG-INFO
-PyWavelets.egg-info/SOURCES.txt
-PyWavelets.egg-info/dependency_links.txt
-PyWavelets.egg-info/not-zip-safe
-PyWavelets.egg-info/top_level.txt
-demo/benchmark.py
-demo/dwt_decompose.c
-demo/dwt_multidim.py
-demo/dwt_signal_decomposition.py
-demo/dwt_swt_show_coeffs.py
-demo/image_blender.py
-demo/plot_wavelets.py
-demo/sample_data.py
-demo/swt2.py
-demo/user_filter_banks.py
-demo/wavedec.py
-demo/waveinfo.py
-demo/wp_2d.py
-demo/wp_scalogram.py
-demo/wp_tree.py
-demo/wp_visualize_coeffs_distribution.py
-demo/data/aero.png
-doc/Makefile
-doc/doc2html.bat
-doc/make.bat
-doc/source/COPYING.txt
-doc/source/conf.py
-doc/source/contents.rst
-doc/source/index.rst
-doc/source/overview.rst
-doc/source/resources.rst
-doc/source/substitutions.rst
-doc/source/_static/comments.png
-doc/source/_static/favicon.ico
-doc/source/_static/github.png
-doc/source/_static/page_edit.png
-doc/source/_static/twitter.png
-doc/source/_static/wave.png
-doc/source/_templates/editdocument.html
-doc/source/_templates/page.html
-doc/source/_templates/quicklinks.html
-doc/source/dev/building_extension.rst
-doc/source/dev/index.rst
-doc/source/dev/installing_build_dependencies.rst
-doc/source/dev/preparing_linux_build_environment.rst
-doc/source/dev/preparing_windows_build_environment.rst
-doc/source/dev/testing.rst
-doc/source/ref/2d-dwt-and-idwt.rst
-doc/source/ref/dwt-discrete-wavelet-transform.rst
-doc/source/ref/idwt-inverse-discrete-wavelet-transform.rst
-doc/source/ref/index.rst
-doc/source/ref/other-functions.rst
-doc/source/ref/signal-extension-modes.rst
-doc/source/ref/swt-stationary-wavelet-transform.rst
-doc/source/ref/thresholding-functions.rst
-doc/source/ref/wavelet-packets.rst
-doc/source/ref/wavelets.rst
-doc/source/regression/dwt-idwt.rst
-doc/source/regression/gotchas.rst
-doc/source/regression/index.rst
-doc/source/regression/modes.rst
-doc/source/regression/multilevel.rst
-doc/source/regression/wavelet.rst
-doc/source/regression/wp.rst
-doc/source/regression/wp2d.rst
-src/_pywt.c
-src/_pywt.h
-src/_pywt.pxi
-src/_pywt.pyx
-src/array_interface.h
-src/arraytools.pxi
-src/c_array_interface.pxd
-src/c_math.pxd
-src/c_python.pxd
-src/c_string.pxd
-src/c_wt.pxd
-src/c_wt.template.pxd
-src/common.c
-src/common.h
-src/convolution.c
-src/convolution.h
-src/convolution.template.c
-src/convolution.template.h
-src/wavelets.c
-src/wavelets.h
-src/wavelets.template.c
-src/wavelets.template.h
-src/wavelets_coeffs.h
-src/wavelets_coeffs.template.h
-src/wavelets_list.pxi
-src/wt.c
-src/wt.h
-src/wt.template.c
-src/wt.template.h
-src/pywt/__init__.py
-src/pywt/functions.py
-src/pywt/multidim.py
-src/pywt/multilevel.py
-src/pywt/numerix.py
-src/pywt/thresholding.py
-src/pywt/wavelet_packets.py
-tests/__init__.py
-tests/test_doc.py
-tests/test_matlab_compatibility.py
-tests/test_perfect_reconstruction.py
-tests/test_regression.py
-util/__init__.py
-util/commands.py
-util/setenv_build32.bat
-util/setenv_build64.bat
-util/templating.py
\ No newline at end of file
diff --git a/PyWavelets.egg-info/dependency_links.txt b/PyWavelets.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/PyWavelets.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/PyWavelets.egg-info/not-zip-safe b/PyWavelets.egg-info/not-zip-safe
deleted file mode 100644
index d3f5a12..0000000
--- a/PyWavelets.egg-info/not-zip-safe
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/PyWavelets.egg-info/top_level.txt b/PyWavelets.egg-info/top_level.txt
deleted file mode 100644
index ce97754..0000000
--- a/PyWavelets.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-pywt
diff --git a/doc/source/index.rst b/README
similarity index 65%
copy from doc/source/index.rst
copy to README
index 049aa17..4464a2b 100644
--- a/doc/source/index.rst
+++ b/README
@@ -20,31 +20,31 @@ Main features
 
 The main features of PyWavelets are:
 
-  * 1D and 2D Forward and Inverse Discrete Wavelet Transform (DWT and IDWT)
+  * 1D, 2D and nD Forward and Inverse Discrete Wavelet Transform (DWT and IDWT)
   * 1D and 2D Stationary Wavelet Transform (Undecimated Wavelet Transform)
   * 1D and 2D Wavelet Packet decomposition and reconstruction
   * Approximating wavelet and scaling functions
   * Over seventy `built-in wavelet filters`_
     and custom wavelets supported
   * Single and double precision calculations
-  * Results compatibility with Matlab Wavelet Toolbox |tm|
+  * Results compatible with Matlab Wavelet Toolbox (TM)
 
 Requirements
 ------------
 
 PyWavelets is a package for the Python programming language. It requires:
 
- - Python_ 2.6 or 2.7
- - numpy_ numeric array module
+ - Python_ 2.6, 2.7 or >=3.3
+ - Numpy_ >= 1.6.2
 
 Download
 --------
 
 The most recent *development* version can be found on GitHub at
-https://github.com/nigma/pywt.
+https://github.com/PyWavelets/pywt.
 
 Latest release, including source and binary package for Windows, is available
-for download from the `Python Package Index`_.
+for download from the `Python Package Index`_ or on the `Releases Page`_.
 
 Install
 -------
@@ -52,15 +52,11 @@ Install
 In order to build PyWavelets from source, a working C compiler (GCC or MSVC)
 and a recent version of Cython_ is required.
 
- - To install PyWavelets open shell prompt and type ``pip install PyWavelets``
-   or ``easy_install PyWavelets``.
+ - Install PyWavelets with ``pip install PyWavelets``.
 
  - To build and install from source, navigate to downloaded PyWavelets source
    code directory and type ``python setup.py install``.
 
- - The `in-development version`_ of PyWavelets can be installed with
-   ``pip install PyWavelets==dev`` or ``easy_install PyWavelets==dev``.
-
 Prebuilt Windows binaries and source code packages are also
 available from `Python Package Index`_.
 
@@ -75,35 +71,37 @@ Documentation
 -------------
 
 Documentation with detailed examples and links to more resources is available
-online at http://www.pybytes.com/pywavelets/ and
-http://pywavelets.readthedocs.org.
+online at http://pywavelets.readthedocs.org.
 
 For more usage examples see the `demo`_ directory in the source package.
 
-Contributing
-------------
+State of development & Contributing
+-----------------------------------
 
 PyWavelets started in 2006 as an academic project for a master thesis
 on `Analysis and Classification of Medical Signals using Wavelet Transforms`
-and is maintained by its `original developer`_.
+and was maintained until 2012 by its `original developer`_.  In 2013
+maintenance was taken over in a `new repo <https://github.com/PyWavelets/pywt>`_)
+by a larger development team - a move supported by the original developer.
+The repo move doesn't mean that this is a fork - the package continues to be
+developed under the name "PyWavelets", and released on PyPi and Github (see
+`this issue <https://github.com/nigma/pywt/issues/13>`_ for the discussion
+where that was decided).
 
 All contributions including bug reports, bug fixes, new feature implementations
-and documentation improvements are welcome.
+and documentation improvements are welcome.  Moreover, developers with an
+interest in PyWavelets are very welcome to join the development team!
 
-Go and fork on `GitHub`_ today!
 
 Python 3
 --------
 
-Python 3 development branch is at https://github.com/nigma/pywt/tree/py-3.
-Check out the `changelog <https://github.com/nigma/pywt/commits/py-3>`_ for
-info. Currently the code and examples are ported to work on Python 2.7 and 3.2
-from the same codebase.
+Python 3.x is fully supported from release v0.3.0 on.
 
 Contact
 -------
 
-Use `GitHub Issues`_ or `PyWavelets discussions group`_ to post your
+Use `GitHub Issues`_ or the `PyWavelets discussions group`_ to post your
 comments or questions.
 
 License
@@ -111,16 +109,6 @@ License
 
 PyWavelets is a free Open Source software released under the MIT license.
 
-Commercial Support
-------------------
-
-For information on commercial support and development email me at en at ig.ma.
-
-
-.. |tm| unicode:: U+2122 .. trademark sign
-    :ltrim:
-
-
 Contents
 --------
 
@@ -136,12 +124,12 @@ Contents
 
 .. _built-in wavelet filters: http://wavelets.pybytes.com/
 .. _Cython: http://cython.org/
-.. _demo: https://github.com/nigma/pywt/tree/master/demo
-.. _GitHub: https://github.com/nigma/pywt
-.. _GitHub Issues: https://github.com/nigma/pywt/issues
-.. _in-development version: https://github.com/nigma/pywt/tarball/develop#egg=PyWavelets-dev
-.. _numpy: http://numpy.scipy.org/
+.. _demo: https://github.com/PyWavelets/pywt/tree/master/demo
+.. _GitHub: https://github.com/PyWavelets/pywt
+.. _GitHub Issues: https://github.com/PyWavelets/pywt/issues
+.. _Numpy: http://www.numpy.org
 .. _original developer: http://en.ig.ma
 .. _Python: http://python.org/
 .. _Python Package Index: http://pypi.python.org/pypi/PyWavelets/
 .. _PyWavelets discussions group: http://groups.google.com/group/pywavelets
+.. _Releases Page: https://github.com/PyWavelets/pywt/releases
diff --git a/README.rst b/README.rst
deleted file mode 100644
index 7c37855..0000000
--- a/README.rst
+++ /dev/null
@@ -1,119 +0,0 @@
-PyWavelets - Discrete Wavelet Transform in Python
-=================================================
-
-PyWavelets is a free Open Source wavelet transform software for Python_
-programming language. It is written in Python, Cython and C for a mix of easy
-and powerful high-level interface and the best performance.
-
-PyWavelets is very easy to start with and use, and currently is capable of:
-
-  * 1D and 2D Forward and Inverse Discrete Wavelet Transform (DWT and IDWT)
-  * 1D and 2D Stationary Wavelet Transform (Undecimated Wavelet Transform)
-  * 1D and 2D Wavelet Packet decomposition and reconstruction
-  * Approximating wavelet and scaling functions
-  * Over seventy built-in wavelet filters and custom wavelets supported
-  * Single and double precision calculations
-  * Results compatibility with Matlab Wavelet Toolbox (tm)
-
-.. image::
-    https://secure.travis-ci.org/nigma/pywt.png?branch=develop
-    :alt: Build Status
-    :target: https://secure.travis-ci.org/nigma/pywt
-
-
-Requirements
-------------
-
-PyWavelets is a package for the Python programming language. It requires:
-
- - Python_ 2.6 or 2.7
- - numpy_ numeric array module
-
-Download
---------
-
-The most recent *development* version can be found on GitHub at
-https://github.com/nigma/pywt.
-
-Latest release, including source and binary package for Windows, is available
-for download from the `Python Package Index`_.
-
-Install
--------
-
-In order to build PyWavelets from source, a working C compiler (GCC or MSVC)
-and a recent version of Cython_ is required.
-
- - To install PyWavelets open shell prompt and type ``pip install PyWavelets``
-   or ``easy_install PyWavelets``.
-
- - To build and install from source, navigate to downloaded PyWavelets source
-   code directory and type ``python setup.py install``.
-
- - The `in-development version`_ of PyWavelets can be installed with
-   ``pip install PyWavelets==dev`` or ``easy_install PyWavelets==dev``.
-
-Prebuilt Windows binaries and source code packages are also
-available from `Python Package Index`_.
-
-Binary packages for several Linux distributors are maintained by Open Source
-community contributors. Query your Linux package manager tool
-for `python-wavelets`, `python-pywt` or similar package name.
-
-Documentation
--------------
-
-Documentation with detailed examples and links to more resources is available
-online at http://www.pybytes.com/pywavelets/ and
-http://pywavelets.readthedocs.org.
-
-For more usage examples see the `demo`_ directory in the source package.
-
-Contributing
-------------
-
-PyWavelets started in 2006 as an academic project for a master thesis
-on `Analysis and Classification of Medical Signals using Wavelet Transforms`
-and is maintained by its `original developer`_.
-
-All contributions including bug reports, bug fixes, new feature implementations
-and documentation improvements are welcome.
-
-Go and fork on `GitHub`_ today!
-
-Python 3
---------
-
-Python 3 development branch is at https://github.com/nigma/pywt/tree/py-3.
-Check out the `changelog <https://github.com/nigma/pywt/commits/py-3>`_ for
-info. Currently the code and examples are ported to work on Python 2.7 and 3.2
-from the same codebase.
-
-Contact
--------
-
-Use `GitHub Issues`_ or `PyWavelets discussions group`_ to post your
-comments or questions.
-
-License
--------
-
-PyWavelets is a free Open Source software released under the MIT license.
-
-Commercial Support
-------------------
-
-For information on commercial support and development email me at en at ig.ma.
-
-
-.. _Cython: http://cython.org/
-.. _demo: https://github.com/nigma/pywt/tree/master/demo
-.. _GitHub: https://github.com/nigma/pywt
-.. _GitHub Issues: https://github.com/nigma/pywt/issues
-.. _in-development version: https://github.com/nigma/pywt/tarball/develop#egg=PyWavelets-dev
-.. _numpy: http://numpy.scipy.org/
-.. _original developer: http://en.ig.ma
-.. _Python: http://python.org/
-.. _Python Package Index: http://pypi.python.org/pypi/PyWavelets/
-.. _PyWavelets discussions group: http://groups.google.com/group/pywavelets
-
diff --git a/cythonize.dat b/cythonize.dat
new file mode 100644
index 0000000..4035611
--- /dev/null
+++ b/cythonize.dat
@@ -0,0 +1 @@
+pywt/src/_pywt.pyx 33e1d11f905b68c14e38e93ad300686fc289ab2f 852f918fb0ede109a7bdd8a1d1637222bcc73f31
diff --git a/demo/dwt_decompose.c b/demo/_dwt_decompose.c
similarity index 88%
rename from demo/dwt_decompose.c
rename to demo/_dwt_decompose.c
index 491ecf1..e35502d 100644
--- a/demo/dwt_decompose.c
+++ b/demo/_dwt_decompose.c
@@ -1,3 +1,8 @@
+/*
+ * Note: this currently doesn't get installed.  There's also no way to query
+ * the location of wt.h.  Conclusion: there is no C API.
+ */
+
 #include <stdio.h>
 
 #include "wt.h"
diff --git a/demo/benchmark.py b/demo/benchmark.py
index 915aa82..37195af 100644
--- a/demo/benchmark.py
+++ b/demo/benchmark.py
@@ -5,11 +5,12 @@ import gc
 import sys
 import time
 
-import numpy
-import pylab
+import numpy as np
+import matplotlib.pyplot as plt
 
 import pywt
 
+
 if sys.platform == 'win32':
     clock = time.clock
 else:
@@ -25,7 +26,6 @@ wavelet_names = ['db1', 'db2', 'db3', 'db4', 'db5', 'db6', 'db7',
                  'db8', 'db9', 'db10', 'sym10', 'coif1', 'coif2',
                  'coif3', 'coif4', 'coif5']
 
-dtype = numpy.float64
 
 wavelets = [pywt.Wavelet(n) for n in wavelet_names]
 mode = pywt.MODES.zpd
@@ -33,18 +33,13 @@ mode = pywt.MODES.zpd
 times_dwt = [[] for i in range(len(wavelets))]
 times_idwt = [[] for i in range(len(wavelets))]
 
-repeat = 5
-
 for j, size in enumerate(sizes):
-    #if size > 500000:
-    #    warnings.warn("Warning, too big data size may cause page swapping.")
-
-    data = numpy.ones((size,), dtype)
-
-    print ("%d/%d" % (j + 1, len(sizes))).rjust(6), str(size).rjust(9),
+    data = np.ones((size,), dtype=np.float64)
+    print((("%d/%d" % (j + 1, len(sizes))).rjust(6), str(size).rjust(9)))
     for i, w in enumerate(wavelets):
         min_t1, min_t2 = 9999., 9999.
-        for _ in xrange(repeat):
+        for _ in range(5):
+            # Repeat timing 5 times to reduce run-to-run variation
             t1 = clock()
             (a, d) = pywt.dwt(data, w, mode)
             t1 = clock() - t1
@@ -57,19 +52,21 @@ for j, size in enumerate(sizes):
 
         times_dwt[i].append(min_t1)
         times_idwt[i].append(min_t2)
-        print '.',
-    print
+
     gc.collect()
 
+
 for j, (times, name) in enumerate([(times_dwt, 'dwt'), (times_idwt, 'idwt')]):
-    pylab.figure(j)
-    pylab.title(name)
+    fig = plt.figure(j)
+    ax = fig.add_subplot(111)
+    ax.set_title(name)
 
     for i, n in enumerate(wavelet_names):
-        pylab.loglog(sizes, times[i], label=n)
+        ax.loglog(sizes, times[i], label=n)
+
+    ax.legend(loc='best')
+    ax.set_xlabel('len(x)')
+    ax.set_ylabel('time [s]')
 
-    pylab.legend(loc='best')
-    pylab.xlabel('len(x)')
-    pylab.ylabel('time [s]')
 
-pylab.show()
+plt.show()
diff --git a/demo/data/ecg.npy b/demo/data/ecg.npy
new file mode 100644
index 0000000..119916b
Binary files /dev/null and b/demo/data/ecg.npy differ
diff --git a/demo/dwt2_dwtn_image.py b/demo/dwt2_dwtn_image.py
new file mode 100644
index 0000000..cd494e1
--- /dev/null
+++ b/demo/dwt2_dwtn_image.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import numpy as np
+import matplotlib.pyplot as plt
+from scipy import ndimage
+
+import pywt
+
+
+# Load image
+original = ndimage.imread('data/aero.png', mode='L')
+
+# Wavelet transform of image, and plot approximation and details
+titles = ['Approximation', ' Horizontal detail',
+          'Vertical detail', 'Diagonal detail']
+coeffs2 = pywt.dwt2(original, 'bior1.3')
+LL, (LH, HL, HH) = coeffs2
+fig = plt.figure()
+for i, a in enumerate([LL, LH, HL, HH]):
+    ax = fig.add_subplot(2, 2, i + 1)
+    ax.imshow(a, origin='image', interpolation="nearest", cmap=plt.cm.gray)
+    ax.set_title(titles[i], fontsize=12)
+
+fig.suptitle("dwt2 coefficients", fontsize=14)
+
+# Now reconstruct and plot the original image
+reconstructed = pywt.idwt2(coeffs2, 'bior1.3')
+fig = plt.figure()
+plt.imshow(reconstructed, interpolation="nearest", cmap=plt.cm.gray)
+
+# Check that reconstructed image is close to the original
+np.testing.assert_allclose(original, reconstructed, atol=1e-13, rtol=1e-13)
+
+
+# Now do the same with dwtn/idwtn, to show the difference in their signatures
+
+coeffsn = pywt.dwtn(original, 'bior1.3')
+fig = plt.figure()
+for i, key in enumerate(['aa', 'ad', 'da', 'dd']):
+    ax = fig.add_subplot(2, 2, i + 1)
+    ax.imshow(coeffsn[key], origin='image', interpolation="nearest",
+              cmap=plt.cm.gray)
+    ax.set_title(titles[i], fontsize=12)
+
+fig.suptitle("dwtn coefficients", fontsize=14)
+
+# Now reconstruct and plot the original image
+reconstructed = pywt.idwtn(coeffsn, 'bior1.3')
+fig = plt.figure()
+plt.imshow(reconstructed, interpolation="nearest", cmap=plt.cm.gray)
+
+# Check that reconstructed image is close to the original
+np.testing.assert_allclose(original, reconstructed, atol=1e-13, rtol=1e-13)
+
+
+plt.show()
diff --git a/demo/dwt_multidim.py b/demo/dwt_multidim.py
deleted file mode 100644
index 03e8607..0000000
--- a/demo/dwt_multidim.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import pprint
-
-import numpy
-
-import pywt
-
-data = numpy.ones((4, 4, 4, 4))  # 4D array
-result = pywt.dwtn(data, 'db1')  # sixteen 4D coefficient arrays
-pprint.pprint(result)
diff --git a/demo/dwt_signal_decomposition.py b/demo/dwt_signal_decomposition.py
index 5a75338..e9ec17e 100644
--- a/demo/dwt_signal_decomposition.py
+++ b/demo/dwt_signal_decomposition.py
@@ -1,26 +1,35 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-import pylab
+import os
+
+import numpy as np
+import matplotlib.pyplot as plt
 
 import pywt
 
-data1 = pylab.array(range(1, 400) + range(398, 600) + range(601, 1024))
-x = pylab.arange(612 - 80, 20, -0.5) / 250.
-data2 = pylab.sin(40 * pylab.log(x)) * pylab.sign((pylab.log(x)))
 
-from sample_data import ecg as data3
+ecg = np.load(os.path.join('data', 'ecg.npy'))
+
+data1 = np.concatenate((np.arange(1, 400),
+                        np.arange(398, 600),
+                        np.arange(601, 1024)))
+x = np.linspace(0.082, 2.128, num=1024)[::-1]
+data2 = np.sin(40 * np.log(x)) * np.sign((np.log(x)))
 
 mode = pywt.MODES.sp1
 
 
-def plot(data, w, title):
-    print title
+def plot_signal_decomp(data, w, title):
+    """Decompose and plot a signal S.
+
+    S = An + Dn + Dn-1 + ... + D1
+    """
     w = pywt.Wavelet(w)
     a = data
     ca = []
     cd = []
-    for i in xrange(5):
+    for i in range(5):
         (a, d) = pywt.dwt(a, w, mode)
         ca.append(a)
         cd.append(d)
@@ -36,30 +45,29 @@ def plot(data, w, title):
         coeff_list = [None, coeff] + [None] * i
         rec_d.append(pywt.waverec(coeff_list, w))
 
-    pylab.figure()
-    ax_main = pylab.subplot(len(rec_a) + 1, 1, 1)
-    pylab.title(title)
+    fig = plt.figure()
+    ax_main = fig.add_subplot(len(rec_a) + 1, 1, 1)
+    ax_main.set_title(title)
     ax_main.plot(data)
-    pylab.xlim(0, len(data) - 1)
+    ax_main.set_xlim(0, len(data) - 1)
 
     for i, y in enumerate(rec_a):
-        #print len(data), len(x), len(data) / (2**(i+1))
-        ax = pylab.subplot(len(rec_a) + 1, 2, 3 + i * 2)
+        ax = fig.add_subplot(len(rec_a) + 1, 2, 3 + i * 2)
         ax.plot(y, 'r')
-        pylab.xlim(0, len(y) - 1)
-        pylab.ylabel("A%d" % (i + 1))
+        ax.set_xlim(0, len(y) - 1)
+        ax.set_ylabel("A%d" % (i + 1))
 
     for i, y in enumerate(rec_d):
-        ax = pylab.subplot(len(rec_d) + 1, 2, 4 + i * 2)
+        ax = fig.add_subplot(len(rec_d) + 1, 2, 4 + i * 2)
         ax.plot(y, 'g')
-        pylab.xlim(0, len(y) - 1)
-        #pylab.ylim(min(0,1.4*min(x)), max(0,1.4*max(x)))
-        pylab.ylabel("D%d" % (i + 1))
+        ax.set_xlim(0, len(y) - 1)
+        ax.set_ylabel("D%d" % (i + 1))
+
... 80292 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pywavelets.git



More information about the Python-modules-commits mailing list