Content-type: text/html Manpage of filterVector

filterVector

Section: User Commands (1)
Updated: 10/23/02
Index Return to Main Contents
 

NAME

filterVector  

SYNOPSIS

#include NMatrixMult.h

void filterVector( int bandWidth, int filterLength, int8 outputLength, int padStart, int padEnd, flt8 *fourierFilter, flt8 *input, flt8 *output);

 

DESCRIPTION

This function calculates the convolution of a vector with a finite length kernel. That is to say that the kernel is zero beyond some point. The non-zero extent of the kernel is given by the input variable bandWidth.

This function takes the following inputs:

bandWidth
The time domain filter width in number of samples. This must be odd and is equal to (2*c + 1) where c is the maximum correlation length. That is to say that the time domain filter is assumed to be zero for t < -c or t > c.
filterLength
The size chunk that the FFT's will be done in. This is also the length of fourierFilter. This should be a power of two for best performance. Note that filterLength must be larger than 2*bandWidth, and can be much longer. For optimum performance filterLength should be the smallest power of two such that

filterLength / (ln(filterLength) + 1) >= bandWidth - 1.

But note that filterLength should not be longer than outputLength.

outputLength
The length of the output vector.
padStart
A logical indicator of whether the beginning of input should be padded with bandWidth/2 zeroes before filtering.
padEnd
A logical indicator of whether the end of input should be padded with bandWidth/2 zeros before filtering.
fourierFilter
The Fourier transform of the real even (i.e. symmetric about zero) time domain filter after it was zero padded to be of length filterLength.
input
The vector to be filtered.
-
If padStart and padEnd then input is of length outputLength, and it will be padded with zeros at the beginning and end of the vector when the convolution is computed.
-
If padStart and not padEnd then input is of length (outputLength + filterLength/2) and the beginning will be zero padded.
-
If not padStart but padEnd then input is of length (outputLength + filterLength/2) and the end will be zero padded.
-
If not padStart and not padEnd then input is of length (outputLength + 2*(filterLength/2)) and no padding will be done.
output
The filtered vector of length outputLength.
 

COPYRIGHT

Copyright (C) 2002 Christopher M. Cantalupo

invNMatrixMult is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Christopher Cantalupo <cmc@nersc.gov>

Send bug reports or comments to the above address.  

SEE ALSO

MADmap, NMatrixMult, invNMatrixMult, fftw, rfftw.


 

Index

NAME
SYNOPSIS
DESCRIPTION
COPYRIGHT
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 21:13:52 GMT, October 25, 2002