Option values: how to deal with convolution and filter padding.
Option values: how to deal with convolution overhangs.
Option values: how to deal with convolution and filter padding.
slices specific result ranges out of results for convolve, etc
Option values: window function for filter design.
This class is a converter for using breeze.
Convolves DenseVectors.
Convolves DenseVectors. Implementation is via the implicit trait CanConvolve[ InputType, OutputType ], which is found in breeze.signal.support.CanConvolve.scala.
DenseVector or DenseMatrix to be convolved
DenseVector or DenseMatrix kernel
implicit delegate which is used for implementation. End-users should not use this argument.
Correlates DenseVectors.
Correlates DenseVectors. Implementation is via the implicit trait CanConvolve[ InputType, OutputType ], which is found in breeze.signal.support.CanConvolve.scala. See breeze.signal.convolve for options and other information.
FIR filter design using the window method.
FIR filter design using the window method.
This function computes the coefficients of a finite impulse response
filter. The filter will have linear phase; it will be Type I if
numtaps
is odd and Type II if numtaps
is even.
Type II filters always have zero response at the Nyquist rate, so a
ValueError exception is raised if firwin is called with numtaps
even and
having a passband whose right end is at the Nyquist rate.
Portions of the code are translated from scipy (scipy.org) based on provisions of the BSD license.
Cutoff frequencies of the filter, specified in units of "nyquist." The frequencies should all be positive and monotonically increasing. The frequencies must lie between (0, nyquist). 0 and nyquist should not be included in this array.
The nyquist frequency, default is 1.
If true (default), the gain at frequency 0 (ie the "DC gain") is 1, if false, 0.
Whether to scale the coefficiency so that frequency response is unity at either (A) 0 if zeroPass is true or (B) at nyquist if the first passband ends at nyquist, or (C) the center of the first passband. Default is true.
Currently supports a hamming window breeze.signal.OptWindowFunction.Hamming, a specified window breeze.signal.OptWindowFunction.User, or no window breeze.signal.OptWindowFunction.None.
Filter input data with the specified kernel and options.
Filter input data with the specified kernel and options.
data to be filtered
filter kernel (argument of DenseVector[Double] will specify a FIR kernel with specified values).
whether to have overhanging values. See breeze.signal.OptOverhang
how to pad the values. See breeze.signal.OptPadding
(implicit delegate to perform filtering on specific Input data types)
Bandpass filter the input data.
Bandpass filter the input data.
data to be filtered
sequence of two filter band parameters, in units of the Nyquist frequency, or in Hz if the sampleRate is set to a specific value other than 2d.
default of 2.0 means that the Nyquist frequency is 1.0
number of taps to use (default = 512)
currently only supports OptKernelType.Firwin. See breeze.signal.OptDesignMethod
whether to have overhanging values when filtering. See breeze.signal.OptOverhang
how to pad the values when filtering. See breeze.signal.OptPadding
(implicit delegate to perform filtering on specific Input data types)
Bandstop filter the input data.
Bandstop filter the input data.
data to be filtered
sequence of two filter band parameters, in units of the Nyquist frequency, or in Hz if the sampleRate is set to a specific value other than 2d.
default of 2.0 means that the Nyquist frequency is 1.0
number of taps to use (default = 512)
currently only supports OptKernelType.Firwin. See breeze.signal.OptDesignMethod
whether to have overhanging values when filtering. See breeze.signal.OptOverhang
how to pad the values when filtering. See breeze.signal.OptPadding
(implicit delegate to perform filtering on specific Input data types)
Highpass filter the input data.
Highpass filter the input data.
data to be filtered
cutoff frequency, in units of the Nyquist frequency, or in Hz if the sampleRate is set to a specific value other than 2d.
default of 2.0 means that the Nyquist frequency is 1.0
number of taps to use (default = 512)
currently only supports OptKernelType.Firwin. See breeze.signal.OptDesignMethod
whether to have overhanging values when filtering. See breeze.signal.OptOverhang
how to pad the values when filtering. See breeze.signal.OptPadding
(implicit delegate to perform filtering on specific Input data types)
Lowpass filter the input data.
Lowpass filter the input data.
data to be filtered
cutoff frequency, in units of the Nyquist frequency, or in Hz if the sampleRate is set to a specific value other than 2d.
default of 2.0 means that the Nyquist frequency is 1.0
number of taps to use (default = 512)
currently only supports OptKernelType.Firwin. See breeze.signal.OptDesignMethod
whether to have overhanging valueswhen filtering. See breeze.signal.OptOverhang
how to pad the values when filtering. See breeze.signal.OptPadding
(implicit delegate to perform filtering on specific Input data types)
Median filter the input data.
Median filter the input data.
only supports odd windowLength values, since even values would cause half-frame time shifts in one or the other direction, and would also lead to floating point values even for integer input
specify OptOverhang.PreserveLength (default) or OptOverhang.None (result will be (windowLength -1) shorter) for OptOverhang.PreserveLength, the edges will feature symmetrical odd windows of increasing size, ie ( median( {0} ), median( {0, 1, 2} ), median( {0, 1, 2, 3, 4} )... )
Returns the frequencies for each tap in a discrete Fourier transform, useful for plotting.
Returns the frequencies for each tap in a discrete Fourier transform, useful for plotting. You must specify either an fs or a dt argument. If you specify both, which is redundant, fs == 1.0/dt must be true.
f = [0, 1, ..., n/2-1, -n/2, ..., -1] / (dt*n) if n is even f = [0, 1, ..., (n-1)/2, -(n-1)/2, ..., -1] / (dt*n) if n is odd
window length of discrete Fourier transform
sampling frequency (1.0/dt; specify default of -1 if using dt)
time step (CAUTION: 1.0/fs; specify default of -1 if using fs)
whether to return fourierShift'ed frequencies, default=false
Shift the zero-frequency component to the center of the spectrum.
Returns the discrete fourier transform of a DenseVector or DenseMatrix.
Return the padded fast haar transformation of a DenseVector or DenseMatrix.
Return the padded fast haar transformation of a DenseVector or DenseMatrix. Note that the output will always be padded to a power of 2. A matrix will cause a 2D fht. The 2D haar transformation is defined for squared power of 2 matrices. A new matrix will thus be created and the old matrix will be placed in the upper-left part of the new matrix. Avoid calling this method with a matrix that has few cols / many rows or many cols / few rows (e.g. 1000000 x 3) as this will cause a very high memory consumption.
DenseVector or DenseMatrix to be transformed.
implicit delegate which is used for implementation. End-users should not use this argument.
DenseVector or DenseMatrix
https://en.wikipedia.org/wiki/Haar_wavelet
Inverse shift the zero-frequency component to the center of the spectrum.
Returns the inverse fast fourier transform of a DenseVector or DenseMatrix.
Returns the inverse fast haar transform for a DenseVector or DenseMatrix.
Root mean square of a vector.
(Since version v.0.6) use fourierTr
(Since version v.0.6) use fourierTr
(Since version v.0.6) use haarTr
(Since version v.0.6) use iFourierTr
(Since version v.0.6) use iFourierTr
(Since version v.0.6) use iHaarTr
This package provides digital signal processing functions.