Open
Description
octave:74> syms x w f(x) G(w)
octave:75> fourier(f)
ans = (sym)
⎛ w ⎞
FourierTransform⎜f(x), x, ───⎟
⎝ 2⋅π⎠
octave:76> syms x w f(x) G(w)
octave:77> F = fourier(f)
F = (sym)
⎛ w ⎞
FourierTransform⎜f(x), x, ───⎟
⎝ 2⋅π⎠
octave:78> g = ifourier(G)
g = (sym)
⎛ x ⎞
InverseFourierTransform⎜G(w), w, ───⎟
⎝ 2⋅π⎠
─────────────────────────────────────
2⋅π
octave:79>
So far so good, but:
octave:79> fourier(g)
PYTHON: Error in cmd
Resetting the octsympy communication mechanism
Closing the Python pipe...
Traceback (most recent call last):
File "<stdin>", line 10, in <module>
File "<stdin>", line 7, in _fcn
File "sympy/integrals/transforms.py", line 1378, in fourier_transform
return FourierTransform(f, x, k).doit(**hints)
File "sympy/integrals/transforms.py", line 117, in doit
self.function_variable, self.transform_variable, **hints)
File "sympy/integrals/transforms.py", line 1317, in _compute_transform
self.__class__._name, **hints)
File "sympy/integrals/transforms.py", line 195, in wrapper
res = func(*args, **kwargs)
File "sympy/integrals/transforms.py", line 1286, in _fourier_transform
F = integrate(a*f*exp(b*I*x*k), (x, -oo, oo))
File "sympy/utilities/decorator.py", line 35, in threaded_func
return func(expr, *args, **kwargs)
File "sympy/integrals/integrals.py", line 1251, in integrate
integral = Integral(*args, **kwargs)
File "sympy/integrals/integrals.py", line 74, in __new__
obj = AddWithLimits.__new__(cls, function, *symbols, **assumptions)
File "sympy/concrete/expr_with_limits.py", line 356, in __new__
limits, orientation = _process_limits(*symbols)
File "sympy/concrete/expr_with_limits.py", line 57, in _process_limits
raise ValueError('Invalid limits given: %s' % str(symbols))
ValueError: Invalid limits given: ((x/(2*pi), -oo, oo),)
error: python_cmd: unexpected return
error: called from:
error: /home/cbm/work/octsympy/octsympy.git/inst/python_cmd.m at line 143, column 5
error: /home/cbm/work/octsympy/octsympy.git/inst/@sym/fourier.m at line 63, column 7
Looks like this might be because the way we now deal with the 2*pi
factors. @maprieto maybe @AlexanderMisel had the right approach? Or possibly its an upstream problem: I haven't checked....