[SciPy-Dev] question of scope wavelet code

Ralf Gommers ralf.gommers at gmail.com
Mon May 11 02:08:27 EDT 2015


On Sun, May 10, 2015 at 11:48 PM, Sturla Molden <sturla.molden at gmail.com>
wrote:

> PyWavelets have a lot of design problems. For example this:
>
> https://github.com/rgommers/pywt/blob/master/pywt/src/wavelets_coeffs.h.src
>
> There is no reason this should be in C. It is easier to add new wavelets if
> the coefficients are in a Python file. ndarrays can be initialized with the
> coefficients on module import.
>
> If we get rid of all the unneccesary C in PyWavelets, I think we end up
> with a tiny bit of Cython (eg. in the dwt and idwt functions) and the rest
> can be Python. There is no reason to use C or Cython outside the
> computationally expensive routines, by PyWavelets does that everywhere.
>

Definitely, the original code is quite sub-optimal. I already got rid of
about half the C extensions and headers, and a homegrown templating
mechanism. Feel free to open an issue though and point out what needs
fixing in the current repo, that would help.

Cheers,
Ralf



>
> Sturla
>
>
>
> Ralf Gommers <ralf.gommers at gmail.com> wrote:
> > Hi all,
> >
> > As you may know, I forked PyWavelets a while ago and with the help of
> quite
> > a few people started bringing it up to the standards needed for inclusion
> > in scipy: <a
> > href="https://github.com/rgommers/pywt.">
> https://github.com/rgommers/pywt.</a> The last
> > year I haven't had too
> > much time for it, but I'd like to get back to it. That's also triggered
> by
> > several PRs and proposed enhancements - there's quite a bit of interest
> for
> > a fork that never actually had a release. This proposal
> > <a
> > href="https://github.com/rgommers/pywt/issues/58">
> https://github.com/rgommers/pywt/issues/58</a>)
> > to add contourlets triggered me
> > to bring up what the scope of a (discrete) wavelets module in scipy
> should
> > be.
> >
> > What's there now is still mostly what's listed in
> > <a
> > href="http://pywavelets.readthedocs.org/en/latest/.">
> http://pywavelets.readthedocs.org/en/latest/.</a>
> > A few additions are/were
> > no-brainers, like n-D inverse DWT and inverse SWT (stationary wavelet
> > transform). But beyond that I realize that a bit of care is needed,
> because
> > there's a huge array of variations on wavelets. Here's a quick list of
> what
> > I'm aware of, ordered from most to least important in my perspective:
> >
> > - curvelets (https://en.wikipedia.org/wiki/Curvelet)
> > - contourlets (http://en.wikipedia.org/wiki/Contourlet)
> > - shearlets (http://en.wikipedia.org/wiki/Shearlet <a
> > href="http://shearlab.org">http://shearlab.org</a> GPL)
> > - chirplets (http://en.wikipedia.org/wiki/Chirplet_transform
> > <a href="http://tfd.sourceforge.net/">http://tfd.sourceforge.net/</a>
> GPL)
> > - ridgelets (
> > <a
> > href="http://rsta.royalsocietypublishing.org/content/357/1760/2495.short
> ">http://rsta.royalsocietypublishing.org/content/357/1760/2495.short</a>)
> > - wedgelets (http://projecteuclid.org/euclid.aos/1018031261)
> > - noiselets (http://en.wikipedia.org/wiki/Noiselet)
> > - surfacelets (http://dx.doi.org/10.1109/TIP.2007.891785)
> > - bandelets (http://en.wikipedia.org/wiki/Bandelet)
> >
> > At least the first four items in this list seem to be quite widely used.
> > I'd like some opinions on which (if any) of these people think would fit
> in
> > scipy, and which ones should rather be kept in a wavelets-specific
> package.
> >
> > Also, if anyone has experience using the contourlet toolbox under
> > discussion in issue 58, would be great to hear how it performed.
> >
> > Ralf
> >
> > _______________________________________________
> > SciPy-Dev mailing list
> > SciPy-Dev at scipy.org
> > <a
> > href="http://mail.scipy.org/mailman/listinfo/scipy-dev">
> http://mail.scipy.org/mailman/listinfo/scipy-dev</a>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20150511/f9e8556f/attachment.html>


More information about the SciPy-Dev mailing list