ptrain
Manual Reference Pages - PTRAIN (1)
ptrain - generate a pulse train of binary shorts.
CONTENTS
Syntax
Description
Examples
Copyright
SYNTAX
ptrain [arguments] [file]
DESCRIPTION
Generate periods of a pulse train in binary 2-byte numbers to the givenwaveform duration.A period in samples is computed (using the "period" option in samples or intime units, in which case the period also depends upon the given samplerate),and "width" samples at the start of every period are output with the given"amplitude", the remaining samples in the period having zero amplitude.The pulse amplitude is the pulse height above the zero level, which isset by the offset option. The offset is "0" by default so that pulsesof any given amplitude are non-negative by default.The default output is 12 periods of an 8ms pulse train at 20KHz (ie with 160samples per period), with pulse width 4 samples and pulse amplitude 1024.
If a filename argument is given, then the period of the output pulse trainis taken from the file. Binary shorts read from the file are successiveperiods in samples, and periods are output until the file is empty.This enables pulse trains with modulated periods.
EXAMPLES
1. A pulse train with period 100 samples and pulse width 1 sample:
ptrain period=100p width=1p
2. A pulse train with period 8ms at 20KHz and pulse width 4 samples
ptrain period=8ms samplerate=20000Hz width=4p
COPYRIGHT
Copyright (c) Applied Psychology Unit, Medical Research Council, 1995
Permission to use, copy, modify, and distribute this software without feeis hereby granted for research purposes, provided that this copyrightnotice appears in all copies and in all supporting documentation, and thatthe software is not redistributed for any fee (except for a nominalshipping charge). Anyone wanting to incorporate all or part of thissoftware in a commercial product must obtain a license from the MedicalResearch Council.
The MRC makes no representations about the suitability of thissoftware for any purpose. It is provided "as is" without express orimplied warranty.
THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDINGALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALLTHE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGESOR 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 THISSOFTWARE.
| SunOS 5.6 | PTRAIN (1) | 14 September 1993 |