Navigation

Operators and Keywords

Function List:

C++ API

Function File: output = spikespec (X)
Function File: output = spikespec (X, paramName, paramValue, …)

Computes a power spectrum assuming that the data are the times of singular events, e.g. heart beats.

These events do not need to be in ascending order. Furthermore, the input can be treated as inter-event intervals rather than time if switch inter is set.

If the event times are t(n), n=1,...,l the spectrum is defined by

            l                    2
         |---                  |
         |\     -i 2 pi f t(n) |
  S(f) = | | e                |
         |/                    |
         |---                  |
           n=1

that is, the signal is taken to be a sum of delta functions at t(n). S(f) is computed for parameter f_no frequencies between 0 and value of parameter f. The result is binned down to a frequency resolution defined by parameter w.

Input

S

This function always assumes that each time series is along the longer dimension of matrix S. It also assumes that every dimension (counting along the shorter dimension) of S is considered a component of the time series.

Parameters

f

The maximum frequency [default = 2 * length (X) / total time].

f_no

Number of frequencies [default = f * total time / 2].

w

Frequency resolution [defualt = 0 – return all frequencies].

Switch

inter

Treat the input as inter-event intervals instead of the time at which the event occured.

verbose

Write to standard output the value of the ’total time’, number of frequencies used, the maximum frequency and how many frequencies are binned.

Output

The output is alligned with the input. If the input was a column vector the output will consist of two columns, the first holds the frequencies to which the spectrum was binned and the second holds the calculated spectrum value.

Algorithms

The algorithms for this functions have been taken from the TISEAN package.

Package: tisean