Skip to content

Breeze Signal Processing

Kenta Takagaki edited this page Feb 28, 2014 · 10 revisions

needs import breeze.signal._
_Note: many of these functions have extensive optional parameters in breeze. _ See the ScalaDoc for each function for parameters and how to set them.

Basic Operations

| Operation | Breeze | Numpy | Matlab | | ---- | ---- | ---- | ---- | ---- | ---- | | Convolve | convolve( denseVector ) | | | | Correlate | correlate( denseVector ) | | | these Breeze functions will use fft convolution by default for floating point DenseMatrixes and DenseVectors. For Int and Long DV/DMs, you can specify fft convolution by specifying the optional argument optMethod = OptMethod.FFT

Transforms

| Operation | Breeze | Numpy | Matlab | | ---- | ---- | ---- | ---- | ---- | ---- | | 1D Fourier transform | fourierTr( denseVector ) | fft( a ) | fft( a ) | | 1D Inverse Fourier transform | iFourierTr( denseVector ) | ifft( a ) | ifft( a ) | | 2D Fourier Transform | fourierTr( denseMatrix ) | fft2( a ) | fft2( a ) | | 2D Inverse Fourier Transform | iFourierTr( denseMatrix ) | ifft2( a ) | ifft2( a ) |

Convenience Functions for DFT

| Operation | Breeze | Numpy | Matlab | | ---- | ---- | ---- | ---- | ---- | ---- | | Fourier frequencies | fourierFreq( n, dt = (timestep) ) or fourierFreq( n, fs = (sample freq) ) | fftfreq(n, dt) | --- | | Fourier shift | fourierShift( denseVector ) | fftshift( a ) | fftshift( a ) | | (inverse) | iFourierShift( denseVector ) | ifftshift( a ) | ifftshift( a ) |

Filtering

| Operation | Breeze | Numpy | Matlab | | ---- | ---- | ---- | ---- | ---- | ---- | | Filter | filter( denseVector, denseVector ) | | | | Bandpass Filter | filterBP( denseVector, (omega0, omega1), taps = 512 ) | | | | Bandstop Filter | filterBS( denseVector, (omega0, omega1), taps = 512 ) | | | | Lowpass Filter | filterLP( denseVector, omega, taps = 512 ) | | | | Highpass Filter | filterHP( denseVector, omega, taps = 512 ) | | | | Median Filter | filterMedian( denseVector, windowLength ) | | |

Clone this wiki locally