annotate 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
rev   line source
tomwalters@0 1 .TH GATE 1 "15 September 1993"
tomwalters@0 2
tomwalters@0 3 .SH NAME
tomwalters@0 4 gate \- gate specific numbers from the input stream.
tomwalters@0 5
tomwalters@0 6 .SH SYNTAX
tomwalters@0 7 gate [options] [file]
tomwalters@0 8
tomwalters@0 9 .SH DESCRIPTION
tomwalters@0 10
tomwalters@0 11 Numbers in the input stream within given gate ranges are replaced by a
tomwalters@0 12 particular <value>. Both time and amplitude ranges may be specified.
tomwalters@0 13 The <value> may be a real number or the result of a particular <operation>.
tomwalters@0 14 Results are written on the stdout in numbers of the same type as that
tomwalters@0 15 selected for input.
tomwalters@0 16
tomwalters@0 17 .SH OPTIONS
tomwalters@0 18
tomwalters@0 19 1. xrange, yrange
tomwalters@0 20
tomwalters@0 21 The `xrange' specifies the time range and the `yrange' specifies the
tomwalters@0 22 amplitude range for the gating operation. Ranges are specified:
tomwalters@0 23
tomwalters@0 24 .nf
tomwalters@0 25 xrange=a[-b]
tomwalters@0 26 yrange=a[-b]
tomwalters@0 27 .fi
tomwalters@0 28
tomwalters@0 29 The upper limit `b' is optional, and when it is missing then the range
tomwalters@0 30 is a single number, otherwise `a' and `b' are inclusive range limits.
tomwalters@0 31 The xrange limits are in samples (no units) or may take time units (s or ms),
tomwalters@0 32 in which case they are converted to samples using the given `samplerate'
tomwalters@0 33 option. The yrange limits are real numbers.
tomwalters@0 34 The strings "min" and "max" are recognised as extreme limits: the start and
tomwalters@0 35 end of the input stream for the xrange, and the most positive and negative
tomwalters@0 36 amplitudes for the yrange.
tomwalters@0 37
tomwalters@0 38 2. value
tomwalters@0 39
tomwalters@0 40 The <value> may be a real number or an <operation>,
tomwalters@0 41 in which case all input numbers within the gate range are operated on as
tomwalters@0 42 appropriate. Abbreviated forms of the operation names are allowed.
tomwalters@0 43
tomwalters@0 44 .nf
tomwalters@0 45 <operation>:
tomwalters@0 46 exclude exclude numbers in gate range from output
tomwalters@0 47 negate negate numbers in gate range
tomwalters@0 48 count print count of numbers in gate range on the stderr
tomwalters@0 49 .fi
tomwalters@0 50
tomwalters@0 51 3. type
tomwalters@0 52
tomwalters@0 53 The input and output datatype may be: char, short, int, float, double, ASCII.
tomwalters@0 54 Ascii input is taken to be one number per line.
tomwalters@0 55
tomwalters@0 56 .SH EXAMPLES
tomwalters@0 57
tomwalters@0 58 1. Replace all numbers <=0 by value 0 (ie. half-wave rectification).
tomwalters@0 59
tomwalters@0 60 .nf
tomwalters@0 61 gate yrange=min-0 val=0 file
tomwalters@0 62 .fi
tomwalters@0 63
tomwalters@0 64 2. Replace all numbers <=0 by their inverse (ie. full-wave rectification).
tomwalters@0 65
tomwalters@0 66 .nf
tomwalters@0 67 gate yrange=min-0 val=neg file
tomwalters@0 68 .fi
tomwalters@0 69
tomwalters@0 70 3. Gate the onset of a signal: replace the first 20ms with zeroes.
tomwalters@0 71
tomwalters@0 72 .nf
tomwalters@0 73 gate xrange=0-20ms yrange=min-max val=0 file
tomwalters@0 74 .fi
tomwalters@0 75
tomwalters@0 76 4. Exclude all numbers <=0
tomwalters@0 77
tomwalters@0 78 .nf
tomwalters@0 79 gate yrange=min-0 val=exclude file
tomwalters@0 80 .fi
tomwalters@0 81
tomwalters@0 82 5. Exclude all numbers >0
tomwalters@0 83
tomwalters@0 84 .nf
tomwalters@0 85 gate yrange=1-max val=exclude file
tomwalters@0 86 .fi
tomwalters@0 87
tomwalters@0 88 6. Delete lines 4 to 8 inclusive from ascii input (lines numbered 0,1,2,...)
tomwalters@0 89
tomwalters@0 90 .nf
tomwalters@0 91 gate type=ASCII xrange=4-8 yrange=min-max val=exclude file
tomwalters@0 92 .fi
tomwalters@0 93
tomwalters@0 94 7. Replace all numbers in the yrange -1 to +1 inclusive by 0
tomwalters@0 95
tomwalters@0 96 .nf
tomwalters@0 97 gate yrange=-1-1 val=0 file
tomwalters@0 98 .fi
tomwalters@0 99
tomwalters@0 100 8. Replace all instances of number 10 by -10
tomwalters@0 101
tomwalters@0 102 .nf
tomwalters@0 103 gate yrange=10 val=-10 file
tomwalters@0 104 .fi
tomwalters@0 105
tomwalters@0 106 9. Print a count of all numbers = 0
tomwalters@0 107
tomwalters@0 108 .nf
tomwalters@0 109 gate yrange=0 val=count file
tomwalters@0 110 .fi
tomwalters@0 111
tomwalters@0 112 10. Print a count of all numbers < 0
tomwalters@0 113
tomwalters@0 114 .nf
tomwalters@0 115 gate yrange=min--1 val=count file
tomwalters@0 116 .fi
tomwalters@0 117
tomwalters@0 118
tomwalters@0 119 .SH "SEE ALSO"
tomwalters@0 120 .LP
tomwalters@0 121 options edwave step merge
tomwalters@0 122 .SH COPYRIGHT
tomwalters@0 123 .LP
tomwalters@0 124 Copyright (c) Applied Psychology Unit, Medical Research Council, 1995
tomwalters@0 125 .LP
tomwalters@0 126 Permission to use, copy, modify, and distribute this software without fee
tomwalters@0 127 is hereby granted for research purposes, provided that this copyright
tomwalters@0 128 notice appears in all copies and in all supporting documentation, and that
tomwalters@0 129 the software is not redistributed for any fee (except for a nominal
tomwalters@0 130 shipping charge). Anyone wanting to incorporate all or part of this
tomwalters@0 131 software in a commercial product must obtain a license from the Medical
tomwalters@0 132 Research Council.
tomwalters@0 133 .LP
tomwalters@0 134 The MRC makes no representations about the suitability of this
tomwalters@0 135 software for any purpose. It is provided "as is" without express or
tomwalters@0 136 implied warranty.
tomwalters@0 137 .LP
tomwalters@0 138 THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
tomwalters@0 139 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
tomwalters@0 140 THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
tomwalters@0 141 OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
tomwalters@0 142 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
tomwalters@0 143 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
tomwalters@0 144 SOFTWARE.
tomwalters@0 145