Fourier transform (FT)

Fourier surrogates (FS)

Fourier surrogates are a form of constrained surrogates created by taking the Fourier transform of a time series, then shuffling either the phase angles or the amplitudes of the resulting complex numbers. Then, we take the inverse Fourier transform, yielding a surrogate time series.

Random phase surrogates

randomphases(ts)

Create a random phases surrogate for ts [1]. Surrogate realizations using the phase surrogates have the same linear correlation, or periodogram, as the original data.

ts Is the time series for which to generate an AAFT surrogate realization.

Literature references

  1. J. Theiler et al., Physica D 58 (1992) 77-94 (1992).

source

Here's how you would generate a phase surrogate realization of a time series.

using TimeseriesSurrogates

# Generate a time series. This time, we'll use a NSAR2() process.
ts = NSAR2()

# Generate a random phase surrogate realization
surrogate = randomphases(ts)

# Plot the surrogate along with the time series it is based on, along with autocorrelation
# and periodogram plots.
surrplot(ts, surrogate)
0 100 200 300 400 500 -200 0 200 400 Time step Value 5 10 15 20 25 0.0 0.3 0.6 0.9 Lag Autocorrelation 0.0 0.1 0.2 0.3 0.4 0.5 0 1×10 5 2×10 5 3×10 5 4×10 5 5×10 5 Binned frequency Power -200 0 200 400 0 25 50 75 100 Binned value Frequency Original Surrogate

How do random phase surrogates vary across realizations?

Below is a plot showing different phase surrogate realizations (orange) over the same time series (blue). Each frame in the animation is a different surrogate realization. Note that the autocorrelations are roughly similar across realizations.

randomphases_NSAR2_gif(n_iters = 30, fps = 5)

30 random phase surrogates for a single realization of a cyclostationary AR(2) process

In the next animation, the time series (blue) for which we generate surrogates change between frames. One phase surrogate realization (orange) is generated for each of the time series. Notice that, again, the phase surrogates accurately represents the autocorrelation of the different initial time series.

randomphases_NSAR2_gif(n_iters = 30, fps = 5, new_realization_every_iter = true)

30 realizations of a cyclostationary AR(2) process. One random phase surrogate per realization of the time series.

Random amplitude surrogates

randomamplitudes(ts)

Create a random amplitude surrogate for ts.

A modification of the random phases surrogates [1] where amplitudes are adjusted instead of the phases after taking the Fourier transform.

ts Is the time series for which to generate an AAFT surrogate realization.

Literature references

  1. J. Theiler et al., Physica D 58 (1992) 77-94 (1992))

source

This is how you would generate a random amplitude surrogate realization of a time series.

using TimeseriesSurrogates

# Generate a time series. Again, we'll use a NSAR2() process.
ts = NSAR2()

# Generate a random amplitude surrogate realization
surrogate = randomamplitudes(ts)

# Plot the surrogate along with the time series it is based on, along with autocorrelation
# and periodogram plots.
surrplot(ts, surrogate)
0 100 200 300 400 500 -1500 -1000 -500 0 500 1000 Time step Value 5 10 15 20 25 0.2 0.4 0.6 0.8 1.0 Lag Autocorrelation 0.0 0.1 0.2 0.3 0.4 0.5 0 3.0×10 6 6.0×10 6 9.0×10 6 1.2×10 7 Binned frequency Power -1500 -1000 -500 0 500 1000 0 25 50 75 100 Binned value Frequency Original Surrogate

How do random amplitude surrogates vary across realizations?

Below is a plot showing different phase surrogate realizations (orange) over the same time series (blue).

randomamplitudes_NSAR2_gif(n_iters = 30, fps = 5)

30 random phase surrogates for a single realization of a cyclostationary AR(2) process

In the next animation, as above, each frame shows a new time series (blue), which every frame is another unique realization of the NSAR2 process, and one surrogate realization of the time series (orange).

randomamplitudes_NSAR2_gif(n_iters = 30, fps = 5,
                        new_realization_every_iter = true)

30 realizations of a cyclostationary AR(2) process. One random phase surrogate per realization of the time series.