Mercurial > hg > aim92
view man/man1/gate.1 @ 0:5242703e91d3 tip
Initial checkin for AIM92 aimR8.2 (last updated May 1997).
author | tomwalters |
---|---|
date | Fri, 20 May 2011 15:19:45 +0100 |
parents | |
children |
line wrap: on
line source
.TH GATE 1 "15 September 1993" .SH NAME gate \- gate specific numbers from the input stream. .SH SYNTAX gate [options] [file] .SH DESCRIPTION Numbers in the input stream within given gate ranges are replaced by a particular <value>. Both time and amplitude ranges may be specified. The <value> may be a real number or the result of a particular <operation>. Results are written on the stdout in numbers of the same type as that selected for input. .SH OPTIONS 1. xrange, yrange The `xrange' specifies the time range and the `yrange' specifies the amplitude range for the gating operation. Ranges are specified: .nf xrange=a[-b] yrange=a[-b] .fi The upper limit `b' is optional, and when it is missing then the range is a single number, otherwise `a' and `b' are inclusive range limits. The xrange limits are in samples (no units) or may take time units (s or ms), in which case they are converted to samples using the given `samplerate' option. The yrange limits are real numbers. The strings "min" and "max" are recognised as extreme limits: the start and end of the input stream for the xrange, and the most positive and negative amplitudes for the yrange. 2. value The <value> may be a real number or an <operation>, in which case all input numbers within the gate range are operated on as appropriate. Abbreviated forms of the operation names are allowed. .nf <operation>: exclude exclude numbers in gate range from output negate negate numbers in gate range count print count of numbers in gate range on the stderr .fi 3. type The input and output datatype may be: char, short, int, float, double, ASCII. Ascii input is taken to be one number per line. .SH EXAMPLES 1. Replace all numbers <=0 by value 0 (ie. half-wave rectification). .nf gate yrange=min-0 val=0 file .fi 2. Replace all numbers <=0 by their inverse (ie. full-wave rectification). .nf gate yrange=min-0 val=neg file .fi 3. Gate the onset of a signal: replace the first 20ms with zeroes. .nf gate xrange=0-20ms yrange=min-max val=0 file .fi 4. Exclude all numbers <=0 .nf gate yrange=min-0 val=exclude file .fi 5. Exclude all numbers >0 .nf gate yrange=1-max val=exclude file .fi 6. Delete lines 4 to 8 inclusive from ascii input (lines numbered 0,1,2,...) .nf gate type=ASCII xrange=4-8 yrange=min-max val=exclude file .fi 7. Replace all numbers in the yrange -1 to +1 inclusive by 0 .nf gate yrange=-1-1 val=0 file .fi 8. Replace all instances of number 10 by -10 .nf gate yrange=10 val=-10 file .fi 9. Print a count of all numbers = 0 .nf gate yrange=0 val=count file .fi 10. Print a count of all numbers < 0 .nf gate yrange=min--1 val=count file .fi .SH "SEE ALSO" .LP options edwave step merge .SH COPYRIGHT .LP Copyright (c) Applied Psychology Unit, Medical Research Council, 1995 .LP Permission to use, copy, modify, and distribute this software without fee is hereby granted for research purposes, provided that this copyright notice appears in all copies and in all supporting documentation, and that the software is not redistributed for any fee (except for a nominal shipping charge). Anyone wanting to incorporate all or part of this software in a commercial product must obtain a license from the Medical Research Council. .LP The MRC makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. .LP THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.