skip to primary navigationskip to content
 

ptrain


Manual Reference Pages  - PTRAIN (1)

NAME

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 given waveform duration. A period in samples is computed (using the "period" option in samples or in time 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 is set by the offset option. The offset is "0" by default so that pulses of any given amplitude are non-negative by default.

The default output is 12 periods of an 8ms pulse train at 20KHz (ie with 160 samples per period), with pulse width 4 samples and pulse amplitude 1024.

If a filename argument is given, then the period of the output pulse train is taken from the file. Binary shorts read from the file are successive periods 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 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 PTRAIN (1) 14 September 1993
Generated by manServer 1.07 from /cbu/cnbh/aim/release/man/man1/ptrain.1 using man macros.