Hi everyone,
I'm currently working on implementing Fourier Transform computations using SymPy to better understand the transforms of signals such as and .
However, when I use fourier_transform() on these functions, SymPy returns 0 instead of the expected result involving Dirac delta functions, for example:
From my understanding, these transforms are distributions (generalized functions), so I'm wondering:
Any guidance, examples, or best practices would be greatly appreciated. Thank you!
Thank you for the clarification. I now understand the distinction between Fourier transforms that evaluate to ordinary functions and those that are distributions involving DiracDelta.
My original idea was slightly different from expecting fourier_transform() to compute the distribution directly. I was wondering whether, instead of returning 0, it could first attempt to apply known Fourier transform properties symbolically.
For example, when encountering expressions involving sin or cos, SymPy could rewrite them in terms of complex exponentials and apply the modulation (frequency-shifting) property, or use transform rules that return DiracDelta expressions where appropriate. This could also benefit expressions such as
fourier_transform(exp(-t)*cos(2*pi*f0*t)*Heaviside(t), t, f)
by deriving the result through transform properties rather than direct integration.
Would an enhancement along these lines fit within the intended design of the Fourier transform module, or is handling distribution-valued transforms intentionally outside its scope?
If this is considered a worthwhile direction, I'd be interested in contributing it to SymPy. I'd be happy to work on a pull request if the maintainers think this approach is appropriate.
|
|
sender notified by
Mail Track for Gmail |
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sympy/9cc86c1d-26e5-4ccd-b428-7a7015ab1811n%40googlegroups.com.
Thank you for the clarification. I now understand the distinction between Fourier transforms that evaluate to ordinary functions and those that are distributions involving DiracDelta.
My original idea was slightly different from expecting fourier_transform() to compute the distribution directly. I was wondering whether, instead of returning 0, it could first attempt to apply known Fourier transform properties symbolically.
For example, when encountering expressions involving sin or cos, SymPy could rewrite them in terms of complex exponentials and apply the modulation (frequency-shifting) property, or use transform rules that return DiracDelta expressions where appropriate. This could also benefit expressions such as
fourier_transform(exp(-t)*cos(2*pi*f0*t)*Heaviside(t), t, f)by deriving the result through transform properties rather than direct integration.
Would an enhancement along these lines fit within the intended design of the Fourier transform module, or is handling distribution-valued transforms intentionally outside its scope?
If this is considered a worthwhile direction, I'd be interested in contributing it to SymPy. I'd be happy to work on a pull request if the maintainers think this approach is appropriate.