JuliaDSP / Wavelets.jl

A Julia package for fast discrete wavelet transforms and utilities
Other
190 stars 29 forks source link

where is `idwt` defined? #74

Closed tbenst closed 3 years ago

tbenst commented 3 years ago

Thanks for this package! I'm trying to learn about the implementation details of idwt, but totally flummoxed as to where to look. I believe the key functions are defined with metaprogramming at: https://github.com/JuliaDSP/Wavelets.jl/blob/f2b69596aa09816ea24c93351d0b8e8cb1ee0b2e/src/mod/Transforms.jl#L110

And they are all effectively wrappers around: https://github.com/JuliaDSP/Wavelets.jl/blob/f2b69596aa09816ea24c93351d0b8e8cb1ee0b2e/src/mod/transforms_filter.jl#L20

where for dwt, fw=true and for iwt, fw=false. This leads to a key branch in the code, https://github.com/JuliaDSP/Wavelets.jl/blob/f2b69596aa09816ea24c93351d0b8e8cb1ee0b2e/src/mod/transforms_filter.jl#L46 where dwt uses filtdown! while idwt uses filtup!, and it seems like these two functions do much of the "actual work". Unfortunately, I can't seem to find where these two functions are actually defined. Any pointers? Thank you!

tbenst commented 3 years ago

ah, it seems like this is more a problem with Github's poorly implemented search--found it easily after cloning.

https://github.com/JuliaDSP/Wavelets.jl/blob/f2b69596aa09816ea24c93351d0b8e8cb1ee0b2e/src/mod/transforms_filter.jl#L467