pywt icon indicating copy to clipboard operation
pywt copied to clipboard

Matlab wavelet compatibility

Open aaren opened this issue 8 years ago • 3 comments

If we decide we want to have all of the Matlab wavelets available, here is the list available in Matlab r2015b:

>>> waveletfamilies('n')
===================================         
Haar                    haar                    
===================================         
Daubechies              db                      
------------------------------              
db1 db2 db3 db4                             
db5 db6 db7 db8                             
db9 db10    db**                                  
===================================         
Symlets                 sym                     
------------------------------              
sym2    sym3    sym4    sym5                            
sym6    sym7    sym8    sym**                          
===================================         
Coiflets                coif                    
------------------------------              
coif1   coif2   coif3   coif4                       
coif5                                         
===================================         
BiorSplines             bior                    
------------------------------              
bior1.1 bior1.3 bior1.5 bior2.2             
bior2.4 bior2.6 bior2.8 bior3.1             
bior3.3 bior3.5 bior3.7 bior3.9             
bior4.4 bior5.5 bior6.8                     
===================================         
ReverseBior             rbio                    
------------------------------              
rbio1.1 rbio1.3 rbio1.5 rbio2.2             
rbio2.4 rbio2.6 rbio2.8 rbio3.1             
rbio3.3 rbio3.5 rbio3.7 rbio3.9             
rbio4.4 rbio5.5 rbio6.8                     
===================================         
Meyer                   meyr                    
===================================         
DMeyer                  dmey                    
===================================         
Gaussian                gaus                    
------------------------------              
gaus1   gaus2   gaus3   gaus4                       
gaus5   gaus6   gaus7   gaus8                       
gaus**                                       
===================================         
Mexican_hat             mexh                    
===================================         
Morlet                  morl                    
===================================         
Complex Gaussian        cgau                    
------------------------------              
cgau1   cgau2   cgau3   cgau4                       
cgau5   cgau**                                 
===================================         
Shannon                 shan                    
------------------------------              
shan1-1.5   shan1-1 shan1-0.5   shan1-0.1         
shan2-3 shan**                               
===================================         
Frequency B-Spline      fbsp                    
------------------------------              
fbsp1-1-1.5 fbsp1-1-1   fbsp1-1-0.5 fbsp2-1-1   
fbsp2-1-0.5 fbsp2-1-0.1 fbsp**               
===================================         
Complex Morlet          cmor                    
------------------------------              
cmor1-1.5   cmor1-1 cmor1-0.5   cmor1-1         
cmor1-0.5   cmor1-0.1   cmor**                   
=================================== 

aaren avatar Mar 02 '16 18:03 aaren

Additional db and coif being added in #164

aaren avatar Mar 02 '16 18:03 aaren

Doing what MATLAB does and calculating coefficients for arbitrary members of a wavelet family would be very neat. Many would require implementing a solver for the particular equation, so an optional dependency on something like SymPy would probably be necessary. If it is not available then only the predefined wavelets would be available.

kwohlfahrt avatar Mar 07 '16 22:03 kwohlfahrt

Doing what MATLAB does and calculating coefficients for arbitrary members of a wavelet family would be very neat.

It can be done, but it's slow, even for Daubechies. Here's some code I found and cleaned up a bit to do exactly this for Daubechies wavelets.

However, looking at 10 Lectures on Wavelets, section 8.1.1, it looks like computing symlet coefficients is an exponential time algorithm. Does anyone know if there's an easier way to do this?

NAThompson avatar Nov 12 '18 06:11 NAThompson