Source Code for the S Transform of a Real Function

; The S transform function called "local( )"

; Returns the complex localization matrix for positive frequencies

; The users passes the time series, and the width factor of the localizing window

; ie the window = k periods (k=1 suggested)

; result = local(timeseries,k)

; Gaussian Window Function called by local()

; Accepts variables length and width

; Returns the spectrum of the Gaussian window

; Inverse of the local() function

; Returns the original time series (as a complex array)

; Accepts the positive frequency half of the complex S transform result

; ie this accepts the output of the local() function

; Usage: inverse_result = ilocal(s-matrix)

; for example, in the following, inverse_result will be the original time series

; IDL> result = local(timeseries,1)

; IDL> inverse_result = ilocal(result)

; then REAL[inverse_result] == timeseries


IDL Routines

fft(array,+-1)

Fourier Transform function fft(array,-1) is defined as:

{for spectrum = fft( array,-1) }

and the inverse Fourier transform is:

{ array = fft(spectrum,1) }

Both functions return a complex array of length N. It is stored in the usual way of positive frequencies in 0-N/2 followed by the negative frequencies.

SHIFT(array, n)

Shifts the elements of the array 'n' points and wraps around at the edges.Example if A = { 0, 1, 2, 3, 4, 5 } then shift(A, 1) = { 5, 0, 1, 2, 3, 4 } and shift(A,-2) = { 2, 3, 4, 5, 0, 1 }