PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
2.04k stars 470 forks source link

feature request: dual-tree complex wavelet transform #253

Open LaurentRDC opened 7 years ago

LaurentRDC commented 7 years ago

Hi all,

Some discussions on implementing the dual-tree complex wavelet transform in PyWavelets occurred in #58 , but let me restate some things:

The dual-tree complex wavelet transform is described in a review paper. A Matlab implementation is available here, and a Python port is available.

I needed to implement the dual-tree complex wavelet transform (DTCWT) for my research. I have made the code public here (Python 3 only). I would like to discuss the inclusion of the DTCWT in PyWavelets if there is enough interest.

grlee77 commented 7 years ago

Hi @LaurentRDC I have not looked at the specifics of your implementation, but I think there is definitely sufficient interest. The main potential blocker for inclusion here would be licensing. I see you have chosen an original BSD (4-clause) license at your repo. I'm not sure, but I think the advertising clause may be incompatible with PyWavelets? 3-clause BSD should be compatible. Is whatever code you referenced during your implementation also similarly licensed?

I have also recently been working on dual-tree transforms for a research project, but have not posted anything publicly yet. Mainly, I am implementing a general n-dimensional version of the routines with flexible choice of axes to transform, etc. (i.e. similar to the wavedecn/waverecn functions already available here). I have been using Dr. Selesnick's Matlab package as a reference and did not find explicit license terms included with his code. Once it is in a state suitable for a PR, I would have to contact him for confirmation on whether or not it could potentially be made available under a permissive BSD or MIT style license compatible with PyWavelets or would need to remain a separate package.

Also, you may potentially also be interested in a 2D fast finite shearlet transform implementation that I have made available here: https://github.com/grlee77/PyShearlets I have not made an official release, but it is in a basic working state. That one is not compatible with PyWavelets licensing terms as it is a direct translation of GPLv3 Matlab code.

rgommers commented 7 years ago

I do not have much experience with licensing. The only important thing to us is that anyone using our baseline algorithm cites our research. Other than that, I am open to a different license.

Ultimately, if @grlee77 is working on this, maybe I can help in a different way?

Somehow this message got deleted from this thread, but I'll answer anyway: there is a major difference between requesting users to cite your paper(s), or requiring them to do so. The former is good academic practice anyway - you should cite software you use just like you cite relevant papers. The latter basically means that your software does not qualify as open source software, and cannot be used in any mainstream package.

So I'd strongly suggest sticking with a standard 3-clause BSD license, and requesting users to cite a particular paper.

LaurentRDC commented 7 years ago

Yes I removed this post because I realized we were not talking about the same thing. In retrospect, I shouldn't delete posts.

I hadn't considered the difference between requiring and requesting, and thank you for the clarification. I will edit my license.

However I was using my package as an implementation example of the DTCWT. I do not mean to merge that code into Pywavelets. I wanted to know if there was plan to implement the DTCWT, and if there wasn't, I would have gladly put together a pull request.