Include alternate band-pass kernel as difference of low-pass kernels.

This commit is contained in:
Jesse D. McDonald 2013-11-11 04:40:28 -06:00
parent 31e73c0e56
commit a74748bbef
1 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,10 @@ bandPassKernel :: Double -> (Double, Double) -> Int -> Vector Double
bandPassKernel sr (lfc, hfc) ksize = bandPassKernel sr (lfc, hfc) ksize =
invertSpectrum $ bandRejectKernel sr (lfc, hfc) ksize invertSpectrum $ bandRejectKernel sr (lfc, hfc) ksize
bandPassKernel' :: Double -> (Double, Double) -> Int -> Vector Double
bandPassKernel' sr (lfc, hfc) ksize =
lowPassKernel sr hfc ksize - lowPassKernel sr lfc ksize
-- convolution = integral(kernel(t-tau)*input(tau),tau) -- convolution = integral(kernel(t-tau)*input(tau),tau)
-- t is output vector index (j); products and summation are done with dot product (<.>) -- t is output vector index (j); products and summation are done with dot product (<.>)
convolve :: Vector Double -> Vector Double -> Vector Double convolve :: Vector Double -> Vector Double -> Vector Double