2

I'm trying to do an FFT of some data (a Gaussian pulse), but I'm finding a strange result. The real and imaginary components of the resultant FFT alternate in sign every index of the array. The absolute values of the arrays, however, are continuous. So, I get something that looks like this:

FFT of Gaussian pulse

Does anybody have an idea on what is causing this? Thanks!

ali_m
  • 71,714
  • 23
  • 223
  • 298
user139632
  • 21
  • 2
  • Linking this more or less same question here: [Strange phase for gaussian beam 2D](https://stackoverflow.com/questions/55556913/strange-phase-for-gaussian-beam-2d) – Cris Luengo Jun 03 '23 at 14:02

1 Answers1

6

Alternating signs in the frequency domain corresponds to an exp(j*pi*n) complex factor which by the shift theorem corresponds to a time domain circular shift of N/2 samples. Looking at your time domain Gaussian pulse you should notice that the peak indeed appears at N/2 instead of index 0.

Shifting back your time domain Gaussian pulse with ifftshift should give you a pulse centered at 0 whose frequency domain representation does not have this sign alternation.

Cris Luengo
  • 55,762
  • 10
  • 62
  • 120
SleuthEye
  • 14,379
  • 2
  • 32
  • 61