tomwalters@0: .TH CONV 1 "1 September 1993" tomwalters@0: tomwalters@0: .SH NAME tomwalters@0: conv \- Convolution. tomwalters@0: tomwalters@0: .SH SYNTAX tomwalters@0: conv [options] signal_file impulse_response_file tomwalters@0: tomwalters@0: .SH DESCRIPTION tomwalters@0: The response of a linear filter to an arbitiary input signal is the tomwalters@0: convolution of the signal with the filter's impulse response. tomwalters@0: The `impulse_response_file' contains the impulse response which characterises the tomwalters@0: filter, and the result of the convolution operation is the response of tomwalters@0: that filter to the signal contained in the `signal_file'. tomwalters@0: tomwalters@0: The `signal_file' must consist of binary 16-bit numbers (ie. shorts). tomwalters@0: The `impulse_response_file' must consist of binary floats. tomwalters@0: The output signal is the same length as the input signal and is written on tomwalters@0: the stdout in binary 16-bit numbers. tomwalters@0: tomwalters@0: If the `signal_file' consists of an impulse train, then the output should tomwalters@0: be a repeated impulse response, ie. should be a repeated version of the tomwalters@0: `response_file'. tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: .SH OPTIONS tomwalters@0: tomwalters@0: 1. length tomwalters@0: tomwalters@0: The amount of the signal file to convolve in time units (s or ms) or in tomwalters@0: samples (no units). Time units are converted to samples using the given tomwalters@0: `samplerate' option. The string "max" is recognised as the remainder of tomwalters@0: input. tomwalters@0: tomwalters@0: 2. domain tomwalters@0: tomwalters@0: Select algorithm for convolution. In the time domain ("domain=time") the tomwalters@0: discrete convolution formula is applied directly as a local averaging tomwalters@0: operation on the input signal with weights obtained by time-reversing and tomwalters@0: shifting the impulse response. The impulse response is assumed to be zero tomwalters@0: for all time outside the given file. In the frequency domain tomwalters@0: ("domain=frequency") the FFT of the whole input signal is multiplied by a tomwalters@0: frequency response function (the FFT of the impulse response), and tomwalters@0: the result inverse FFT'd. tomwalters@0: tomwalters@0: 3. scale tomwalters@0: tomwalters@0: A scale factor for scaling the output. tomwalters@0: tomwalters@0: tomwalters@0: .SH "SEE ALSO" tomwalters@0: options smooth fft acf tomwalters@0: tomwalters@0: .SH COPYRIGHT tomwalters@0: .LP tomwalters@0: Copyright (c) Applied Psychology Unit, Medical Research Council, 1995 tomwalters@0: .LP tomwalters@0: Permission to use, copy, modify, and distribute this software without fee tomwalters@0: is hereby granted for research purposes, provided that this copyright tomwalters@0: notice appears in all copies and in all supporting documentation, and that tomwalters@0: the software is not redistributed for any fee (except for a nominal tomwalters@0: shipping charge). Anyone wanting to incorporate all or part of this tomwalters@0: software in a commercial product must obtain a license from the Medical tomwalters@0: Research Council. tomwalters@0: .LP tomwalters@0: The MRC makes no representations about the suitability of this tomwalters@0: software for any purpose. It is provided "as is" without express or tomwalters@0: implied warranty. tomwalters@0: .LP tomwalters@0: THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING tomwalters@0: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL tomwalters@0: THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES tomwalters@0: OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, tomwalters@0: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, tomwalters@0: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS tomwalters@0: SOFTWARE. tomwalters@0: