Python Forum

Full Version: How to interpret Sympy inverse_fourier_transform response
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm just starting to use Sympy for fourier transforms and am having difficulty interpreting the result. For example, I know the inverse transform of sin(pi*f)/(pi*f) is the unit pulse but I don't see how the response from Sympy describes the unit pulse:

from sympy import *
t=Symbol('t',real=True)
f=Symbol('f',real=True)
x=sin(pi*f)/(pi*f)
X=inverse_fourier_transform(x, f, t)
print 'X=', X
#X= Piecewise((-t/Abs(t) + 1, 4*t**2 > 1), (1, True))
The way I read it is X=-t/Abs(t)+1 for 4*t**2>1, and 1 otherwise. The unit pulse is 0 for t<-1/2 and t>1/2. I don't see how -t/Abs(t) + 1, 4*t**2 > 1 says this. If t=-1 for example, -t/Abs(t)+1 evaluates to -(-1)/1 + 1 = 2.

Can someone explain?
This explains how to get unit pulse: http://www.bogotobogo.com/python/OpenCV_...FT_DFT.php
Thanks. What I'm looking for is help in interpreting the Sympy response to the inverse_fourier_transform command.