`table.fft`

Syntax

- l = table.fft(t)
Get a list of 2D vectors representing the Fast Fourier Transform of the table entries in t.

The original table entries are sampled into a list that has a length the next power of 2 greater than the number of entries in t. The sampling interval is made uniform. Note that this process will create artifacts from the original data if table t is of a different length and does not have uniform X intervals between entries.

The return value is a list of 2D vectors representing the power spectrum of the data. There are several definitions for a power spectrum. The one used here is adapted from Press et al. (1992). The power spectrum is a set of N/2 real numbers defined as

\[P_0 = {1 \over N^2} ( \vert f_0 \vert )^2\]\[P_k = {1 \over N^2} [(\vert f_k \vert)^2 + (\vert f_{N-k} \vert)^2]\]\[P_{N \over 2} = {1 \over N^2} (\vert f_{N \over 2} \vert)^2\]

Reference

Press, W. H., et al. Numerical Recipes in C. Cambridge: Cambridge University Press (1992).

Was this helpful? ... | Itasca Software © 2024, Itasca | Updated: May 07, 2024 |