# Fourier FFT frequencies [duplicate]

I am using FFT (Fourier) on a dataset that contains the temperature along a rod 1m long. The data is sampled with a spacing of 0.01m, so I have 100 measurements in total.

This gives me a sampling rate of 100 1/m. Now, when I call Fourier I get out a list with 100 numbers in frequency-space, where the first corresponds to 0-frequency.

Say I shift the data so the 0-frequency will be in the center. I am unsure of what the largest and smallest wavevector is.

Is it simply -50 (smallest) and +49 (largest)? Thereby implying that the smallest perturbation my FFT can resolve is 1/0.02 = 50, i.e., 0.02m?

• If you FFT a complex sinusoid with a whole number of cycles over your data set, you can easily find the correspondence between frequency and bin number. Aug 9, 2016 at 21:12

The frequencies $f$ returned by the FFT (Fourier) are

$f={0,d,2d,...,(N/2)d,(-N/2+1)d,(-N/2+2)d,-2d,-d}$,

where $N$ is the number of points in the input series, and the frequency increment is $d=1/T$ where $T$ is the period of the input series. In your case, the "period" $T=1$ meter, so $d=1 m^{-1}$. The special frequency $(N/2) d$ is the Nyquist, or folding, frequency, and is the highest frequency representable by the FFT. There is one zero frequency, one Nyquist frequency, and $(N-2)/2$ positive/negative pairs of other frequencies.

f = d * Join[Range[0, n/2], -n/2 + Range[1, n/2 - 1]]


Shifting the data so that the zero frequency is in the centre requires (for even $N$)

RotateRight[f,Floor[Length[f]/2-1]]


where f is the original list of frequencies. Thus, the list of frequencies to associate with the 100 numbers returned by Fourier is, after shifting:

{-49, -48, -47, ..., -2, -1, 0, 1, 2, ..., 48, 49, 50}
{"ft_lang_label":"__label__en","ft_lang_prob":0.8725234,"math_prob":0.9980606,"size":602,"snap":"2022-05-2022-21","text_gpt3_token_len":167,"char_repetition_ratio":0.10200669,"word_repetition_ratio":0.0,"special_character_ratio":0.2857143,"punctuation_ratio":0.13138686,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99940634,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-18T10:24:57Z\",\"WARC-Record-ID\":\"<urn:uuid:9a145269-4ed8-4b57-b2ed-5038963f9dd8>\",\"Content-Length\":\"206019\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:706473a3-aaba-442d-9ff0-fd431fc4f162>\",\"WARC-Concurrent-To\":\"<urn:uuid:e7aa72ec-4fd0-4855-8336-1e1376e12de0>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://mathematica.stackexchange.com/questions/123532/fourier-fft-frequencies\",\"WARC-Payload-Digest\":\"sha1:YVRNOPH2SMB2VZMO2RGZIAVYHZGYN6BI\",\"WARC-Block-Digest\":\"sha1:VLOMOBJWVIFZZNG2QJLUCWTD525Y5INS\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662521883.7_warc_CC-MAIN-20220518083841-20220518113841-00740.warc.gz\"}"}