Next: Annealed surrogates Up: The TISEAN implementation Previous: Measures of nonlinearity

## Iterative FFT surrogates

The workhorse for the generation of surrogate data within the TISEAN package is the program surrogates. It implements the iterative Fourier based scheme introduced in Ref. [30] and discussed in Sec. 4.3. It has been extended to be able to handle multivariate data as discussed in Sec. 4.6. An FFT routine is used that can handle data sets of N points if N can be factorised using prime factors 2, 3, and 5 only. Routines that take arbitrary N will end up doing a slow Fourier transform if N is not factorisable with small factors. Occasionally, the length restriction results in the loss of a few points.

The routine starts with a random scramble as , performs as many iterates as necessary to reach a fixed point and then prints out or , as desired. Further, the number of iterations is shown and the residual root mean squared discrepancy between and . The number of iterations can be limited by an option. In particular, i=0 gives the initial scramble as or a non-rescaled FFT surrogate as . The first iterate, , is approximately (but not quite) equivalent to an AAFT surrogate. It is advisable to evaluate the residual discrepancy whenever the algorithm took more than a few iterations. In cases of doubt if the accuracy is sufficient, it may be useful to plot the autocorrelation function (`corr` or `autocor`) of the data and , and, in the multivariate case, the cross-correlation function (`xcor`) between the channels. The routine can generate up to 999 surrogates in one call.

#### End point effects

Since the periodicity artefact discussed in Sec. 4.5 can lead to spurious test results, we need to select a suitable sub-sequence of the data before making surrogates. For this purpose, TISEAN contains the program endtoend. Let be a sub-sequence of length and offset . The program then computes the contribution of the end-to-end mismatch to the total power in the sub-sequence:
as well as the contribution of the mismatch in the first derivative
and the weighted average
The weight w can be selected by the user and is set to 0.5 by default. For multivariate data with M channels, is used.

Now the program goes through a sequence of decreasing , and for each determines such that is minimal. The values of , , and are printed whenever has decreased. One can thus easily find a sub-sequence that achieves negligible end point mismatch with the minimal loss of data.

Next: Annealed surrogates Up: The TISEAN implementation Previous: Measures of nonlinearity