Closed nabobalis closed 9 years ago
The modules are based on routines provided by C. Torrence and G. P. Compo available at http://paos.colorado.edu/research/wavelets/, on routines provided by A. Grinsted, J. Moore and S. Jevrejeva available at http://noc.ac.uk/using-science/crosswavelet-wavelet-coherence, and on routines provided by A. Brazhe available at http://cell.biophys.msu.ru/static/swan/.
Other adaptations I did based on the original research articles which I might have mentioned on the commented code.
I would be very glad if SciPy incorporates the code for broader use and have no objections as long as it is not sold and all credits are include.
Hello,
The modules are based on routines
When you say based on, do you mean (from a legal perspective) 'translated'? It seems like it from what you have been saying.
I would be very glad if SciPy incorporates the code
SciPy can only incorperate the code, if like the rest of the scientific eco-system it is under a BSD compatible license. The BSD license is here. The BSD license if very liberal and allows for distribution and re-sale in both source code and binary forms. (For reasons why most scientific python software is under BSD read this)
[I] have no objections as long as it is not sold
This means you object to the BSD license.
To re-license this code as BSD would be a massive effort and your input is needed if we are going to manage it.
The first step in the re-licensing is that you have to be willing to license your translation copyright under BSD, this is the copyright you own for having translated this code into Python.
Next we need to either obtain the license to distribute this translation under BSD from the copyright holders of the original code you translated (this means we need to contact the original sources of the code and ask them) if they refuse we then need to code our own versions of that code from scratch.
A big help in this effort would be knowing from you what parts of the code were translated from where, so that we know what bits we have what licenses for.
Thanks Stuart
Hi,
Sorry for the lack of specificity. I started off incorporating part of Alexey Brazhe's Swan analysis tool code, which is already Python. I used his concept of wavelet classes (which I found very elegant) and also the way he calculates the CWT using the convolution theorem (which was something new to me at that time). His code is GPL licensed (according to https://launchpad.net/swan). I changed the class functions a little (especially their names) to ensure consistency among different wavelets.
Cone of influence calculations, statistical significance tests and cross-wavelet and wavelet coherence spectra are translations of Torrence & Compo's and Grinsted et al's Matlab code. I started translating code literally and after getting more comfortable with the code and the statistics I tried to change things a little: i.e. using Scipy's chi square percent point function (scipy.stats.chi2.ppf). I think I have even used the same variable names, in some cases. The sample codes are also translations of the original Matlab routines, with minor changes in style. The data files are the same. My original idea was to reproduce their findings and use the same tools on other datasets (reproducible research!).
Torrence & Compo do not mention any licensing on their page, they ask to acknowledge the use of their software in any publications. Grindsted mentions that his software may be used, copied, or redistributed as long as it is not sold and the copyright notice is reproduced.
Until now, I have never really thought much about licensing and I might sometimes be too academic (up to now I was always the end user). I admit the links on the BSD license Stuart shared have a point, and I have never thought on GPL as an 'infection'. I agree there is no point on being restrictive and licensing it through BSD makes sense and might spread its use.
And by the way, I have noticed Nabil has done some nice refactoring (and renaming) of the code which I am considering to incorporate to my git fork in the near future, and BSD licensed.
Cheers, Sebastian
I wanted to ask you a question, you have the reference to "Liu, Y.; Liang, X. S. and Weisberg, R. H. (2007). Rectification of the bias in the wavelet power spectrum. Journal of Atmospheric and Oceanic Technology, 24(12), 2093-2102." in the wav.py code but did you use their method to fix the bias in the power spectrum?
Also, regarding the licence, I was able to get permission to package the code under BSD. Which I need to do to my repo soooooon.
Hi Nabil,
My appologies for the delay. I thought I did include the suggested corrections into either wav.py of at least in sample.py. However I ran quickly through the code lines and I didn't actualy use it. I might have used it somewhere else and then mentioned the reference to include the corrections later, which did not occur.
Cheers, Sebastian
Hey,
I really want to get this wavelet code licensed so that maybe it can be added to SciPy. They require a BSD license for their code if I recall.
I was wondering what code you translated into python and what you wrote yourself? If I can contact everyone that you translated code from and get their permission or for them to licence their own code under BSD. We should be able to licence this module with BSD.