annotate man/man1/edframe.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 EDFRAME 1 "1 September 1993"
tomwalters@0 2
tomwalters@0 3 .SH NAME
tomwalters@0 4 edframe \- Edit AIM output files.
tomwalters@0 5
tomwalters@0 6 .SH SYNTAX
tomwalters@0 7 edframe [[-]frame=a[-b]] [[-]time=a[-b]] [[-]freq=a[-b]] [file]
tomwalters@0 8
tomwalters@0 9 .SH DESCRIPTION
tomwalters@0 10 Read an AIM output file which must include a header.
tomwalters@0 11 Edit the file using the prescription given in the optional arguments to the
tomwalters@0 12 edframe program, and write the result on the stdout as a new AIM output file
tomwalters@0 13 with an appropriately modified header.
tomwalters@0 14
tomwalters@0 15 AIM output consists of one or more frames. AIM programs such as genwav, genbmm,
tomwalters@0 16 gennap, gensgm, gencgm, and gensas all generate a single frame of output
tomwalters@0 17 which may be graphically displayed as a single image. AIM programs such as
tomwalters@0 18 genasa, genepn, gensep, gensai, and genspl all generate multiple frames of
tomwalters@0 19 output which may be graphically displayed as a sequence of images in a time-varying
tomwalters@0 20 cartoon.
tomwalters@0 21
tomwalters@0 22 AIM output may be generated by:
tomwalters@0 23 .nf
tomwalters@0 24 genXXX output=on file1
tomwalters@0 25 .fi
tomwalters@0 26 which creates a file called file1.XXX. This can be edited to create a new
tomwalters@0 27 AIM output file by:
tomwalters@0 28 .nf
tomwalters@0 29 edframe [options] file1.XXX > file2.XXX
tomwalters@0 30 .fi
tomwalters@0 31 Alternatively the AIM output can be edited in situ by:
tomwalters@0 32 .nf
tomwalters@0 33 genXXX output=stdout file1 | edframe [options] > file2.XXX
tomwalters@0 34 .fi
tomwalters@0 35 Edited output may be displayed using the "useprevious" option, for example:
tomwalters@0 36 .nf
tomwalters@0 37 genXXX useprevious=on file2
tomwalters@0 38 .fi
tomwalters@0 39 Note that that file2.XXX must have a different base-name to the genXXX input
tomwalters@0 40 (file1) because genXXX will remove any file1.XXX as a side-effect.
tomwalters@0 41
tomwalters@0 42 Each frame is a matrix of numbers consisting of one or more rows and columns.
tomwalters@0 43 Rows and cols are numbered 0,1,2,..., with the origin (0,0) at the bottom-left
tomwalters@0 44 corner of the graphical image of each frame.
tomwalters@0 45 Editing functions select sub-sequences of frames (when the file consists of
tomwalters@0 46 multiple frames), and partition each of the selected frames using the
tomwalters@0 47 prescription given as program arguments.
tomwalters@0 48 The edited output consists of the selected sub-sequence of partitioned
tomwalters@0 49 sub-matrices. The format of the edited output file corresponds to that of the
tomwalters@0 50 respective input file, and the header is modified to describe the new frame
tomwalters@0 51 size.
tomwalters@0 52
tomwalters@0 53 .SH OPTIONS
tomwalters@0 54
tomwalters@0 55 1. time, freq.
tomwalters@0 56
tomwalters@0 57 These options prescribe the partition of each frame.
tomwalters@0 58 The partition output for each frame is a sub-matrix with width, height, and
tomwalters@0 59 origin with respect to the frame origin described in terms of rows and columns.
tomwalters@0 60 The time and freq options are ranges in the respective dimensions which are
tomwalters@0 61 converted to rows and columns internally. The ranges are given as:
tomwalters@0 62 .nf
tomwalters@0 63 time=a[-b]
tomwalters@0 64 freq=a[-b]
tomwalters@0 65 .fi
tomwalters@0 66 The upper limit `b' is optional,
tomwalters@0 67 and when it is missing then the range is a single value,
tomwalters@0 68 otherwise `a' and `b' are inclusive range limits.
tomwalters@0 69 The strings "min" and "max" are recognised as extreme limits, otherwise
tomwalters@0 70 the values of `a' and `b' are numbers with optional units.
tomwalters@0 71
tomwalters@0 72 The units of the time selector are s or ms
tomwalters@0 73 (seconds and milliseconds respectively), or samples (numbered 0,1,2...)
tomwalters@0 74 if no units are given. Options with time units are converted to samples internally using
tomwalters@0 75 the `samplerate' option.
tomwalters@0 76
tomwalters@0 77 The units of the freq selector are Hz or kHz
tomwalters@0 78 or filterbank channel (numbered 0,1,2...) if no units are given.
tomwalters@0 79 Options with frequency units are converted to channel numbers internally using the
tomwalters@0 80 filterbank parameters `mincf_afb', `maxcf_afb', `dencf_afb', and `channels_afb'
tomwalters@0 81 given in the AIM header. The channel number which is "closest" in terms of
tomwalters@0 82 centre frequency to the given frequency is chosen.
tomwalters@0 83
tomwalters@0 84 For most gen programs the time option controls the width of the partition in terms of
tomwalters@0 85 cols (or samples along the horizontal axis of the frame image) and the freq option
tomwalters@0 86 controls the height of the partition in terms of rows
tomwalters@0 87 (or filterbank channels up the vertical axis of the frame image).
tomwalters@0 88 The exceptions to this are
tomwalters@0 89 genwav (where the vertical axis contains just one wave), and the excitation
tomwalters@0 90 patterns genasa, genepn, and gensep in which frequency is measured
tomwalters@0 91 along the horizontal axis of the image, so that it is more appropriate for the
tomwalters@0 92 freq option to control the width of the partition in terms of cols
tomwalters@0 93 (or filterbank channels along the horizontal axis of the frame image).
tomwalters@0 94
tomwalters@0 95 In the case of gensai (and genspl) the horizontal (or spiral) axis measures
tomwalters@0 96 lag rather than absolute time, but the time option is used to control this
tomwalters@0 97 axis. (Note that time is measured from the left end of the frame image, which
tomwalters@0 98 is actually the maximum lag).
tomwalters@0 99
tomwalters@0 100 2. frame.
tomwalters@0 101
tomwalters@0 102 When the input consists of a cartoon of multiple frames
tomwalters@0 103 then single frames or a range of sequential frames may be selected from the
tomwalters@0 104 input using:
tomwalters@0 105 .nf
tomwalters@0 106 frame=a[-b]
tomwalters@0 107 .fi
tomwalters@0 108 The upper limit `b' is optional,
tomwalters@0 109 and when it is missing then the range is a single frame,
tomwalters@0 110 otherwise `a' and `b' are inclusive range limits.
tomwalters@0 111 The strings "min" and "max" are recognised as extreme limits, otherwise
tomwalters@0 112 the values of `a' and `b' are frame numbers: 0,1,2,...
tomwalters@0 113
tomwalters@0 114 The frame selector may also take time units (s, or ms) to specify frames
tomwalters@0 115 "closest" to the given time, being the frame number which is the greatest
tomwalters@0 116 integer multiple of the framestep (`frstep_epn' or `frstep_aid') which does
tomwalters@0 117 not exceed the given time, measured from the start of the input file.
tomwalters@0 118
tomwalters@0 119 3. info.
tomwalters@0 120
tomwalters@0 121 The option flag:
tomwalters@0 122 .nf
tomwalters@0 123 -info
tomwalters@0 124 .fi
tomwalters@0 125 causes frame size information to be printed on the stdout.
tomwalters@0 126 The option flag:
tomwalters@0 127 .nf
tomwalters@0 128 info=fbank
tomwalters@0 129 .fi
tomwalters@0 130 causes channel centre-frequency information to be printed on the stdout for
tomwalters@0 131 those channels selected by the `freq' option.
tomwalters@0 132 This may be used to discover the exact centre-frequency occupied by a given
tomwalters@0 133 channel number within a given filterbank, (as specified by
tomwalters@0 134 the filterbank parameters given in the input header).
tomwalters@0 135
tomwalters@0 136 4. Header.
tomwalters@0 137
tomwalters@0 138 The option flag:
tomwalters@0 139 .nf
tomwalters@0 140 Header=off
tomwalters@0 141 .fi
tomwalters@0 142 causes the modified header to be suppressed from the output.
tomwalters@0 143
tomwalters@0 144 5. Transpose.
tomwalters@0 145
tomwalters@0 146 The option flag:
tomwalters@0 147 .nf
tomwalters@0 148 Transpose=on
tomwalters@0 149 .fi
tomwalters@0 150 causes a matrix transpose (swap rows and columns) of the output
tomwalters@0 151 partition of each input frame.
tomwalters@0 152 When a frame partition has a height greater than it's width
tomwalters@0 153 (ie. cols < rows) then setting Transpose=on may provide a
tomwalters@0 154 preferable display orientation. For example, this enables
tomwalters@0 155 a very narrow (eg. single column) time-slice to be plotted
tomwalters@0 156 horizontally, so that a time-slice of filterbank output may
tomwalters@0 157 be plotted as a spectrum on a horizontal frequency axis.
tomwalters@0 158 In general the transpose option changes the file format of each frame
tomwalters@0 159 from column wise to row wise and vice versa.
tomwalters@0 160 A row wise format (ie. consecutive channels) may be a more useful form of
tomwalters@0 161 output from programs such as genbmm or gennap which normally use a column
tomwalters@0 162 wise output format.
tomwalters@0 163
tomwalters@0 164 .SH EXAMPLES
tomwalters@0 165
tomwalters@0 166 .nf
tomwalters@0 167 Selecting particular frames from AIM output.
tomwalters@0 168 .fi
tomwalters@0 169
tomwalters@0 170 1. Plot gennap output and its transpose.
tomwalters@0 171
tomwalters@0 172 .nf
tomwalters@0 173 gennap output=stdout ... | edframe > file1.sai
tomwalters@0 174 gennap output=stdout ... | edframe Tran=on > file2.sai
tomwalters@0 175 gensai useprevious=on file1
tomwalters@0 176 gensai useprevious=on file2
tomwalters@0 177 .fi
tomwalters@0 178
tomwalters@0 179 2. Select and plot frame 2 (ie. the 3rd frame) of gensai output.
tomwalters@0 180
tomwalters@0 181 .nf
tomwalters@0 182 gensai output=stdout ... | edframe frame=2 > file.sai
tomwalters@0 183 gensai useprevious=on file
tomwalters@0 184 .fi
tomwalters@0 185
tomwalters@0 186 3. Select the frames of gensai output which start between 16ms and 47ms from
tomwalters@0 187 the start of it's input. (When the option frstep_aid=16ms then this would
tomwalters@0 188 select the 2nd and 3rd frames).
tomwalters@0 189
tomwalters@0 190 .nf
tomwalters@0 191 gensai output=stdout ... | edframe frame=16ms-47ms > file.sai
tomwalters@0 192 .fi
tomwalters@0 193
tomwalters@0 194 4. Select the 5th to the last frame inclusively of gensai output.
tomwalters@0 195
tomwalters@0 196 .nf
tomwalters@0 197 gensai output=stdout ... | edframe frame=4-max > file.sai
tomwalters@0 198 .fi
tomwalters@0 199
tomwalters@0 200 5. Select the first frame of genepn output and plot the spectrum.
tomwalters@0 201
tomwalters@0 202 .nf
tomwalters@0 203 genepn output=stdout ... | edframe frame=min > file1.epn
tomwalters@0 204 genepn useprevious=on file1
tomwalters@0 205 .fi
tomwalters@0 206
tomwalters@0 207
tomwalters@0 208 .nf
tomwalters@0 209 Editing frames to select particular frequency ranges or channels (ie rows).
tomwalters@0 210 .fi
tomwalters@0 211
tomwalters@0 212 6. Select and plot the channel with centre-frequency closest to 1kHz from
tomwalters@0 213 gennap output.
tomwalters@0 214
tomwalters@0 215 .nf
tomwalters@0 216 gennap output=stdout ... | edframe freq=1kHz > file.nap
tomwalters@0 217 gennap useprevious=on file
tomwalters@0 218 .fi
tomwalters@0 219
tomwalters@0 220 7. Select and plot channel 40 then the channel with the lowest and then
tomwalters@0 221 the highest centre-frequency over all frames of gensai output.
tomwalters@0 222
tomwalters@0 223 .nf
tomwalters@0 224 gensai output=stdout ... | edframe freq=40 > file.sai
tomwalters@0 225 gensai useprevious=on file
tomwalters@0 226
tomwalters@0 227 gensai output=stdout ... | edframe freq=min > file.sai
tomwalters@0 228 gensai useprevious=on file
tomwalters@0 229
tomwalters@0 230 gensai output=stdout ... | edframe freq=max > file.sai
tomwalters@0 231 gensai useprevious=on file
tomwalters@0 232 .fi
tomwalters@0 233
tomwalters@0 234 8. Select and plot all channels of genbmm output from channel 10 to
tomwalters@0 235 the channel with centre-frequency closest to 1kHz inclusively.
tomwalters@0 236
tomwalters@0 237 .nf
tomwalters@0 238 genbmm output=stdout ... | edframe freq=10-1000Hz > file.bmm
tomwalters@0 239 genbmm useprevious=on file
tomwalters@0 240 .fi
tomwalters@0 241
tomwalters@0 242 9. Select and plot a portion of the spectrum from the first frame of genepn
tomwalters@0 243 output between 1kHz and 2kHz.
tomwalters@0 244 Note: frequency controls the horizontal (ie cols) dimension for genepn.
tomwalters@0 245
tomwalters@0 246 .nf
tomwalters@0 247 genepn output=stdout ... | edframe frame=min freq=1kHz-2kHz > file.epn
tomwalters@0 248 genepn useprevious=on file
tomwalters@0 249 .fi
tomwalters@0 250
tomwalters@0 251
tomwalters@0 252 .nf
tomwalters@0 253 Editing frames to select particular time slices (ie cols).
tomwalters@0 254 .fi
tomwalters@0 255
tomwalters@0 256 10. Plot column (ie sample) 100 of the 3rd frame of gensai output as a row.
tomwalters@0 257
tomwalters@0 258 .nf
tomwalters@0 259 gensai output=stdout ... | edframe frame=2 time=100 Tran=on > file.sai
tomwalters@0 260 gensai useprevious=on file
tomwalters@0 261 .fi
tomwalters@0 262
tomwalters@0 263 11. Plot column of sample at 20ms from start of gennap output as a row
tomwalters@0 264
tomwalters@0 265 .nf
tomwalters@0 266 gennap output=stdout ... | edframe time=20ms Tran=on > file.nap
tomwalters@0 267 gennap useprevious=on file
tomwalters@0 268 .fi
tomwalters@0 269
tomwalters@0 270 12. Edit a wave to select the stretch between 4ms and 16ms, strip the
tomwalters@0 271 header and plot the resulting wave.
tomwalters@0 272
tomwalters@0 273 .nf
tomwalters@0 274 genwav output=stdout ... | edframe time=4ms-16ms Header=off > file
tomwalters@0 275 genwav file
tomwalters@0 276 .fi
tomwalters@0 277
tomwalters@0 278
tomwalters@0 279 .nf
tomwalters@0 280 Editing frames to select partitions.
tomwalters@0 281 .fi
tomwalters@0 282
tomwalters@0 283 13. Plot a partition of channels 40 to 44 over the last 5ms (ie near the
tomwalters@0 284 trigger point on the right of the image) of all frames of gensai output.
tomwalters@0 285 Then plot a partition of frequency range 1kHz to 1.5kHz over the first
tomwalters@0 286 20ms (on the left of the image) of all frames of gensai output.
tomwalters@0 287
tomwalters@0 288 .nf
tomwalters@0 289 gensai pwidth=35ms nwidth=0 output=stdout ... | edframe time=30ms-max > file.sai
tomwalters@0 290 gensai useprevious=on file
tomwalters@0 291 gensai output=stdout ... | edframe freq=1kHz-1.5kHz time=min-20ms > file.sai
tomwalters@0 292 gensai useprevious=on file
tomwalters@0 293 .fi
tomwalters@0 294
tomwalters@0 295 14. Plot the highest-frequency channel over the last 20ms of gennap output.
tomwalters@0 296
tomwalters@0 297 .nf
tomwalters@0 298 gennap output=stdout ... | edframe freq=max time=20ms-max > file.sai
tomwalters@0 299 gennap useprevious=on file
tomwalters@0 300 .fi
tomwalters@0 301
tomwalters@0 302
tomwalters@0 303 .nf
tomwalters@0 304 Changing the aim output format.
tomwalters@0 305 .fi
tomwalters@0 306
tomwalters@0 307 15. Convert the genbmm output format (column wise) to row wise format, and
tomwalters@0 308 strip the aim header.
tomwalters@0 309 The resulting file will consist of consecutive blocks of N samples, where
tomwalters@0 310 N = length * samplerate.
tomwalters@0 311 The first block is the output from the lowest centre frequency channel,
tomwalters@0 312 the second is from the second channel, and so on.
tomwalters@0 313 By default the whole frame is transposed, but any partition of the frame
tomwalters@0 314 could be selected using the time and frequency options.
tomwalters@0 315 (Note: the transpose takes place after the partition has been made).
tomwalters@0 316
tomwalters@0 317 .nf
tomwalters@0 318 genbmm output=stdout ... | edframe Tranpose=on Header=off > file
tomwalters@0 319 .fi
tomwalters@0 320
tomwalters@0 321
tomwalters@0 322 .SH "SEE ALSO"
tomwalters@0 323 options hdr fbank
tomwalters@0 324
tomwalters@0 325 .SH COPYRIGHT
tomwalters@0 326 .LP
tomwalters@0 327 Copyright (c) Applied Psychology Unit, Medical Research Council, 1995
tomwalters@0 328 .LP
tomwalters@0 329 Permission to use, copy, modify, and distribute this software without fee
tomwalters@0 330 is hereby granted for research purposes, provided that this copyright
tomwalters@0 331 notice appears in all copies and in all supporting documentation, and that
tomwalters@0 332 the software is not redistributed for any fee (except for a nominal
tomwalters@0 333 shipping charge). Anyone wanting to incorporate all or part of this
tomwalters@0 334 software in a commercial product must obtain a license from the Medical
tomwalters@0 335 Research Council.
tomwalters@0 336 .LP
tomwalters@0 337 The MRC makes no representations about the suitability of this
tomwalters@0 338 software for any purpose. It is provided "as is" without express or
tomwalters@0 339 implied warranty.
tomwalters@0 340 .LP
tomwalters@0 341 THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
tomwalters@0 342 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
tomwalters@0 343 THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
tomwalters@0 344 OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
tomwalters@0 345 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
tomwalters@0 346 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
tomwalters@0 347 SOFTWARE.