qm [optional runfile name] or qmf [runfile runfile runfile]
Clear Frame Grid Hardcopy Interp. Levels Next Prev. Quit Run Set Traces View X-range Y-range Zoom
Within qm, select a menu choice by pressing the first letter of word (here in the help files you can click on a menu selection for more information on it, but in qm the mouse controls the markers for measuring the data). Alternatively, in qm you can highlight a menu item using the space bar and/or backspace (or erase) key, and then press RETURN to select the choice.
The mouse is used to move two markers on the display, to obtain time and voltage measurements from the displayed data. See MARKER SELECTION below for details. (If a dashed marker appears on the display, it indicates the end of the "usable window." Data after this marker are likely to be invalid due to window retriggering during the data capture. See dsepr(1) for details about trigger modes.)
Selections from the menu are made via the keyboard, however, and not via the pointing device. 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.
The other choice available from the Run menu is the Calc selection, which lets you perform several
calculations and operations on the frames in your currently selected runfile. You are asked for an expression,
which is evaluated on every trace in the run, using the frames you specify in the expression. The resulting
frame is then displayed. See CALCULATIONS below for more details. (qm menu)
Adjust-traces Calc-macro File Just-1-X Magnify Next-file Offset Prev-file Show-times Top-titles X-bars Y-bars
The Set/Adjust-traces selection allows you to enable or disable the automatic adjustment of trace lists to the number of frames in the run. When enabled, if the run being dis- played is a small one (less than 16 frames), then all frames in the run are displayed by automatically adjusting the trace lists specified by the Traces operation below. If there are more trace lists specified than there are frames, the last few lists are ignored. If there are less lists than frames, the last list is re-used as many times as needed for the extra frames. When this option is disabled, or when the run is large, the program displays as many frames as explicitly called for in the trace lists. (set sub-menu) (qm menu)
The Set/Calc-macro selection allows you to set or change any macro-instruction used by the Run/Calc operation. You are first prompted for the macro name. You can enter a new macro name, or the name of an existing macro. You can also leaf through the existing macro names by using the "up arrow" and "down arrow" keys on the graphics terminal. Once you enter a name, you are then prompted for the expression for that macro. For existing macros, the current expression is shown as the default value. You can enter any valid expression, as described under CALCULATIONS below. The new macro is saved in your qm calculation macro file, .qmcalcrc, in your home directory. If this file does not exist yet, it is created. The qm calculation macro file will contain def- initions for all your macros, whether predefined, or defined by yourself. Before this file is created in your home directory, macro definitions are obtained from, but not saved into, the system-wide qm calculation macro file, /usr/neuro/lib/.qmcalcrc. (set sub-menu) (qm menu)
The Set/File selection allows you to choose a new runfile to be displayed. You are prompted to enter the name of the file. Type in this name, then hit RETURN. The name can be given with or without the .frm suffix. If the selected file exists and is readable, qm selects it as the current run, and attempts to fetch and display the current frame, or the first frame in this run. Whether you are selecting a new run, or just reselecting the same run, the Set/File operation also clears the current markers, and resets the trace list and the X and Y ranges to their initial values, unless parameter saving is enabled. See QM PARAMETER SAVING below. (set sub-menu) (qm menu)
The Set/Just-1-X selection allows you to choose whether an X-axis scale bar should appear under each trace when the X-bars option is enabled, or whether just one X-axis scale bar should appear under the bottom trace. Disable this option for multiple scale bars. (set sub-menu) (qm menu)
The Set/Magnify selection allows you to choose the Y display range for a trace, as a factor of the original display range, calculated automatically when the run was selected. You are asked first for the trace number. Next, you are asked for a magnification factor. If the the number you enter is greater than 1, the Y range is magnified by the factor you give. If the magnification factor is between 0 and 1 (exclusive), the opposite occurs: the data will shrink in proportion to the factor you give. In either case, the data is automatically centered in the selected range, and will continue to be automatically centered as you go from one frame to another. To automatically center the data, the program looks at the first part of the trace to be displayed, up to the point where a fairly sharp rise is detected in the signal, and centers at the average of those initial data points. If the magnification factor you provide is exactly 1, then the Y range for this trace is zoomed out to the original display range, and the automatic centering is disabled. Also, setting the Y range for a trace by any of the other means available will also disable automatic centering. If you want the full display range, but want to keep automatic centering enabled, select a magnification factor close to, but not exactly 1, such as .9999. (set sub-menu) (qm menu)
The Set/Next-File selection allows you to choose a new run- file to be displayed. It does this by "incrementing" the current file name, to get the next file in a series. For example, if your current run is run001, qm will attempt to select run002. If the next file exists and is readable, qm selects it as the current run, and attempts to fetch and display the current frame, or the first frame in this run, just like the Set/File operation above. (set sub-menu) (qm menu)
The Set/Offset selection allows you to shift the X-axis scale bar(s) under the traces by a specified number of milliseconds. The "0" on the scale bar will be shifted to the time coordinate you specify, so a positive value indicates a shift to the right. (set sub-menu) (qm menu)
The Set/Prev-File selection allows you to choose a new runfile to be displayed. It does this by "decrementing" the current file name, to get the previous file in a series. For example, if your current run is run010, qm will attempt to select run009. If the previous file exists and is read- able, qm selects it as the current run, and attempts to fetch and display the current frame, or the first frame in this run, just like the Set/File operation above. (set sub-menu) (qm menu)
Show-times & Ahp-decay
Set/Show-times/Ahp-decay allows you to enable or disable the measurement of AHP duration and half-decay for all displayed traces. Once this option is enabled, set marker A to the time of onset, and marker B to the time of the peak. The AHP measurements based on these marker positions will be shown for each displayed trace. The displayed B-A values will represent the time to peak and peak heights. For an explanation of marker setting see MARKER SELECTION below. (set sub-menu) (qm menu)
Set/Show-times/Psp-rise allows you enable or disable the measurement of PSP half-width and 10-90% rise time for the displayed traces. Once this option is enabled, set marker A to the time of onset, and marker B to the time of the peak. The PSP time based on these marker positions will be shown for each displayed trace. The displayed B-A values will represent the time to peak and peak heights. For an explanation of marker setting see MARKER SELECTION below. (set sub-menu) (qm menu)
The Set/Top-titles selection allows you to enable or disable the display of titles at the top of the screen. By disabling them, you gain a few extra lines on the display, but lose some of the information. (set sub-menu) (qm menu)
The Set/X-bars selection allows you to enable or disable the display of X-axis scale bars under each trace (if the Just-1-X option is disabled), or the single X-axis scale bar under the bottom trace (if the Just-1-X option is enabled). (set sub-menu) (qm menu)
The Set/Y-bars selection allows you to enable or disable the display of Y-axis scale bars to the left of each trace. (set sub-menu) (qm menu)
You may also type in the word "all" to select all traces. The trace list is automatically set back to all when you select a new runfile, unless parameter saving is enabled. This selection also allows you to display several frames at once. You do this by specifying several trace lists, separated by semicolons. Each list applies to one frame. You can also follow any trace list with "/n" to repeat this list for the next n frames. Up to a total of 16 frames can be specified in this way. Here are a few examples.
all; all; all or all/3
0,1/2; 3; ; 0,2/2
The first and second examples are equivalent; they show all traces for 3 consecutive frames, starting with the current frame. The third example shows traces 0 and 1 for two frames, trace 3 for a third frame, nothing for the fourth frame, then traces 0 and 2 for the fifth and sixth frames (all starting with the current frame).
Note that when several frames are displayed at once, the title line and the frame description at the top of the display apply to the first frame in the group shown. For instance if the title indicates a deleted frame, it is the first frame of the group which is a deleted frame; the following frames may or may not be deleted.
When displaying a group of frames simultaneously, a subsequent Prev. or Next operation will move backward
or forward by the number of frames displayed simultaneously. If the current frame is close to the end of the
run, and there are not as many consecutive frames as you requested for display, the program will show the
frames that are there and leave the bottom part of the display blank. (qm menu)
In X-out Y-out
Zoom/In selection lets you use the pointing device to select the X and Y ranges to be displayed. After pressing "I" (for In), use the mouse to move the cursor to the desired position on the screen, then press button A to set one corner of a "bounding box," or press button B to set the other corner. Press "D" when you are done, and the area displayed in the bounding box will be blown up to fill the display area for the trace on which the box was placed. The X range selected affects all traces being displayed. The Y range selected affects only the trace on which the selection was made. (zoom menu) (qm menu)
Zoom/X-out sets the X range back to the full display window for frames in the current run. (zoom menu) (qm menu)
Zoom/Y-out selection sets the most recently changed Y range back to the full display range for that trace in the current run, as calculated when the runfile was selected. (zoom menu) (qm menu)
The markers appear on each trace displayed, as crosshairs indicating the selected X positions, and the levels (Y positions) at those points of the trace, or as vertical lines indicating only the X positions (this choice is set by the Levels parameter). The actual numerical values for the X and Y positions are also displayed for both markers, when they are set. The X values appear near the top of the display, and the Y values appear above each trace. If both markers are set, the X and Y differences (B-A) are also given.
You can also use button C on the pointing device to place a time reference marker on the display. If you do so, then the numerical values for the X positions of the A and B markers are calculated relative to this time reference point, rather than relative to the start of the data in the trace.
After setting either of the A and B markers, or the time reference marker, you can make fine adjustments to its position by pressing the "less than sign" key (<) to move it to the left, or the "greater than sign" key (>) to move it to the right. These adjustments apply only to the last marker placed with the pointing device.
If you select a new frame, via the Frame, Prev. or Next operations, the markers remain in their current X positions, and the Y positions are adjusted to fit the new data. You can remove either marker, or the reference, by setting it to the left of the beginning of the traces. The time reference and both markers are removed when you select a new runfile, unless parameter saving is enabled. They are also removed by the Clear operation.
If your pointing device is a joystick, it can be recalibrated, to eliminate cursor drift, by pressing joystick button
Among the parameters saved are the current frame number, the current list of traces to be shown, the interpolation, grid, and levels options, as well as several other options, and the current marker settings and X and Y display ranges.
Qm keeps track of whether you set the X and Y display ranges explicitly, or whether they were set
automatically to fit the data in the run being displayed. If you had set them explicitly, they will remained fixed
at their current set- tings until you change them again yourself, or you zoom them out to their automatically
scaled values. If they had been set automatically to fit the data in the current run, then they will be recalculated
automatically when you select a new run, so that they fit the new data.
Expressions are formed by combining simpler expressions with one of the operators below. An expression can also be a number, either a whole number or a real number (e.g. 1, 0.0, .2, 1.5e-2). For instance, the expression "F6", which means "frame number 6 in the current run", is made up of the operator "F", and the expression "6".
The operators are listed below. In this table, "expr" represents any valid expression. A or B or C the values of marker A, marker B, or the time reference marker, given as a number of points from the start of the frame. N expr the numeric variable selected by the integer expr (0 to 19). These twenty numeric variables can be used as temporary holding areas for results.
F expr the frame selected by the integer expr (1 to n, where n is the number of frames in the run). You can
also assign to frame n+1 to add a new frame to the run.
$ expr the macro's parameter selected by the integer expr (1 to n, where n is the number of parameters passed to the macro).
( expr ) the value of expr. Parentheses override operator precedence.
expr [ expr , expr ] or expr [ expr ] the first expr (a frame or sub-frame), sub- scripted by the other expr(s), to yield a sub-frame. If the second subscript is left off, the end of the frame is assumed. To get a single point, the same subscript must be given twice. (e.g. F6[A,A])
D expr the expr (a frame or sub-frame), differentiated.
I expr the expr (a frame or sub-frame), integrated.
S expr the expr (a frame or sub-frame), smoothed. The smoothing algorithm used is a simple three-point moving average.
- expr unary minus, yields the expr negated.
*@ expr unary reduction by multiplication, yields the product of the points in the expr (a frame or sub-frame).
/@ expr unary reduction by division.
+@ expr unary reduction by addition, yields the sum of the points in the expr (a frame or sub- frame).
-@ expr unary reduction by subtraction, yields an alternating sum.
m@ expr unary reduction yielding the minimum point in the expr (a frame or sub-frame).
M@ expr unary reduction yielding the maximum point.
expr * expr multiply the two exprs.
expr / expr divide the first expr by the second.
expr + expr add the two exprs.
expr - expr subtract the second expr from the first.
expr L expr shift the first expr (a frame or sub-frame) left by the number of points specified by the second expr (an integer).
expr R expr shift the first expr right by the number of points specified by the second.
expr Z expr low-pass filter the first expr (a frame or sub-frame) at the cutoff frequency specified by the second expr (in Hertz). The filtering algorithm used is a "Second-order, zero-lag Butterworth filter," which filters in two passes to eliminate phase-shift distortion. The cutoff frequency is limited to 2/5 of each trace's sampling rate, to avoid ringing.
expr m expr the smaller of the two exprs.
expr M expr the larger of the two exprs.
expr = expr the first expr (a frame or sub-frame, or a numeric variable) is assigned the value of the second expr.
expr ; expr separates multiple operations in one expres- sion. The first expr is performed, then the second. (Yields the value of the second expr.)
X name expr , expr , ... or X name expr or X name execute the macro of the given name, with as many arguments as it needs. Multiple argu- ments must be separated by commas.
Expressions can, in some instances, mix single numbers and frames. For example, you can multiply a frame by a scaling factor, or assign a number to a frame.
The operators above can be entered as either upper- or lower-case letters, with the exception of m and M, which are distinct operators. Macro names can be one or more letters, and are case sensitive. (e.g. "fred", "Fred" and "FRED" are three distinct macro names.)
When combining several operators in an expression, bear in mind that some operators take precedence over others, and that the expression will not necessarily be evaluated strictly from left to right. You can use parentheses to force a low-precedence operator to be evaluated before a higher precedence operator. The operator precedences are as follows, from highest to lowest, with equal precedences on the same line.
( expr ) highest precedence F, N, $ subscripting unary -, D, I, S, *@, /@, +@, -@, m@, M@ *, / +, - L, R m, M = , X ; lowest precedence
The reduction operators above yield a scalar value (a single number) from a vector (an array of numbers, i.e. a frame or sub-frame). For example, in the expression "F6 = F1 - (+@F1[A,B]) / (B+1-A)", the points in frame 1, from A to B inclusive, are added up. The resulting sum is divided by the number of points to get the mean level in the range, and the mean is subtracted from frame 1 and assigned to frame 6. Thus frame 6 is equal to frame 1 shifted vertically such that the range between A and B is zero. Reduction operators are used in several of the pre-defined macros listed below.
There are five pre-defined macros that are built-in to qm, and cannot be changed.
Xdiv The div macro, called as Xdiv, gives the sample rate divisor of the trace for which the given expression is currently being evaluated.
Xend The end macro gives the index of the last point in the trace for which the given expression is cur- rently being evaluated.
Xsamprate The samprate macro gives the sample rate for the current run, in Hz.
Xadpermv The adpermv macro gives the calibration scaling factor of the trace for which the given expression is currently being evaluated, as A/D units per mV.
Xzeroad The zeroad macro gives the calibration offset of the trace for which the given expression is cur- rently being evaluated, as the A/D unit level for 0 Volts.
The following pre-defined macros are not built-in, but are simply defined in your .qmcalcrc file, and can be changed. Their initial definitions are obtained from /usr/neuro/lib/.qmcalcrc. They offer a convenient short- hand for some slightly more complex expressions.
Xmb n finds the minimum point in frame n before marker A. (Defined as "m@F$1[0,A]".)
Xma n finds the minimum point in frame n after marker A. (Defined as "m@F$1[A]".)
XMb n finds the maximum point in frame n before marker A. (Defined as "M@F$1[0,A]".)
XMa n finds the maximum point in frame n after marker A. (Defined as "M@F$1[A]".)
Xi n integrates frame n between marker A and marker B. (Defined as "F$1[A,B] = I F$1[A,B]".)
Xd n differentiates frame n between marker A and marker B. (Defined as "F$1[A,B] = D F$1[A,B]".)
Xs n smoothes frame n between marker A and marker B. (Defined as "F$1[A,B] = S F$1[A,B]".)
Xa n adjusts frame n such that the level at marker A is zero. (Defined as "F$1 = F$1 - F$1[A,A]".)
XA n adjusts frame n such that the average level at the first four points is zero. (Defined as "F$1 = F$1 - (+@F$1[0,3]) / 4".)
Xn n,m normalises frame n such that the displacement from zero at marker A is equal to the displacement from zero in frame m at marker B. (Defined as "F$1 = F$1 * (+@F$2[B,B] / +@F$1[A,A])".)
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.
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.
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 Interp. 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.
This selection allows you to plot the graph directly to the plotter. The hardcopy program is invoked to plot the dis- played 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.
This selection returns you to the previously displayed menu.
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.
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.
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 Hardcopy/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 Hardcopy/Video operation clears the menu area before per- forming the screen dump.
Normally, the only command line option given to qm is the name of the run to be viewed.
The command, "qm -dispmenus", will cause qm to print a listing of its hierarchy of menus, to the standard
output, then quit. In this mode, the graphics terminal is not required.
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 vari- able.
-geometry geometry By default, the program will create a window that cov- ers most of the display. However, you can specify cus- tom 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.
*.frm the frame file (or runfile) *.txt the run description *.frd the frame descriptions default.qm usual name for qm parameter file /usr/neuro/lib/.qmcalcrc system-wide qm calculation macro file /usr/neuro/lib/qm.hlp help file $HOME/.qmcalcrc user's qm calculation macro file
calibrate(1), cap(1), dsepr(1), frmsel(1), analysis(1), peel(1), raster(1), wtsum(1), hardcopy(1), sdump(1)
Name (to run type "xname framenumber")
area Calculates the area between the data line and a user defined baseline.
set cursor C (= reference point) to be the level at which you want the baseline to be set set cursor A as the point you want the area measurement to commence set cursor B as the point which at which you want the area measurement to end (in time) e.g. xarea 1
starea (name derived from 'startarea')
-for times when an estimate of the initial area might be obscured by an artifact, starea calculates the area of a right angled triangle from the baseline and time point denoted by C and the level at the time point of A. This is useful for example in estimating the first portion of the area produced by a short pulse of current. e.g. xstarea 1
totarea (name derived from "total area")
"totarea", performs both "area" and "starea" and sums the results to give you the total area.
The cursors are used as described for "area" and "starea". The level of C is used for the baseline by both "area" and "starea". e.g. xtotarea 1