WTSUM

Section: User Commands (1)
Updated:
Index
Return to Main Contents
 

NAME

wtsum - weighted sums of traces  

SYNOPSIS

wtsum [runfile]  

DESCRIPTION

Wtsum allows you to produce weighted sums of traces from a run of captured or averaged data. The traces are read from the specified runfile. If no runfile is specified, you will have to select one later. For good results, it is best to use averaged data, as the noise in the data tends to accumulate in the sum. Because wtsum expects you to work with averaged runs, it uses the terms "bin" and "frame" interchangeably. You can, however, use raw runs.

At the bottom of the display, wtsum prints the following menu prompt line:

Bin-select Clear-all Display Erase File-select Go Interpolate List Plot Quit Save Text Weighted-sum

An operation is initiated by typing a single letter, the first letter of an item in the menu line. You can also step through the menu using the space bar and the backspace (or erase) key, to highlight the item you want, then press RETURN to select that item.  

Bin-select

This selection allows you to pick one of the frames from the current runfile, (and the current trace) and store it in a waveform variable, for later use. If no file has yet been selected, or if the current trace number hasn't yet been selected, you will be prompted for them, as for File-select below.

You are then prompted to select the desired waveform. This is done by typing the single letter which corresponds to the waveform variable you wish to use, then hitting RETURN. Next, you are prompted to enter a list of frame numbers, which must be in the range indicated in the prompt. If you enter a valid frame number list, the current trace associated with the selected frame(s) will be read and stored in variable(s), starting with the selected variable. If no input is entered, or an invalid frame number list is specified, the variable(s) will not change, i.e. no new frame(s) will be selected. The format for this list is the same as the frame list format in frmsel(1).  

Clear-all

This selection allows you to quickly delete all the stored waveforms. It can be used when you wish to start working with a new set of waveforms, without having to restart the program.

If you have loaded any bins, or made any changes to the waveform variables, and you have not saved the data, you will be asked whether you want to do so now. If you answer Y, a Save operation (below) is performed, prompting you for a new runfile name, in which it will save all data. It will prompt for verification before proceeding to clear all data, as a safeguard against unfortunate accidents.  

Display

This selection allows you to display any one of the stored waveforms. You are prompted to select the desired waveform, by typing the single letter which identifies the waveform variable you wish to display.

The selected waveform will be displayed. The next Go or Plot selection will repeat this display, using the selected waveform variable.  

Erase

This selection allows you to delete any one of the stored waveforms. You are prompted to select the desired waveform, by typing the single letter which identifies the waveform variable you wish to delete. If the selected variable contains a waveform, this waveform will be deleted.  

File-select

This selection allows you to choose a new runfile so you can include some of its traces in the weighted sum. You are prompted to enter the name of the file. Type in this name, then hit RETURN. If the file is a valid runfile, the traces will be read from it whenever you use the Bin-select operation.

Next, you are prompted to select a trace number, since wtsum deals only with one trace at a time. If the number you enter is a valid trace number, you will then be able to read data from that trace.

You should be careful, when taking data from several files or several different traces, to ensure that the data are compatible, i.e. that the signal source, sampling rate (and its divisor), and calibration are the same in all files and all traces used. Wtsum does not check this, therefore the weighted sum produced may be meaningless if the data are not compatible.  

Go

This selection redisplays the last graph that was shown, either by the Display selection, or the Weighted-sum selection.  

Interpolate

This selection allows you to set the interpolation option. If this option is enabled, the data points of the displayed traces will be connected by line segments. If disabled, only the data points are displayed. Initially, this option is disabled.  

List

This selection allows you to get a list of the contents of each waveform variable. One line is printed for each stored waveform, giving the waveform code (single letter), the bin number, the trace number, the number of data points, the number of sweeps averaged together, and the name of the runfile from which the data were obtained.  

Plot

This selection brings you to the plotting sub-system, which presents you with a secondary menu. See PLOTTING below.  

Quit

This selection allows you to exit the program. If you have loaded any bins, or made any changes to the waveform variables, and you have not saved the data, you will be asked whether you want to do so now. If you answer Y, a Save operation (below) is performed, prompting you for a new runfile name, in which it will save all data.  

Save

This selection allows you to save all currently defined variables in a new runfile, for later analysis by wtsum, peel, raster, or qm. You are prompted to enter the name of the file. Type in this name, either with or without the .frm suffix, then hit RETURN. The frame file will be created if it does not already exist, or overwritten with the new data if it does exist. A corresponding frame description file is also created, to store the waveforms' text descriptions, as well as information about where the data originated.  

Text

This selection allows you to change the line of text displayed beside a waveform. You are prompted to select the desired waveform, by typing the single letter which identifies the waveform variable you wish to modify. The old text line is shown, and you are prompted to enter a new line of text. If a non-empty line is entered, it will replace the old text.  

Weighted-sum

This selection allows you to obtain a weighted sum or difference using any or all of the stored waveforms. All of the stored waveforms are first displayed. Then, for each of these waveforms, you are prompted to enter a weight. This weight can be any real value, including zero if you want this waveform to be ignored. (Zero is the default.)

Instead of entering a weight for any of these waveforms, you can enter a D, an N, or an X. This will not only exclude the waveform in question from the sum, but will remove it entirely from the final display.

The waveforms are then redisplayed, with the waveform for the weighted sum appearing at the bottom. The equation used to produce this waveform is displayed at the left of the waveform. Next, you will be asked if you want to keep the weighted sum in a waveform variable. If you answer with an N, meaning "no", you will be returned to the main menu. If you answer with a Y, meaning "yes", you will then be prompted to select the waveform variable, by typing the single letter which identifies the variable in which you want to save the sum. You should pick an unused variable, to avoid clobbering any of the waveforms currently on the display.

The next Go or Plot selection will repeat the display just produced.  

!command

Whenever the menu line has just been printed, instead of typing a letter to select a menu item, you can type an exclamation point, followed by any UNIX command, then hit RETURN. A UNIX shell is invoked to interpret and execute this command. You can recall and edit the last command entered, by hitting the "up arrow" key, or Control-K, after typing the exclamation point.  

$ or %

Whenever the menu line has just been printed, you can also type either a dollar sign ($), to invoke an interactive Bourne shell, or a percent sign (%), to invoke an interactive C shell. In either case, the shell will continue accepting commands until you type a Control-D, to exit from the shell, and return to wtsum.  

? or /

Whenever the menu line has just been printed, you can also type either a question mark (?), or slash (/), to get a short description of all choices available in the current menu.  

PLOTTING

The Plot selection is used to produce a plot similar to what would be displayed on the screen by the Go operation. A new menu is presented, allowing you to change certain plotting parameters. The choices are:

Axes Data File Interpolation Markers Plotter Quit Screen Text Video

Selections are made by typing the first letter of an item in this menu.  

Axes, Data, and Markers

These selections allow you to change the pen numbers used to plot axes, data points, and markers, respectively. You will be prompted to enter a pen number, an integer from 0 to 8. The three pen numbers are initially set to 1. Selecting pen number 0 suppresses plotting of those items.  

File

This selection allows you to store the HPGL commands used to plot the graph in a file. You will then be able to plot this graph, at a later time, by invoking hardcopy(1). You will be prompted to enter the file name. If you enter a file name, the graph will be stored in this file. If the file already existed, it will be overwritten.  

Interpolation

This selection allows you to change the plot interpolation option. If this option is enabled, the data points of the plotted graph will be connected by line segments. If disabled, only the data points are plotted. This is similar to the "Interpolate" option for the screen display, but is maintained as a separate option because it is common to want interpolation enabled for plotting, but not for the screen display.

Plotting with interpolation enabled allows the plotter to work much faster, with less wear on the pen.

 

Plotter

This selection allows you to plot the graph directly to the plotter. The hardcopy program is invoked to plot the displayed graph. Before beginning this operation, make sure the plotter is powered up, on-line, and that a clean sheet of paper has been loaded. Also make sure the plotter's autoload option is enabled.  

Quit

This selection returns you to the previously displayed menu.  

Screen

This selection allows you to change the screen redraw option. If this option is enabled, the graph will be redrawn on the screen while it is being sent to the file or the spooler. If disabled, the current contents of the screen will remain, while the plot is generated.  

Text

This selection allows you to change the plot text option. If this option is disabled, the generated plot will not contain any text; all titles and labels will be stripped from it, leaving only the axes, tick marks, data points, etc. This is useful when the plot is reduced in size to the point where the text would be illegible. If enabled, the generated graph will be complete with all titles and labels.  

Video

This selection does not affect the pen plotter, but instead produces a printed copy of the video display's current contents - a screen dump - by invoking sdump(1). The same thing can be accomplished by pressing the quit key, normally Control-B. The Plot/Video operation has the advantage that it can be used even when the program is reading its commands from a file, rather than the terminal. Also, the Plot/Video operation clears the menu area before performing the screen dump.  

X WINDOW SUPPORT

When the X Window version of this program is run on an X Window terminal, a new window will be shown for displaying program output. Unless the input was redirected from a file, it will be taken from the keyboard when this window is the "input focus", i.e. the active window. When running this way, it is essentially detached from the xterm window from which you run the command, and it can be run in the background.

As for most other X Window programs in this package, the following X command line options are accepted:

-cursor num
You can specify any cursor number (not cursor names) in the Standard Cursor Symbols described in the X Window System User's Guide using the -cursor or -curs option. The default value is 68, the left pointer symbol. This can also be specified using the CURSOR environment variable.
-display [host]:server[.screen]
By default, the host, server and screen, which identify your X terminal, are obtained from the environment variable DISPLAY. However, you can also specify them using the -display or -disp option. The host is the name of the machine or terminal, on which the window is to be created, server is the server number, and screen is the screen number (default is 0).
-fn font
You can specify any fixed-width font to be used for text display using the -fn or -font option. The default value is 9x15 if the window is at least 900 pixels wide initially, and fixed otherwise. This can also be specified using the SCRFONT environment variable.
-geometry geometry
By default, the program will create a window that covers most of the display. However, you can specify custom window dimensions and location using the -geometry or -geom option. The format of the geometry string is described in the X Window System User's Guide. This can also be specified using the GEOMETRY environment variable.
-iconic
This option will cause the program to start up in an iconified state, which can be reactivated by double-clicking on the icon.
-rev
This option will cause the program to use reverse video in its display window.
-title name
This option will change the name shown on the window's title bar, which is usually just the program name. It can also be given as -name name.
 

NOTES

Wtsum should be run from a graphics terminal, or X terminal, in order to view generated graphs. It can be run from other types of terminals, to plot out graphs, but no graphs will be generated on screen.  

SEE ALSO

analysis(1), peel(1), raster(1), qm(1), frmsel(1), hardcopy(1), sdump(1)
 

Index

NAME
SYNOPSIS
DESCRIPTION
Bin-select
Clear-all
Display
Erase
File-select
Go
Interpolate
List
Plot
Quit
Save
Text
Weighted-sum
!command
$ or %
? or /
PLOTTING
Axes, Data, and Markers
File
Interpolation
Plotter
Quit
Screen
Text
Video
X WINDOW SUPPORT
NOTES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 17:58:07 GMT, February 20, 2019
Copyright © G. R. Detillieux, Spinal Cord Research Centre, The University of Manitoba.