Closed pramodbutte closed 5 years ago
Is this for a proprietary implementation? (If so that is fine, just curious to know what all PyWavelets is being used for).
double_dec_a
gets created by some templating. The code underlying float_dec_a
and double_dec_a
is here:
https://github.com/PyWavelets/pywt/blob/b65662ff4f7c33064d584e4b5ffec92bcffd19b2/pywt/_extensions/c/wt.template.c#L318
whereas the actual templating is done via #define
/ #undefine
statements as in:
https://github.com/PyWavelets/pywt/blob/master/pywt/_extensions/c/wt.c
double_dec_a
ends up calling another templated function to do the actual convolution:
https://github.com/PyWavelets/pywt/blob/b65662ff4f7c33064d584e4b5ffec92bcffd19b2/pywt/_extensions/c/convolution.template.c#L127
The convolution code ends up being a little hard to read mainly do to all the various boundary handling modes and the fact that it handles edge cases where the filter may be longer than the data, etc.
This is being used in cancer research in a prototype being built in my lab. nothing proprietary.
If you are just curious regarding use case: My lab is building a prototype which uses fluorescence generated by ultra-fast lasers to detect brain tumor during surgery. We use pywavelets for denoising the signal from the tissue (mostly getting rid of thermal and shot noise prior to averaging multiple pulses)
Thanks for the reply!
My lab is building a prototype which uses fluorescence generated by ultra-fast lasers to detect brain tumor during surgery.
Okay, so you need real-time processing during surgery to guide the procedure? What is the typical image size and frame rate you need to process (I assume this is 2D + time data)? Contact me via email if you want to discuss further, as I don't want to clutter the issues page with an extended discussion here. (I have some prototype GPU-based implementations of various transforms and denoising algorithms that could potentially be of use. I have started looking at means to obtain funding to turn this in to a better maintained public package like PyWavelets, but that is still at the planning stage and part of why I was interested in potential downstream uses for such a package.)
I have an existing wavelet denoising function written in python using pywt. Due to some performance requirements we have moved most of the code over in Rust. One of the last remaining code is the discreet wavelent transform (bior3.9).
My issue is. I am noticing a small difference in my implementation of the wavelets compared to pywavelets results. I have been trying to understand how the wavelet decomposition is implemented in pywavelet. but I cannot seem to find the source code. can any please guide me to the source code where the actual convolution of the wavelet and signal is computed.
thanks in advance.
P.S. I was able to follow till
but I am unable to locate c_wt.double_dec_a implementation.
in case anyone is curious here is the rust implementation
and equivalent python code