Manual Reference Pages - GATE (1)
NAME
gate - gate specific numbers from the input stream.
CONTENTS
SYNTAX
gate [options] [file]
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.
OPTIONS
1. xrange, yrange
The xrange specifies the time range and the yrange specifies the
amplitude range for the gating operation. Ranges are specified:xrange=a[-b]
yrange=a[-b]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.<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 stderr3. type
The input and output datatype may be: char, short, int, float, double, ASCII.
Ascii input is taken to be one number per line.
EXAMPLES
1. Replace all numbers <=0 by value 0 (ie. half-wave rectification).
gate yrange=min-0 val=0 file
2. Replace all numbers <=0 by their inverse (ie. full-wave rectification).
gate yrange=min-0 val=neg file
3. Gate the onset of a signal: replace the first 20ms with zeroes.
gate xrange=0-20ms yrange=min-max val=0 file
4. Exclude all numbers <=0
gate yrange=min-0 val=exclude file
5. Exclude all numbers >0
gate yrange=1-max val=exclude file
6. Delete lines 4 to 8 inclusive from ascii input (lines numbered 0,1,2,...)
gate type=ASCII xrange=4-8 yrange=min-max val=exclude file
7. Replace all numbers in the yrange -1 to +1 inclusive by 0
gate yrange=-1-1 val=0 file
8. Replace all instances of number 10 by -10
gate yrange=10 val=-10 file
9. Print a count of all numbers = 0
gate yrange=0 val=count file
10. Print a count of all numbers < 0
gate yrange=min--1 val=count file
SEE ALSO
options edwave step merge
COPYRIGHT
Copyright (c) Applied Psychology Unit, Medical Research Council, 1995
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.The MRC makes no representations about the suitability of this
software for any purpose. It is provided "as is" without express or
implied warranty.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.
SunOS 5.6 | GATE (1) | 15 September 1993 |
Generated by manServer 1.07 from /cbu/cnbh/aim/release/man/man1/gate.1 using man macros.