tomwalters@0: .TH NAPTOSAI 1 "14 September 1993" tomwalters@0: tomwalters@0: .SH NAME tomwalters@0: naptosai \- NAP to SAI format conversion. tomwalters@0: tomwalters@0: .SH SYNTAX tomwalters@0: naptosai [arguments] [file] tomwalters@0: tomwalters@0: .SH DESCRIPTION tomwalters@0: tomwalters@0: The program expects to read an AIM header, and interprets input as one large tomwalters@0: frame in column-wise format (eg output from genbmm, gennap, etc.), to be tomwalters@0: divided into input frames according to the given options. tomwalters@0: Each frame is output in row-wise format (eg as if output from gensai). tomwalters@0: tomwalters@0: The options "start" and "length" specify the input file. tomwalters@0: The special option value length=max specifies all the input file from tomwalters@0: the given start to its end. tomwalters@0: The options "width" and "frstep" specify the framing. tomwalters@0: The width option is the width of each frame and the frstep option is the tomwalters@0: frameshift between successive frames in the input file. tomwalters@0: The special option value width=max specifies the input framewidth as equal tomwalters@0: to the given input file length, (and if this is also "max", then the tomwalters@0: input framewidth is the remainder of the input file). tomwalters@0: If frstep=0, then the output is one frame of given width from the given start tomwalters@0: of the input file. For example, use naptosai with width=max and frstep=0 tomwalters@0: to produce one SAI frame the same size as the input NAP. tomwalters@0: tomwalters@0: A new header is constructed, and most options in the input header are copied tomwalters@0: to the output header. Some parts of the header are changed for the output tomwalters@0: format: (frames, frameshift, framewidth, frameheight, framebytes). tomwalters@0: tomwalters@0: tomwalters@0: .SH EXAMPLES tomwalters@0: tomwalters@0: .nf tomwalters@0: 1. To convert a nap or a bmm output to a single frame of sai output: tomwalters@0: tomwalters@0: gennap length=64 output=stdout file | naptosai width=32ms frstep=0 > file.sai tomwalters@0: gensai top=1000 useprevious=on file tomwalters@0: tomwalters@0: genbmm output=stdout file | naptosai > file.sai tomwalters@0: gensai bottom=-100 useprevious=on file tomwalters@0: tomwalters@0: tomwalters@0: This uses special case of zero frstep to generate one frame of output with tomwalters@0: the given width. The default width is the given length, and the default tomwalters@0: length is the remainder of the input file. If the width=length, then the tomwalters@0: frstep is zero by default, and therefore the default process, (ie with no tomwalters@0: arguments), converts the whole of the input to a single SAI frame. tomwalters@0: tomwalters@0: Note, certain display parameters have different default values for different tomwalters@0: applications. The SAI display parameters should be set to the appropriate tomwalters@0: values, in order to plot the SAI on the same scale. For example: tomwalters@0: tomwalters@0: When the source application is NAP, set gensai top=1000 tomwalters@0: When the source application is BMM, set gensai bottom=-100 tomwalters@0: tomwalters@0: 2. To convert a nap output to multiple frames of sai output: tomwalters@0: tomwalters@0: gennap length=40 output=stdout file | naptosai width=32ms frstep=0.2ms > file.sai tomwalters@0: gensai top=1000 useprevious=on file tomwalters@0: tomwalters@0: The sai output can be plotted as a spiral, but it is best to set the tomwalters@0: display parameters as follows: tomwalters@0: tomwalters@0: gennap length=40 output=stdout dencf=1 width=500 height=500 file | tomwalters@0: naptosai width=32ms frstep=0.2ms > file.sai tomwalters@0: genspl useprevious=on pensize=2 file tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: 3. To convert a nap output to a sai format bitmap, to display an animated tomwalters@0: stream: tomwalters@0: tomwalters@0: gennap length=40 output=stdout file | naptosai width=32ms frstep=0.2ms > file.sai tomwalters@0: gensai top=1000 useprevious=on bitmap=on file tomwalters@0: review file tomwalters@0: tomwalters@0: The same can be done for the spiral display: tomwalters@0: tomwalters@0: gennap length=40 output=stdout dencf=1 width=500 height=500 file | tomwalters@0: naptosai width=32ms frstep=0.2ms > file.sai tomwalters@0: genspl useprevious=on pensize=2 bitmap=on file tomwalters@0: review file tomwalters@0: tomwalters@0: The plots show the nap moving though 8ms (40-32), in steps of 0.2ms, tomwalters@0: first in rectangular display, then in spiral-mapped display. tomwalters@0: .fi tomwalters@0: tomwalters@0: .SH BUGS tomwalters@0: None yet. tomwalters@0: .SH COPYRIGHT tomwalters@0: .LP tomwalters@0: Copyright (c) Applied Psychology Unit, Medical Research Council, 1995 tomwalters@0: .LP tomwalters@0: Permission to use, copy, modify, and distribute this software without fee tomwalters@0: is hereby granted for research purposes, provided that this copyright tomwalters@0: notice appears in all copies and in all supporting documentation, and that tomwalters@0: the software is not redistributed for any fee (except for a nominal tomwalters@0: shipping charge). Anyone wanting to incorporate all or part of this tomwalters@0: software in a commercial product must obtain a license from the Medical tomwalters@0: Research Council. tomwalters@0: .LP tomwalters@0: The MRC makes no representations about the suitability of this tomwalters@0: software for any purpose. It is provided "as is" without express or tomwalters@0: implied warranty. tomwalters@0: .LP tomwalters@0: THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING tomwalters@0: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL tomwalters@0: THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES tomwalters@0: OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, tomwalters@0: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, tomwalters@0: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS tomwalters@0: SOFTWARE. tomwalters@0: