regeirk / pycwt

A Python module for continuous wavelet spectral analysis. It includes a collection of routines for wavelet transform and statistical analysis via FFT algorithm. In addition, the module also includes cross-wavelet transforms, wavelet coherence tests and sample scripts.
http://regeirk.github.io/pycwt/
Other
293 stars 104 forks source link

Wrong default parameter in function 'wct_significance' #52

Open yetanotherfrancisdeveloper opened 1 year ago

yetanotherfrancisdeveloper commented 1 year ago

I think there is an error for the parameter 'wavelet' in the function 'wct_significance'. The docstring says it should be an instance of a class, but a string is given.

Function's parameter:

https://github.com/regeirk/pycwt/blob/d53dbe43deaf0c9d3aa54ae34f198386ef62e903/pycwt/wavelet.py#L532

Docstring:

https://github.com/regeirk/pycwt/blob/d53dbe43deaf0c9d3aa54ae34f198386ef62e903/pycwt/wavelet.py#L557

Edit: I should add that the function '_check_parameter_wavelet' is not used in 'wct_significance'. If one were to use this function with the default parameter, they would get an error. In fact, in the function 'cwt', the function '_check_parameter_wavelet' is used before using 'wct_significance'.

https://github.com/regeirk/pycwt/blob/d53dbe43deaf0c9d3aa54ae34f198386ef62e903/pycwt/wavelet.py#L472

https://github.com/regeirk/pycwt/blob/d53dbe43deaf0c9d3aa54ae34f198386ef62e903/pycwt/wavelet.py#L522