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

P0=1N2(|f0|)2
Pk=1N2[(|fk|)2+(|fNk|)2]
PN2=1N2(|fN2|)2
Returns:l - list of 2D vectors
Arguments:t - integer name, string name, or table pointer

Reference

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