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