QUICK MEASURE Users' Guide

qm [optional runfile name] or qmf [runfile runfile runfile]



DESCRIPTION
Qm, the "quick measure" program, allows you to quickly leaf through the frames (NOT waveforms) in a run of data captured by one of the capture programs (dsepr(1)), or a run of averaged data from analysis(1) or wtsum(1). It can display several traces on screen and allows you to make time and voltage measurements of the data, using the mouse. Qm also allows you to do more advanced types of data manipulation. For instance, you can measure the area under a trace (e.g. of a PSP or of a conductance pulse), automatically find where the maximum or minimum voltage occurs on a trace, or integrate a trace.
If you type "qm [filename]" qm will start and then perform a Set/File operation on this file. If no runfile is specified, you will have to select one later (using Set/File... see below).
Qmf repeatedly calls qm for each runfile argument given. Whenever you tell qm to quit, it will be restarted with the next runfile, until all files have been examined.When you call qmf with no runfile arguments, it will call qm with the most recently modified run in the current directory.



USING QM
At the bottom of the display, qm prints the qm main menu (click on a choice for more info):

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.



Clear
This selection clears all of the event markers on the display, as well as their associated time and voltage measurements. To clear just one marker (e.g. A, B or C), move the mouse to the left of the trace (behind the Y axis) and click the appropriate button instead of using 'clear'. (qm menu)


Frame
Specifies the frame to view in the current run. You are asked for the desired frame number, which is a number from 1 up to and including the total number of frames in the current run. The selected frame is fetched and displayed. It becomes the current frame; a subsequent Prev. or Next operation will fetch and display the frame immediately preceding or following this frame. Even if the selected frame has been deleted by frmsel(1), it will still be fetched and displayed. An indicator appears on the top line of the display when a deleted frame is being viewed. If a run description was provided after the run was captured, it will appear on the second line of the display. This line will also contain the frame description for the range of frames in which this one falls, if any description was provided during the capture. When displaying a group of frames simultaneously, the frame you specify here will be the first of the group (see Traces below). A subsequent Prev. or Next operation will move backward or forward by the number of frames displayed simultaneously. (qm menu)


Grid
This selection allows you to set the grid overlay option. If this option is enabled, the traces will be drawn inside a grid. If disabled, the grid is not displayed. Initially, this option is disabled. The grid spacing is automatically calculated, based on the ranges for the X and Y axes. When a dense grid spacing is being used, the screen redraw is slowed down somewhat. In this case, you may want to temporarily disable the grid, to quickly skim through frames. (qm menu)


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


Interp.
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.(qm menu)


Levels
This selection allows you to set the "level markers" option. If this option is enabled, the markers on the displayed traces appear as a crosshairs pattern, indicating both the time values and the associated levels. If disabled, only the vertical lines are displayed, indicating just the time values. Initially, this option is enabled. (qm menu)


Next
Next moves you to the next frame or group of frames (i.e. increments Frame by "1"). This allows you to skim through frames, one at a time, in a forward direction. If you are already at the last frame in the run, then this selection will bring you to the first frame in the run. When displaying a group of frames simultaneously, the Next operation will move forward by the number of frames displayed (see Traces below). If you are near the end of the run and there are not as many consecutive frames as you requested for display, it will show the remaining frames and leave the bottom of the display blank. (qm menu)


Prev.
Changes the display to the previous frame, allowing you to skim through frames, one at a time, in a backward direction. If you are already at the first frame in the run, then this selection will bring you to the last frame in the run. When displaying a group of frames simultaneously, the Prev. operation will move backward by the number of frames displayed (see Traces below). If you are already too close to the first frame to back up by this number of frames, it will begin the display with the first frame. If you are already at the first frame in the run, then this selection will display the last complete group of frames from the end of the run. (qm menu)


Quit
This selection causes the program to terminate. If you have changed any qm parameters, you will be prompted as to whether you want to save the changed parameters. If you say "Y" it will write/overwrite a file called "default.qm" in the current directory. In general, it is usually preferable NOT to save the changed qm parameters every time you exit since the cursor positions and any zoom that you have done will probably be inappropriate for the next file you are looking at. (Also, for example qm is started automatically following data capture using cavg). If you want to get rid of qm parameters that were previously saved, you can either start qm and change the parameters to the desired values and then save them as "default.qm", or you can delete (or rename) "default.qm" at the unix command prompt (on subsequent startup qm will then not see a "default.qm" and will start with all of its default parameter settings). Of course, sometimes if you are comparing the exact same event on data collected the same way, saving the appropriate qm parameters can save you a lot of time (just do Set/File to the next runfile). (qm menu)


Run
This selection allows you to quickly run another program on your currently selected runfile. You are presented a menu of programs to choose from, including analysis, peel, raster, and wtsum. The program you select will be called up, with your current runfile as an argument. Once you quit that program, you are returned to the main menu of qm.

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)



Set
The "set" sub-menu allows you to set various parameters that aren't on the main menu. After you correctly set any of these, you are returned to the qm main menu. (qm menu)

Adjust-traces Calc-macro File Just-1-X Magnify Next-file Offset Prev-file Show-times Top-titles X-bars Y-bars

Adjust-traces
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)

Calc-macro
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)

File
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)

Just-1-X
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)

Magnify
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)

Next-file
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)

Offset
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)

Prev-file
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)

Psp-rise
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)

Top-tiles
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)

X-bars
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)

Y-bars
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)



Traces
This selection allows you to choose which traces will appear on the display, and in which order they will appear. You are asked for the list of trace numbers. Enter a line containing one or more trace numbers, each separated by one comma and/or one or more blank spaces. Ranges of traces can be specified by two numbers separated by a colon or dash.
For example entering; 2-4, 0 6 -will cause traces 2, 3, 4, 0 and 6 to be displayed, in that order.
Non-existent traces that are called for are simply ignored.

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)



View
This selection allows you to view the run's header information and trace calibration information, or the run's frame description file.


Calibration
The View/Calibration selection will display the contents of the run's header, such as the run length, number of frames, and calibration information for each trace in the run.


Text
The View/Text selection will display the contents of the run's frame description file, if one exists. This lets you see the descriptions for every range of frames, which were entered during the data capture, by pausing the capture of triggered channels after each range of frames. Seeing these descriptions should help you choose the frames you want to view. (qm menu)


X-range
This selection allows you to clip the data displayed, on the left or right sides, in order to zoom in on a specific section. You are asked first for the lower bound (left cutoff point), then for the upper bound (right cutoff point). Both of these are specified in milliseconds. The selected portion of the traces is redisplayed. These parameters are set back to the full range when you select a new runfile, unless parameter saving is enabled. (qm menu)


Y-range
This selection allows you to change the Y values displayed for any trace and allows you to expand part of the display. First you are asked for the trace number, next, you are asked for the lower bound, then lastly, the upper bound for this trace. Both of these are specified in the units used on the trace's scale bar, either millivolts or A/D units. The trace is then redisplayed, using the selected range of levels. Unless parameter saving is enabled, when you select a new runfile, the program automatically sets the range of levels for every trace, by looking at the first few and last few frames in the run. The ranges are set to include all the data in these frames, with a little room to spare. However, if the data in any trace fluctuates a lot, that trace may be clipped when other frames are viewed, unless you manually increase the range after selecting the runfile. An alternate method of selecting the Y display range for a trace is to copy the settings from another trace. After selecting Y-range from the menu, instead of entering a single trace number, enter a line of the form: n=m
where n is the number of the trace whose Y range you want to change, and m is the number of the trace whose range you want to copy. Instead of asking you for the lower and upper bounds, qm will simply take the settings from the second trace. (qm menu)


Zoom
This selection allow you to zoom the displayed range in and out using the mouse instead of having to manually enter the X-range and/or Y-range.

In X-out Y-out

In
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)

X-out
Zoom/X-out sets the X range back to the full display window for frames in the current run. (zoom menu) (qm menu)

Y-out
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)



!command
In qm, as with other SCRC software, whenever the menu prompt line appears at the bottom of the screen, if you type an exclamation point followed by any UNIX command and then RETURN (instead of typing the first letter of menu item), a UNIX shell is started to run the command. This can be done at any level in the menu hierarchy, except from the Zoom/In operation's menu. You can recall and edit the last command entered, by hitting the "up arrow" key, or Control-K, after typing the exclamation point. This feature is sometimes helpful for viewing a list of the the runfiles in the current directory ("!ls *frm") or figure out what the present working directory is ("!pwd")


$ or %
Whenever the menu prompt line appears at the bottom of the screen, 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 qm.


MARKER SELECTION
When traces are displayed on the screen, and the qm menu prompt line appears at the bottom, you have the opportunity to place markers on the displayed data. There are two markers, marker A and marker B. They are positioned by moving the mouse to the X coordinate where you wish to place a marker, and then pressing the appropriate mouse button A or B. They can be moved to new locations in the same way (you can also do fine adjustments using the left and right arrows to move left or right by one data point at a time).

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 D.



QM PARAMETER SAVING
Qm usually resets all of its parameters whenever it starts up, and whenever you select a new runfile. However, if the environment variable QMPARM is set to a file name, then qm will save all of its parameters in that file before quitting or before selecting a new runfile. It will then reload these parameters after a run is selected, and make use of these parameters rather than returning them all to their initial values. The usual name used for the parameter file is default.qm. Before saving its parameters in the file, qm will ask you whether it should or not.

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.



CALCULATIONS
The expressions you can enter to perform calculations and operations on frames, using the Run/Calc and Set/Calc-macro selections, are composed by putting together simple operators using an algebraic notation. For example, the expression "F6 = F2-F1" will subtract frame 1 from frame 2, and assign the difference to frame 6.

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])".)



ONLINE HELP
Typing a question mark (?) while either the Run/Calc or Set/Calc- macro menu items is highlighted, will cause the program to show a "help page" describing the operations and macros that can be performed. (This must be done at the menu, not at the prompts you get by actually making these selections from the menu.) The program will pause after each screen-full, waiting for you to hit a key. Hitting the ESCAPE key will get you out of the help facility, and back to the main menu. Any other key will cause the help page to continue being displayed. Once the text has been displayed, the program leaves you at the same menu item where you called up the help facility.


PLOTTING
The Hardcopy selection is used to produce a plot similar to what is currently displayed on the screen. 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 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.

Plotter
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.

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 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.



QUICKMEASURE OPTIONS

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.



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 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.



NOTES
Qm should be run from a Linux graphics terminal, or X Window system, in order to view data traces. It can be run from other types of terminals (or terminal programs), to plot out traces, but no traces will be displayed on screen.

FILES

*.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

SEE ALSO

calibrate(1), cap(1), dsepr(1), frmsel(1), analysis(1), peel(1), raster(1), wtsum(1), hardcopy(1), sdump(1)



Library of Calc macros that are pre-defined within the analysis system:



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

-output is given in µVsec (is same as mVmsec) -for "area", C is used only for the 'Y' level (not time) and A & B are only used for times, not levels

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

-as with "area", the output of "starea" is given in µVsec (same as mVmsec) -for "starea", only markers C & A are used, but the time and level of both is used to determine the size of the triangle.

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

-again, output is given in µVsec (same as mVmsec)