Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Conflicts:
	.travis.yml
  • Loading branch information
nigma committed Aug 30, 2012
2 parents 04782c7 + 0af4b4e commit 6780566
Show file tree
Hide file tree
Showing 104 changed files with 1,797 additions and 7,881 deletions.
36 changes: 36 additions & 0 deletions .gitignore
@@ -0,0 +1,36 @@
*.py[co]
*.pyd

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

# Translations
*.mo

# Editors
.idea

# Project working files
_pywt.[ch]
c_wt.pxd
convolution.[ch]
wavelets.[ch]
wavelets_coeffs.h
wt.[ch]
9 changes: 1 addition & 8 deletions .travis.yml
Expand Up @@ -4,9 +4,6 @@ python:
- 2.6
- 2.7

env:
- CFLAGS=-O0

branches:
only:
- develop
Expand All @@ -17,9 +14,5 @@ before_install:
install:
- pip install .

script:
script:
- python setup.py test

matrix:
allow_failures:
- python: 2.6
6 changes: 6 additions & 0 deletions CHANGES.txt
@@ -1,5 +1,11 @@
Changelog

0.2.2
maintenance release:
- resolved setup and build issues
- support for compilation using MSVC compiler
- updated documentation
- moved main repository to GitHub (https://github.com/nigma/pywt)

0.2.0

Expand Down
32 changes: 10 additions & 22 deletions MANIFEST.in
@@ -1,26 +1,14 @@
include setup.py setupegg.py setup.cfg
include README.txt CHANGES.txt COPYING.txt THANKS.txt
include setup.py setup.cfg
include README.rst CHANGES.txt COPYING.txt THANKS.txt
include MANIFEST.in

recursive-include doc *.rst *.css *.html *txt *.js *.png *.ico *.bat
recursive-include doc/source *
recursive-include doc/build/html *
include doc/Makefile
graft demo
graft doc
graft src
graft tests
graft util

exclude doc/build/html/.doctrees/*
exclude doc/0.1.6/html/demo/*
exclude doc/0.1.6/html/img/*
prune build
prune doc/build

include ez_setup/*

include demo/*.py
include demo/data/*
recursive-include util *.py *.conf *.bat *.sh

recursive-include pywt *.py
recursive-include src *.c *.h *.pxi *.pxd *.pyx *.template
exclude src/_pywt.c
exclude src/_pywt.h
exclude src/_pywt.pxi

recursive-include tests *.py *.txt
global-exclude *.py[cod] *.egg *.egg-info
112 changes: 87 additions & 25 deletions README.rst
@@ -1,57 +1,119 @@
PyWavelets Intro
----------------
PyWavelets - Discrete Wavelet Transform in Python
=================================================

PyWavelets is a Python wavelet transforms module that can do:
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
* Computing Approximations of wavelet and scaling functions
* Over seventy built-in wavelet filters and support for custom wavelets
* 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

Download
--------

The most recent *development* version can be found in Git and Hg repositories at:
Requirements
------------

* Github - https://github.com/nigma/pywt
* Bitbucket - https://bitbucket.org/nigma/pywt
PyWavelets is a package for the Python programming language. It requires:

Latest release (not always up-to-date), including source and binary package for Windows,
is available for download from the Python Package Index at http://pypi.python.org/pypi/PyWavelets.
- Python_ 2.6 or 2.7
- numpy_ numeric array module

Download
--------

Note: The old SVN repository at http://wavelets.scipy.org/svn/multiresolution/pywt/trunk is
not updated anymore and you should switch to one of the new ones.
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 MinGW)
and a recent version of Cython (http://cython.org/) is required.
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``.

After completing the build environment, open the shell prompt, go to the
PyWavelets source code directory and type::
- To build and install from source, navigate to downloaded PyWavelets source
code directory and type ``python setup.py install``.

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 http://pypi.python.org/pypi/PyWavelets.
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 and links to more resources is available online
at http://www.pybytes.com/pywavelets/.
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
------------

Project wiki and trac system are hosted at http://wavelets.scipy.org/.
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`_.

For examples see `demo` directories in the source package.
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 distributed under MIT license terms (see COPYING).
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@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

20 changes: 10 additions & 10 deletions demo/benchmark.py
@@ -1,13 +1,14 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import time, gc, sys, csv, warnings
import pywt
import gc
import sys
import time

import numpy
import pylab

#sys.stderr = sys.stdout
#gc.set_debug(gc.DEBUG_LEAK)
import pywt

if sys.platform == 'win32':
clock = time.clock
Expand Down Expand Up @@ -40,31 +41,30 @@

data = numpy.ones((size,), dtype)

print ("%d/%d" % (j+1, len(sizes))).rjust(6), str(size).rjust(9),
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):
t1 = clock()
(a,d) = pywt.dwt(data, w, mode)
(a, d) = pywt.dwt(data, w, mode)
t1 = clock() - t1
min_t1 = min(t1, min_t1)

t2 = clock()
a0 = pywt.idwt(a, d, w, mode)
t2 = clock() - t2
min_t2 = min(t2, min_t2)

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')]):
for j, (times, name) in enumerate([(times_dwt, 'dwt'), (times_idwt, 'idwt')]):
pylab.figure(j)
pylab.title(name)

for i, n in enumerate(wavelet_names):
pylab.loglog(sizes, times[i], label=n)

Expand Down
7 changes: 5 additions & 2 deletions demo/dwt_multidim.py
@@ -1,9 +1,12 @@
#!/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
data = numpy.ones((4, 4, 4, 4)) # 4D array
result = pywt.dwtn(data, 'db1') # sixteen 4D coefficient arrays
pprint.pprint(result)

0 comments on commit 6780566

Please sign in to comment.