Signal Processing Utilities

Functions

Details

Utilities for signal processing

signals.corrvis(x, y)[source]

Visualize correlation, by calculating the cross-correlation of two signals. The aligned signals and the resulting cross correlation value are shown, and advanced when the user hits a key or clicks with the mouse.

Parameters:

X : array (N,)

Comparison signal

Y : array (M,)

Reference signal

Notes

Based on an idea from dpwe@ee.columbia.edu

Examples

>>> x = np.r_[0:2*pi:10j]
>>> y = np.sin(x)
>>> corrvis(y,y)
signals.pSpect(data, rate)[source]

Power spectrum and frequency

Parameters:

data : array, shape (N,)

measurement data

rate : float

sampling rate [Hz]

Returns:

powerspectrum : array, shape (N,)

frequency : array, shape (N,)

signals.show_se(raw)[source]

Show mean and standard error, of a dataset in column form.

Parameters:

raw : array (N,M)

input data, M sets of N data points

Returns:

avg : array (N,)

average value

se : array (N,)

standard error

Notes

_images/show_se.png

Examples

>>> t = np.arange(0,20,0.1)
>>> x = np.sin(t)
>>> data = []
>>> for ii in range(10):
>>>     data.append(x + np.random.randn(len(t)))
>>> show_se(np.array(data).T)