Difficult with symbolic integration in Sympy

49 Views Asked by At

I am computing using Sympy the Fourier Transform to Morlet Wavelet given by $ψ(t)=exp(ωıt)⋅(−t**2/2)$ using the code:

Note 1 > $\omega$ is the frequency variable.

Note 2 > There are more imports of Sympy because I am using it in other parts of my code.

from sympy import exp, fourier_transform, sqrt, integrate, oo, pi, sin, cos
from sympy import Symbol
omega = Symbol('omega', real=True)
t = Symbol('t', real=True)

morlet = exp(1j*omega*t)*exp(-t**2/2)
fourier_wave = fourier_transform(morlet, t, omega)

The problem is that these code run for a lot of time without a response.

I appreciate it if you give me some help with this.

Note 3: I try using the Mexican Hat wavelet $ψ(t)=(1−t2)⋅exp(−t2/2)$ and run fast and correctly.

I suspect that the problem is that one wavelet has a real variable and the other has a complex variable.

0

There are 0 best solutions below