Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Fourier transform capabilities #24101

Open
Anonyame opened this issue Oct 1, 2022 · 5 comments
Open

Improve Fourier transform capabilities #24101

Anonyame opened this issue Oct 1, 2022 · 5 comments

Comments

@Anonyame
Copy link

Anonyame commented Oct 1, 2022

我试了试SymPy,发现好多函数的傅里叶变换都算不出来。常数函数与符号函数的傅里叶变换也算不出来(捂脸)。如果SymPy可以在这些信号处理的问题上做出一些改进,我将感激不尽!感谢你们!

I've tried SymPy, but I found that the Fourier transforms of many functions could not be calculated. Simply, the Fourier transforms of constant function, as well as sign function could not be computed either (facepalm). I would appreciate it if SymPy can make some improvements in signal processing problems! Thx!

@Anonyame
Copy link
Author

Anonyame commented Oct 1, 2022

非常感谢你们开发的这个工具箱!

Thank you so much for developing this useful toolkit!

@oscarbenjamin
Copy link
Contributor

Specifically the issues are:

In [7]: fourier_transform(1, x, k) # should be DiracDelta(x)
Out[7]: FourierTransform(1, x, k)

In [8]: inverse_fourier_transform(DiracDelta(x), x, k)
Out[8]: 1

In [12]: fourier_transform(sign(x), x, k) # should be 2/(x*I)
Out[12]: FourierTransform(sign(x), x, k)

In [11]: inverse_fourier_transform(2/(x*I), x, k) # should be sign(x)
Out[11]: 
                            ⎛1-2InverseFourierTransform⎜─, x, k⎟
                            ⎝x

@Anonyame
Copy link
Author

Anonyame commented Oct 5, 2022

Specifically the issues are:

In [7]: fourier_transform(1, x, k) # should be DiracDelta(x)
Out[7]: FourierTransform(1, x, k)

In [8]: inverse_fourier_transform(DiracDelta(x), x, k)
Out[8]: 1

In [12]: fourier_transform(sign(x), x, k) # should be 2/(x*I)
Out[12]: FourierTransform(sign(x), x, k)

In [11]: inverse_fourier_transform(2/(x*I), x, k) # should be sign(x)
Out[11]: 
                            ⎛1-2InverseFourierTransform⎜─, x, k⎟
                            ⎝x

Indeed. Is there a way to avoid this result, please?

@oscargus
Copy link
Contributor

oscargus commented Oct 8, 2022

If someone is interested in doing this, take a look at the Laplace transform where @hanspi42 made a great job extending the capabilities enormously. A similar approach with "tables" of precomputed results can be used here.

@oscargus oscargus changed the title 好多函数的傅立叶变换都算不出来。 Improve Fourier transform capabilities Oct 8, 2022
@sylee957
Copy link
Member

There could also be some algebraic approach for fourier transformation
https://arxiv.org/pdf/2009.12198.pdf
If someone is able to comprehend that paper, it can give some insight for completing the difficult problem solving in this domain.
But it wouldn't deprecate the need to implement the usual Heuristic/Pattern-Matching/Term-Rewriting approach to this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants