Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2009-10-16 08:18:26

kankamuso
Member
Registered: 2009-10-16
Posts: 4

Analytical expression of a 2D Fourier transform

Hi all,

This is my first topic, let's see if I explain my problem properly...

I have the analytical expresion of a 2D data set (such dataset forms an image with indices running from -N to N for both x and y). The problem is that I would like to visually inspect the Fourier transform of such image (the real part, just discard the phase or unreal one). With such purpose, I would like to obtain the analytical expression for such transform (in terms of the new x and y coordinates) and fill an image using obtained values. By the way, I have both matlab and mathematica installed on my computer so I would really appreciate you can point me the practical way of doing this.

Hope the problem is clear. Thanks in advance

Offline

#2 2009-10-17 23:26:12

kankamuso
Member
Registered: 2009-10-16
Posts: 4

Re: Analytical expression of a 2D Fourier transform

Thanks, I didn't know such function,

I have tried it but I get nothing, I just get for this:

F = FourierSequenceTransform[
  1/(2 Pi 4) Exp[-0.5 (x^2 + y^2)/4], {x, y}, {u, v}]

This:

FourierSequenceTransform[E^(-0.125 (x^2 + y^2))/(
8 \[Pi]), {x, y}, {u, v}]

Any clues?

Offline

#3 2009-10-17 23:32:49

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Analytical expression of a 2D Fourier transform

Hi kankamuso;

Any clues?

Yes, but you will have to follow the syntax the program understands. You have several syntax errors in your input command.

For M7 you have to be much more precise in how you input arguments. When posting on forums to humans we can guess what sloppy notation means. Mathematica is not tolerant of poor syntax. Even worse I cannot understand what you are trying to input. Incidentally I am getting an answer when I input your command correctly.

What does 1/(2 Pi 4) mean?

Did you want 1/ (8 Pi)

Last edited by bobbym (2009-10-17 23:53:34)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#4 2009-10-18 00:08:40

kankamuso
Member
Registered: 2009-10-16
Posts: 4

Re: Analytical expression of a 2D Fourier transform

Thanks once more,

Yes I was trying to write 1/(2*Pi*4), I saw your examples and found you were not using "*" for multiplying so I thought it could be a syntax error. Now I get:

E^(-2 (u^2 + v^2))
  EllipticTheta[3, 4 I \[Pi] u, E^(-8 \[Pi]^2)] EllipticTheta[3,
  4 I \[Pi] v, E^(-8 \[Pi]^2)]

Which I still don't know if it is what I want because I don't really know what syntax Mathematica is expecting from me... :-)

If this is the correct answer, I still have a problem. I have to translate such formula to a C program. The problem is that I would need to separate complex and real parts in order to be able to compute transform's amplitudes...

Cheers,

Jose.

Last edited by kankamuso (2009-10-18 00:18:04)

Offline

#5 2009-10-18 00:17:26

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Analytical expression of a 2D Fourier transform

Hi;

That is what you are supposed to get. When Mathematica does not understand your input it usually just spits the command right back at ya.

Which I still don't know if it is what I want because I don't really know what syntax Mathematica is expecting from me... :-)

That is what the help is their for. The help is your friend, use it. You must consult it liberally until you know the syntax. Take the tour first. Mathematica is like a stradiverius, you don't learn to play it quickly. Not even if you are a genius and can speak 10 programming languages. Learning times with continuous use vary from 1 month to...

If this is the correct answer, I still have a problem. I have to translate such formula to a C program. The problem is that I would need to separate complex and real parts in order to be able to compute transform's amplitudes...

And why do you need to translate to C++ when you have Mathematica. If you can't figure it out with Mathematica it is going to be a whole lot harder in C++. Could it be that you are more fluent in C++? Start becoming equally proficient in both.

Last edited by bobbym (2009-10-18 00:41:41)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#6 2009-10-18 02:44:49

kankamuso
Member
Registered: 2009-10-16
Posts: 4

Re: Analytical expression of a 2D Fourier transform

bobbym wrote:

Hi;

That is what you are supposed to get. When Mathematica does not understand your input it usually just spits the command right back at ya.

Which I still don't know if it is what I want because I don't really know what syntax Mathematica is expecting from me... :-)

That is what the help is their for. The help is your friend, use it. You must consult it liberally until you know the syntax. Take the tour first. Mathematica is like a stradiverius, you don't learn to play it quickly. Not even if you are a genius and can speak 10 programming languages. Learning times with continuous use vary from 1 month to...

If this is the correct answer, I still have a problem. I have to translate such formula to a C program. The problem is that I would need to separate complex and real parts in order to be able to compute transform's amplitudes...

And why do you need to translate to C++ when you have Mathematica. If you can't figure it out with Mathematica it is going to be a whole lot harder in C++. Could it be that you are more fluent in C++? Start becoming equally proficient in both.

I need to implement this result in an existing application written using C++, that's the point ! :-).

Offline

#7 2009-10-18 15:28:16

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Analytical expression of a 2D Fourier transform

Hi Jose;

I see your point.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB