fCWT icon indicating copy to clipboard operation
fCWT copied to clipboard

Reconstruction from coefficients i.e. inverse fCWT

Open simonweppe opened this issue 2 years ago • 3 comments

Hi, Thanks for the great tool..

Is there anyway to reconstruct the signal from the coefficients ?

For example

        #Initialize
        fs = 1000
        n = fs*100 #100 seconds
        ts = np.arange(n)

        #Generate linear chirp
        signal = np.sin(2*np.pi*((1+(20*ts)/n)*(ts/fs)))
        f0 = 1 #lowest frequency
        f1 = 101 #highest frequency
        fn = 200 #number of frequencies

        #Calculate CWT without plotting...
        freqs, out = fcwt.cwt(signal, fs, f0, f1, fn)
       
        # now reconstruct signal from coeff ?
       signal = fcwt.icwt(freqs,out)...or something along these lines ? 


simonweppe avatar May 22 '23 02:05 simonweppe

It seems that inverse fcwt is currently not implemented (see issue #23) and maybe not so high on the priority list (?).

felixdollack avatar Jun 27 '23 07:06 felixdollack

An inverse CWT is often not implemented by libaries (the popular Python library Pywavelets for example, does not implement an inverse CWT, only the inverse DWT which is basically just adding up all wavelets multiplied by their coefficient). As an CWT provides an redundant representation, an inverse is not trivial. However, I understand the usefulness of having a fast inverse CWT for actual signal processing, so I will update it on the priority list for the next major update.

fastlib avatar Jun 29 '23 17:06 fastlib

I also wondering how can I reconstruct the signal

GUIMINLONG avatar Jan 09 '24 00:01 GUIMINLONG