Download original image
Comparison of standard and efficient ways to calculate the wavelet coherence of a Fourier surrogate with some second variable. Multiple arrows are shown where the calculation must be performed for each timescale of the wavelet transform. Left (standard) algorithm: Box A is the procedure for generating a Fourier surrogate. Box B is the procedure for generating a wavelet transform of the surrogate (unscalloped). Box C is the procedure for calculating the wavelet coherence with the second variable. Most of the calculation time is taken up with Fourier transforms (coloured red). Boxes A, B and C are repeated every time a surrogate is generated. Right (fast) algorithm: Only the procedure in box D is repeated every time a surrogate is generated. The surrogate itself is defined by the random phases that are used, but is not constructed explicitly the way it was in box A.