This is the Main Menu area.********** Topics for first time documentation users:
Before using the Analysis program, read "introduction to SCRC data capture and analysis"
(accessed from the documentation web page). This defines the terms waveforms, frames
traces, used in this documentation and outlines some of the general principles of our software
suite.
Text in Brown is a recent addition by Dave; text in Red is something that Gilles changed or needs to look at. Text in Green needs expansion or clarification. If you make revisions to this document (and you're encouraged to do so) please highlight them in some way, indicating the colour you used here, so that your revisions can be found and reviewed quickly by others.
Analysis program usage
Help and other Commands
Other Programs used in conjunction with analysis
Plot Reset Set View - short descriptions of these options
Plot print data on HP printer or plotter. Export data in HPGL format
Reset
Set set various parameters required for display and analysis
View help screen showing context sensitive parameter listings
W.F.-activity create step cycles from bursts of activity in a waveform
Analysis Overview:
When the analysis program starts, the screen is blank except for the Top Menu. To see any
data or perform an analysis, an analysis method must be first selected and performed using the
GO command (i.e. type the letter "g"). The simplest "analysis" is a display of the continuous data
(i.e. the waveforms). This is called the "raw waveform display" and performed by typing
<esc>ARG (the Escape may not be necessary). This selects "raw" as the analysis method and
the GO displays the waveform data (see Raw-WF-display ). To learn how to display the trace
data see Raw-WF-display and the Frame&Trace-display and X-Y-scaling sections immediately
below.
In addition to the display of raw data, more than 48 analyses can be performed. Typically the
sequence of events, after selecting a run file to analyze, is:
1) select an analysis method, under the Analysis item of the Top (Main) Menu. Help pages
are available for any item under Analysis which sets the analysis method. see Help
2) select View/Required <esc>VR (type V, then R) to display an analysis-specific list of
parameters that must be set and the current values of relevant parameters.
3) select Go from the Top Menu, to perform the analysis.
To start learning about the available analyses, start with topics Raw-WF-display Frame&Trace-display X-Y-scaling Then go to the Analyses Directory for a listing of the types of analyses available.
Analysis sub-menu is used to choose the analysis method, that is the type of analysis that will be performed when you initiate the Go operation. This includes simple display of waveforms or traces. From the main menu, Depending on your choices, you may have to descend through several levels of menus before a method is chosen. Once the final choice is made, you are returned to the Top (main) menu.
The "Interpolation" parameter <esc>SDTI specifies whether linear interpolation should be performed on the displayed data. By default interpolation is enabled and should rarely need changing. If disabled, only the data points are shown. If enabled, the data points will be shown interconnected by line segments. The program normally interpolates only between points that are shown on the graph, and completely ignores points that are clipped out because they are out of Y scaling range. This may give certain graphs a very "broken" appearance. If both the "Interpolation" and the "Extend interpolation" <esc>SDTX options are enabled, then the program will perform partial interpolation between clipped points; line segments are drawn toward these points, up to the top or bottom of the graph. Main Menu
Bins-save (export data) Main Menu
Saving averaged data
If your current analysis method is a form of trace-averaging or waveform-averaging, this
selection allows saving the averages as a new run. The new runfile can be viewed or
further analyzed with analysis, qm, peel, raster, or wtsum. A common usage is to create an
average under one condition (e.g. locomotion), save it with Bins-save; create a second
average (e.g. control) and save it. Then use appendrun to put the two new runffiles
together and view them with qm (quickmeasure). You must supply a filename when asked.
The software now allows run names greater than ten characters on QNX or Linux systems.
The previous limit was set for Masscomp systems.
The number of bins that the data is averaged into is controlled by either "# bins - avg"
<esc>SAB or "# bins- graph" <esc>SGB depending on the analysis method. The new
frame file will contain all of these bins.
You will also be asked to supply a run description, with the current description shown as the
default value. If the "Display std dev" <esc>SDTS option is enabled, before being asked for
the filename, you are asked if you want to save the standard deviations along with the
mean data. If you do, the standard deviations are stored in the even numbered frames,
with the mean data from each bin in the odd numbered frames.
Saving the individual frames that would have made up the average
The "Preview averaged data" <esc>SAP allows saving either the raw or the averaged data
into a new file. If this option is enabled, you are prompted to save raw or averaged data
when doing the Bins-save. Saving "raw" data is useful for selecting a series of frames in a
run meeting some criteria (e.g. all those occurring during extension) and then exporting
these frames for further analysis.
If the "Preview averaged data" <esc>SAP option is enabled, and a trace or waveform
average is being performed, analysis will display every "sweep" that is being added into a
bin. After each screen-full, you are asked if you want to see more. A response of Y, or
Return will get you the next screen-full. A response of N will cause the rest of this operation
to be performed without previewing. Hitting the Escape key, instead of Y or N, will abort the
Go operation. After the last screen-full of raw sweeps, hitting any key will cause analysis to
clear the screen and display the averages.
Saving ASCII data values in a graph
If your current analysis method is a form of graph, a Bins-save will display the numeric
values used to generate the graph on the screen, and allow you to save these numbers in
an ASCII text file.
By default, only the Y-axis values are saved, but you can change this by setting the
"Number list format" <esc>SDN string to indicate which values you want. This string will be
output for each point in the graph, and any "x" or "y" in the string is replaced with the X or Y
value for that point. Some of the titles and labels on the graph are also saved in this file.
The information is first displayed on the screen, then you are prompted for the file name.
The file will be created if it does not exist, or overwritten if it does. To not save the
information, just hit Return without entering a file name.
By default, the ASCII values are printed with several on a line and each line is terminated
by a newline (or line feed) character. Number list format (<esc>SDN) can be used to
change the formatting of ASCII values saved to disk. For example entering "y \n" causes a
line feed character to be inserted after each Y value. Note that if the data file is exported to
Windows, some programs may complain about the absence of a carriage return character.
For example, a spreadsheet (eg. Quattro Pro) may give the message "input line too long"
when attempting to import an Analysis generated ASCII data file. One solution to this is
transfer the data from the Analysis computer (QNX or Linux) by FTP in ASCII mode (not
binary). Another solution is to first load the data into a program that doesn't care about line
lengths (e.g. a word processor, like Word Perfect) and save the file in Windows (or DOS)
text format.
If the output format string has been changed to include the new-line character, doing a
"Bins-save" will cause seemingly endless screens of ASCII values to be displayed on your
terminal (i.e. all data points are displayed). A work around for this annoyance is to do the
analysis (including the Go command) and save the parameter file (<esc>K). Then exit and
from the shell, give the command:
echo b | DISPLAY= TERM=dumb analysis saved_parameterfile > textfile
This command passes the "b" (Bin-save) command to analysis which saves the ASCII data
in "textfile". The user sees no output.
Saving ASCII data values in a trace average
There are times when you want to export the data in a trace to a spreadsheet or stats
program. After doing a Bin-save and creating a new runfile containing only the trace
average, the dumprun command can be used to display or save the data points as ASCII
values.
Calibration Main Menu
The calibration sub-system allows viewing and modification of the in-memory copy of the
calibration information for the current run of data. See CALIBRATION below. The fixcal program
can be used to permanently change calibration information and make changes in several files at
once.
Directory changes the current working directory. Main Menu
Go Main Menu
This selection attempts to perform the selected analysis. It will stop if it detects a parameter
which is needed, but has not been properly set. Only the first error is reported, even if several
parameters still need to be set. The View/Required operation will give you a list of all parameters
required for the current analysis method.
When checking the "Run file" parameter, it also checks that the run file is present and readable. It will reread the file if some other program has modified it. Runs of averaged data will be rejected for most analysis methods that involve traces, since they require the sample number from the frames of raw data. This number is not available in averaged runs, since an average has no inherent "time of occurrence." The only trace analyses allowed on an averaged run are "Trace averaging by frame list," "Trace averaging based on tag value," "Raw trace amplitude vs frame number," and Raw or Averaged "trace amplitude vs trace amplitude."
Once all parameters have passed the test, the analysis is performed, and the results are displayed. Unless the "Top title display" <esc>SDTT option has been turned off, The top two lines of the display should indicate the run file name, the run description, and the "Graph description" <esc>SDD string, as well as a few other statistics. The time range analyzed is shown at the top, with the file name, as is the frame range if applicable. See ANALYSIS METHODS for more details about the various analyses.
The first time the Go operation is invoked for a new analysis method, when the "Auto scale" <esc>SDSA option is disabled, the scaling parameters may be completely inappropriate. If they are set such that no data would be in range, the program will recalculate them, once, as though automatic scaling had been enabled. However, if any data points are in range, the scaling will not be altered. It is therefore usually a good idea for you to re-enable the "Auto scale" option when changing analysis method, or when changing parameters such that the display range will be altered. Main Menu
If the "Get cursor readings" <esc>SDTC option is enabled, the program will pause after every
"sweep" of data is displayed, to allow you to get readings from the data. In the case of raw
waveform display, the program will pause after each waveform is plotted. Remember that the
list of Waveforms plotted can be set <esc>SWL. Cursor commands are displayed at the bottom
of the screen. Remember that the cursors will only be shown after the next "Go" command.
Cursor commands: You can set two markers, A and B, to two different points on the data, by
using the pointing device to move the cursor to the desired position, then pressing either button
A or B. The X and Y coordinates for the markers are displayed above the menu. Pressing the
space bar will then cause the marker last set to advance to the next plotted point; the
Backspace key (or DEL key, if this is your erase key) will back up the marker to the previous
plotted point. Press button D when you are done, then the next sweep, if there is one, will be
displayed. (Button C is equivalent to typing a D). Typing Q will disable the "Get cursor readings"
option. Note that this option also affects other parts of the program, such as visual parameter
setting; it is not restricted to the Go operation. It is usually wise to disable this option as soon as
you are done with it, so it won't come back to haunt you later.
If the "Preview averaged data" <esc>SAP option is enabled, and a trace or waveform average is being performed, analysis will display every "sweep" that is being added into a bin. After each screen-full, you are asked if you want to see more. A response of Y, or Return will get you the next screen-full. A response of N will cause the rest of this operation to be performed without previewing. Hitting the Escape key, instead of Y or N, will abort the Go operation. After the last screen-full of raw sweeps, hitting any key will cause analysis to clear the screen and display the averages. Main Menu
Keep Main Menu
This selection allows you to save your current set of analysis parameters in a file, for later use.
This includes all parameters related to the various analyses, the display options, and the plotting
options. It does not include the waveform parameters, which are set and stored separately.
You will be prompted for a parameter file name. The current file, if one was loaded, is the
default. The file name suffix .prm is appended to the given file name, if it has no suffix. The
parameters are then saved in the named file, overwriting any previous contents.
Keep does not save waveform parameters. They are set and stored separately for each
waveform. (e.g. File_name.p01 for waveform #1). See the Waveform Parameter sub-menu for
discussion of waveform parameter sets. By using Virtual-W.F., you can maintain separate sets
of waveform parameters for what is really just one waveform. They are created by making a
new but "dummy" waveform in which parameters and calibration information are copied but not
the data itself. At present analysis has a 16 waveform limit that may interfere with attempts to
create multiple parameter sets.
Load Main Menu
This operation allows you to load in a new set of analysis parameters, from a file previously
created by the Keep operation described above. It can also be used to select a new run of data
to analyse, even if this run has no associated parameter file.
First, if any of your current parameters have been modified, analysis asks you if you want to save them. If you answer N, it will load the new ones, discarding the current ones. If you answer Y, it will perform a Keep operation, i.e. it will ask you in which file you want to keep your current parameters. It is important to pay close attention to the prompts, so you enter the right file name at the right time! If keeping parameters before loading, you're first asked for the file in which to save the current parameters, so if you enter the name of the file you want to load at this point, you'll end up overwriting it. This has been a cause of confusion and frustration.
Next, you are prompted for the name of the parameter file to load. Once the name is entered, the parameters will be loaded from the file, replacing your current set. If a file with the given name does not exist, and the name does not have the .prm suffix, then this suffix will be added to the name. After loading the parameters, the program attempts to open the run file whose name was stored in the parameter file. If it can't find the run in the location indicated, it looks for the run in the directory which contained the parameter file, as long as the base file name is the same for both files. The program checks for conflicting run file and parameter file names when you load parameters saved with this file name conflict. For example, if eng01.prm points to eng03.frm, instead of eng01.frm, you will be warned. This is to help catch errors caused by inappropriate use of the Set/File operation.
If, instead of giving a parameter file name, you give the name of a new run, with no associated parameter file, then the current set of parameters is cleared (all parameters are set back to their initial values, if any), and the named run is selected as the run to be analyzed. This is like performing a Reset/All operation, followed by a Set/File operation.
Maint Main Menu
This selection brings you to the run file and waveform file maintenance sub-system, which
presents you with a secondary menu. See MAINTENANCE. Operations include:
Blanking Change-descr. Differentiate Erase-W.F.
Filter Gen.-trigger Link-W.F. Reframe
Select-frames Trim
Plot is used to print averaged data or graphs or to save the plot files for later use by a graphics
program (Corel, Layout, etc.).This selection brings you to the plotting sub-system, which
presents you with a secondary menu. See PLOTTING.
Quit from the Main Menu allows you to exit the program (with confirmation).
This selection, from the Main Menu, allows you to exit the program. It first asks you for
confirmation. If you choose No, you will return to the Main Menu. If you choose Yes, the
program will terminate. Before exiting, if any analysis parameters have been modified, you are
asked if you want to save them. If you answer Y, a Keep operation is performed, prompting you
for a parameter file name.
A quit operation from any lower-level menu simply brings you up one level.
Reset Main Menu
This selection allows you to clear some or all of your current set of analysis parameters. The
choices are: All, to clear all parameters which make up a parameter file; Display-options, to clear
all parameters which control how data are presented on screen or plotted; and Required to clear
all parameters which are needed for the current analysis method. Note that a Reset/All clears all
analysis parameters, but leaves certain other parameters and options unchanged, such as
waveform parameters and the current waveform number.
Set Main Menu
This selection brings you to the analysis parameter setting sub-system, which lets you modify
the various parameters controlling the analysis and display of data. See ANALYSIS
PARAMETERS Setting Analysis Parameters and Script File.
View Main Menu
This selection displays the current settings of some or all of the analysis parameters. The most
common choice is View-Required which shows parameters needed for the current analysis
method (one screen). Parameters that must be set for an analysis but have no value are
indicated by a "?". Other choices are All, to see the current value of all parameters (takes
several screens) and Display-options, to view parameters controlling data presentation.
W.F.-activity Main Menu
This selection brings you to the waveform parameter setting sub-system, which lets you
examine and modify the parameters used in the analysis of activity on a particular waveform.
These parameters are associated with one of the current run's waveforms, and are stored in a
file with the same name as the current run, but with the suffix .pnn added, where nn is the
waveform number, as two decimal digits. It is possible to maintain several of these files, one for
each waveform of the current run. You must select a run to be analyzed before you can get at
the waveform parameters. You will first be prompted for the waveform number of the waveform
whose parameters are to be set. You are then presented with a new menu. See WAVEFORM
PARAMETERS for more details.
When you Quit from this menu, if you modified any of the waveform parameters, you are asked if you want to save these. A response of N will return you to the Main Menu, and the changes are lost. If you answer Y, you are then asked for the waveform number. Normally, you will want to use the default value, to keep the parameters in the same file as the one from which they were loaded. You can, however, enter a new number, to transfer parameters for one waveform to another waveform.
Overview: Set-Range
For all analyses, the parameters "Start of run" (Set/Range/Start) <esc>SRS and "End of run"
<esc>SRE limit the range of data to be analyzed. By default these are set to the minimum (0
ms) and maximum length of the run.
In all cases the last set range will be used for subsequent analyses. The easiest way to see what range is currently defined is to do a "raw" waveform display (<esc>ARG), The time range used in an analysis is shown on the top line, right after the run name. For any analysis using frames, the frame range is also shown on the display. The last used Range parameters are saved in the parameter file which, the next time the data file is loaded, automatically sets the ranges to the last used values.
Several new Set/Range options have been added. Set/Range/All is a shortcut for setting the range to min and max. Set/Range/Relative presents a new menu, where if one of the Start or End times is changed, the other follows along to preserve the same range length. This menu has "Half" and "Double" selections, to zoom in and out the current analysis range, keeping to the centre of the range. The Length can also be set from this menu.
The Set/Range/Visually selection allows setting the start time (keeping length the same) or
setting the length of the range. Fine adjustments can be made using the "<" and ">" keys.
"Undo" selection, under both Set/Range and Set/Range/Relative allow you to quickly revert to
the range used during the next to last "Go".
The arrow keys have been redefined in analysis, to quickly change the analysis range and redisplay. They can be used at the Main Menu level or any level; you do not need to go into the Set/Range Menu section to use them. Left and right arrows pan the display left or right through the data (equivalent to Set/Range/Prev. then Go, and Set/Range/Next then Go, respectively). Up and down arrows zoom in and out (equivalent to the Half and Double operations, then Go).
Except when zooming with the arrow keys, you must type G(o) after each change in range to redo the analysis over the new range. The"Go" in the Set Range menu is there for convenience. It is the same as quitting to the main menu and performing a Go.
Set/Range/Delete-sections.
This affects all analyses and is used to exclude portions of a run from analysis. A cursor pair is used to indicate the start and stop of a section to delete. A list of these pairs is created and this list used to exclude data from subsequent analysis. Note that data is not really deleted; this list can be changed or cleared as necessary. How these sections are excluded varies from one analysis method to another, and may depend on your parameter settings.
For example, for raw or averaged W.F. amplitude vs step cycle, W.F. activity start & stop time analysis, W.F. L.D.P. level vs cycle duration, and for any graph of something vs spike occurrence, entire cycles will be excluded. If any portion of these cycles falls in a deleted section. For graphs of W.F. activity burst or spike train duration vs cycle duration, any burst with a deleted portion will be left out.
Most other analyses will only exclude the portions they need, on a sample-by-sample or sweep-by-sweep basis, if they fall in a deleted section. Any analysis using traces, and all waveform averages, will delete sweeps if their associated "Phase selection window" falls in a deleted section. Analyses using W.F. level measurements falling in the "W.F. amplitude window" will not take these measurements if any portion of this window is deleted. Action potentials will be deleted individually if they fall in a deleted section, but some action potential analyses make use of waveform levels or use spike occurrence on the X axis, so the conditions above may apply. Finally, any spike interval or frequency graph will exclude any interval which overlaps, even partially, with a deleted section.
The Raw waveform display will show you the deleted sections as crossed-out boxes, if "Display crossings" and "Display both crossings" are enabled. (<esc>SWM and <esc>SWB)
Overview: Setting Cycles
Many of analyses are based on the phases of cycles occurring on a particular waveform.
Loosely defined, a cycle is any burst of activity on the waveform. Cycles can be low frequency
oscillations such as the envelope of ENG activity or the depolarization of a motoneuron during
locomotion. These are called duty cycles. In most cases the automatic and manual cycle
detection sections of the waveform activity menu are used to define cycles from low frequency
activity oscillations. Use <esc>Wn<cr>SCV (W.F.-activity n <cr> Set/Cycles/Visually where "n"
is the number of the waveform to be used for cycle definition, and <cr> means you hit Return
after entering the number and before the rest of the menu keystrokes) to begin cycle setting.
Cycles can also be defined by a single "spike" or a train of spikes (bursts of spike activity).
Spikes are shorter duration events such as action potentials or stimulus tags indicating stimulus
delivery. In most cases the window discriminator (W.F.-activity n/Set/Spikes/Visually) is used to
define spikes based on their amplitude above the baseline. A second type of parameter, the
"Spike train gap" parameter (<esc>Wn<cr>SSTG), defines an interval between spikes which, if
exceeded, indicates a new burst (train). All spikes within the interval between the first spike and
the end of the "Trains" parameter are considered as part of the same cycle. This needs to be
set even when single spikes define a cycle (<esc>Wn<cr>ST Automatic).
By default cycles are based on low frequency oscillations (duty cycles) (<esc>SCT No). The
"Base cycles on spike trains" option <esc>SCT must be set to Yes to use spikes as cycles.
A cycle can either span the start of one burst of activity to the start of the next, or go from the end of one burst to the end of the next. (The number of cycles is therefore one less than the number of bursts of activity in the range being analyzed.) The "Cycle W.F. #" parameter <esc>SCW selects the reference waveform in which the cycles have been defined. If the "Base cycles on stop time" option <esc>SCS is enabled (Yes), then cycles will start at the ends of activity bursts, rather than at the starts of these bursts. For example, if cycles are defined according to ENG activity in an extensor nerve and <esc>SCS is No, then a cycle triggered frame average (<esc>ATC) will produce a trace average of all frames occurring during extension, assuming you've set the "Percent of cycle active" parameter <esc>SCP to 100 (see Normalization). Setting <esc>SCS to Yes gives an average of all frames during the absence of extensor activity (hopefully, this is flexion). If the "Base cycles on spike trains" option <esc>SCT is enabled, then cycles will be based on bursts of spike activity on the selected waveform, rather than on its duty cycles. The <esc>SCS and <esc>SCT options with their "Yes" and "No" settings combine to give four possible types of cycles from any given waveform.
Cycle parameters can be set (one at a time) for many waveforms but only one can be used as the cycle reference. The "Cycle W.F. #" parameter <esc>SCW selects this reference waveform. The waveform parameters that you set, including cycle definitions, are saved by the program in a separate file with a ".pnn" extension (e.g. runfile.p03 contains the parameters for the third waveform). For more about these files and how you can have multiple sets of waveform parameters for a single waveform, see Maintenance-LinkWF.
Cycle-related (or spike-train related) waveform parameters are set using options under the "Waveform Parameter Sub Menu". For example, <esc>W6 loads WF #6 for cycle parameter setting. Assuming that WF #6 contains low frequency duty cycles (e.g. integrated ENG), Set/Cycles/Visually SCVA from under the Waveform menu (<esc>W6<cr>SCV) displays this WF and lets you use the mouse to operate a modified window discriminator in which the onset and offset of activity is used to determine the start and end of cycles. If the waveform is too squashed (i.e. divided into too many lines to easily see the activity), you can change this by setting the "Max W.F. section" option, <esc>Wn<cr>ST or <esc>SDWT. Choosing "max" as the time will put the entire range on one line; other values are allowed. The default is 5s which means that the selected analysis range is divided into 5s epochs plotted sequentially and one per line on the display. For a 50 second analysis range this would spread the waveform over 10 lines on the screen. Change to suit. A second waveform can be displayed to facilitate cycle selection. The second waveform to be overlaid is selected by <esc>SDWO. Choosing a blank waveform or "-1" disables second waveform display. After automatic cycle selection, choose Manual if needed to touch up any improperly defined cycles. The number of points per line in the waveform display is controlled by "Display resolution" <esc>SDWR or <esc>Wn<cr>SR . A low value will speed up the display process but is rarely needed nowadays because of increased computer speed. Use the default value (4000); See Example trace analysis
The program can treat the whole range to be analyzed as a single cycle by setting the "Cycle W.F.#" to -1. This is useful with certain cycle-based analyses, to view the data over the whole run instead of by cycle.
Overview: Normalization of cycle length Because the cycles can vary in length, they must be
normalized to the same length, so that both the starts and the ends of the cycles line up when
averages are created. For averages based on cycle phase, the normalization is always
performed. For graphs where the X-axis represents the cycle phase, normalization can be
enabled or disabled via the "Normalization" option, <esc>SGN. If disabled, only the starts of
cycles are lined up, and X values represent time from the start of the cycle. If enabled, both the
starts and ends are lined up, X values represent the position in the cycle, from 0 to 1, and the
cycle displayed may be repeated several times, as selected by the "Cycles on graph" parameter
<esc>SGC.
Recent changes to the program overcome a problem with the normalization procedure when creating Trace averages. The problem was that the software looked only at the trigger point of the frame to see if it occurred during a cycle; no attention was made to subsequent data points in the trace. Thus frames triggered near the end of the active phase portion of a cycle were considered as occurring in the active phase when in fact some of the data occurred in the inactive phase. The software now performs a more rigorous test before assigning frames to active or inactive phases. New parameters "Phase selection delay" and "Phase selection window" (Set/Cycles/In-phase/Delay and Window), control the assignment of triggered sweeps to specific phases of a cycle. The range of points included within the range determined by the delay and window parameters must fall entirely in a given cycle phase, or bin within a cycle, for the sweep to be used.
The cycle normalization technique can normalize active and inactive phases independently. This allows for averages to created with as many bins as desired in the active phase or in the inactive phase. This is controlled by a new "Percent of cycle active" parameter (Set/Cycles/Percent-active), and applies to cycle based trace or waveform averages, or graphs using normalized cycles. Setting this parameter to 100% produces averages during only the active phase (assuming <esc>SCS No), ignoring the inactive phase altogether. Setting this parameter to other values (e.g. 50%) will produces a normalized step cycle with that phase (e.g. half extension, half flexion). Note that if the locomotion was really a 70-30 phase, results would still be shown with a 50-50 split between active and inactive phases when the "Percent of cycle active" parameter is set to 50. This is because of the way the normalization is performed independently for each phase. Longer extension phases would get compressed, while the shorter flexion phases would be stretched. With reasonably regular locomotion and an inspection of the phase relationships (e.g. approx. 40% flexion and 60% extension in a run) a "Percent of cycle active" setting of other than 100 (60% in this example of using extension as the active phase) would result in a representative split of the phases in displayed results.
Note that a Percent-Active setting of 0 turns off independent normalization of each phase, so
that whole cycle normalization is carried out instead. Active and inactive phases are not
separated, and cycles are scaled linearly regardless of where activity ends within each cycle. In
this case, if the duration of the active phase is not consistent, relative to the length of each
cycle, average bins around the transition between active and inactive phases will not accurately
reflect that transition due to the differences in timing from one cycle to the next. This exists for
backward compatibility, so that you can reproduce results of analyses that were done before
this option was added.
Analysis-Overview Main Menu
Overview: Polar plots of normalized cycle graphs The "Cycles on graph" <esc>SGC parameter
can also be set to 0; one cycle will still be displayed, but it will be drawn as a polar plot. The
position in the cycle (usually the X coordinate) determines the angle where a point is drawn. The
angles are labeled around the graph, in degrees. An angle of zero gives some point directly
right of centre, 1/4 cycle is directly above centre (90 deg.), 1/2 cycle directly left (180 deg.), etc.
The Y coordinate determines the distance of the point from the centre of the graph. It is usually
a good idea to disable auto-scaling <esc>SDSA, and fix the Y-axis lower-bound <esc>SDSYL
at 0 for polar plots. The Y-axis labels appear in the upper-left quadrant of polar plots. They are
drawn using the same scaling as a one-cycle linear plot. You can easily switch between the two,
by alternating the "Cycles on graph" parameter between 0 and 1. Only normalized cycle graphs
make use of this parameter, so only they can be made into polar plots.
Analysis-Overview Main Menu
Overview: Spikes Many analyses are also concerned with spikes, or action potentials, on a
waveform. The "Spike W.F. #" <esc>SSWN parameter selects this waveform, and you must set
the spike-related waveform parameters for this waveform. Many of the action potential graphs
are concerned not only with individual spikes, but also with bursts of activity, or spike trains. In
those cases, you should also set the spike train related parameters.
See Waveform Parameter Sub Menu Analysis-Overview Main Menu
Overview: Statistics -- Standard deviation of graphs or averaged waveforms: When graphs of
averaged data are displayed, the "Display std dev" option <esc>SDTS controls whether the
standard deviation curves are shown along with the mean curve. Imminent mods will allow
display of either the Std deviation or the Std. error. If the "Histogram display" option <esc>SDTH
is enabled, instead of the usual graph, you will get a histogram showing the number of values
added to each bin in the average. If the "Show areas under curves" option <esc>SDTA is
enabled, the area under the mean curve is shown over the graph, as well as the areas under
the standard deviation curves, if these are displayed. (See also the "Std. deviation type"
parameter <esc>SDGS.)
Mean cycle durations are displayed when <esc>SWC is enabled (see "setting waveform markers" in the section: Raw Waveform Display)
Regression lines on graphs: Curvilinear regression can be performed on the data of any X-Y graph. The "Regression degree" parameter <esc>SGR can be set to the degree desired: 0 for no regression, 1 for linear regression, 2 for quadratic, etc. (up to 20). The regression line or curve will be drawn on the graph. A line of text above the graph will indicate the correlation coefficient (R2), the intercept (b), and the slope coefficients (m). Analysis-Overview Main Menu
Overview: Cursors for data measurements
Type a "." (period) on the keyboard to display cursors on Waveforms or Traces. Type "q" to
leave the cursor measurement system. This is a recent addition to the program.
OR <esc>SDTC Yes also turns on the cursors and leaves them on until <esc>SDTC No turns them off. Cursors will be shown AFTER the next "Go" command. This is the old way to use the cursors and usually offers no advantage over typing "." It is usually wise to disable this option as soon as you are done with it, so it won't come back to haunt you. Note that the cursor option also affects other parts of the program, such as visual parameter setting; it is not restricted to the Go operation.
When in the cursor mode and displaying waveforms or traces, the program pauses after each waveform is plotted to allow cursor measurements. In the case of Raw waveform display <esc>AR The list of Waveforms plotted can be set with <esc>SWL.
The cursors are moved with a three button mouse and the buttons labeled (left to right) A, B, C.
You can move the A and B cursors, to two different points on the data, by moving the arrow with
the mouse and pressing A or B to make the data reading on that point. Pressing the space bar
will then cause the marker last set to advance to the next plotted point; the Backspace key (or
DEL key, if this is your erase key) will back up the marker to the previous plotted point.
Mouse button C is equivalent to typing a D which terminates data measurements on this sweep
and moves to the next one (if any).) Disable further cursor reading by typing a "Q" or with
<esc>SDTC No.
Cursors behave differently in the Analysis and QM programs. In QM, all data (only traces are accessible within QM) are loaded into memory before display. This allows cursors to track data simultaneously on all traces. In Analysis, the data is loaded into memory one waveform (or trace) at a time and then displayed. This permits the display of many (up to 16) long waveforms on machines with limited RAM. The downside is that cursors can be positioned on only one trace or waveform at a time as they are loaded into RAM. Analysis-Overview Main Menu
Overview: Preview data (Raw data display of data being used to create the average)
If the "Preview averaged data" <esc>SAP option is enabled, and a trace or waveform average
is being performed, analysis will display every "sweep" that is being added into a bin when the
Go command is given. After each screen-full, you are asked if you want to see more. A
response of Y, or Return will get you the next screen-full. A response of N will cause the rest of
this operation to be performed without previewing. Hitting the Escape key, instead of Y or N, will
abort the Go operation. After the last screen-full of raw sweeps, hitting any key will cause
analysis to clear the screen and display the averages. The same raw data can also be saved
with the <esc> Bins-save command from the main menu if the "Preview averaged data"
<esc>SAP option is enabled. see Bins-save (export data) Analysis-Overview Main Menu
Overview: Raw waveform display <esc>ARG Main Menu
The simplest analysis is to display the waveforms captured by the Cap program. This is called
the "Raw waveform display". Like all analyses a <esc>G (Go) must be given before data is
displayed. By default all waveforms are displayed and for the entire length of the data run.
Change displayed Waveforms with "Raw W.F.# list" <esc>SWL. The waveforms are shown in
the order specified in this list and repetitions are allowed. For example <esc>SWL 13,2-5,13 will
display WFs 13 2 3 4 5 13 from top to bottom; "all" is a legal option.
The colour of waveforms can be changed from the default (blue) using the "Plot pens for W.Fs." parameter <esc>SDWP. Enter a list of colour numbers (1-8) in an order corresponding to the desired colours of the WF#s. Note that this list order is for the WF#s and not the WF list order. If fewer pen numbers are entered, the list repeats (starts over) until a pen is assigned to each waveform. For example entering 1 2 3 will make WF#0 black, #1 blue, #2 green, #3 black, #4 blue, #5 green, etc.
Pen numbers are: 1 black, 2 blue, 3 green, 4 red, 5 purple, 6 gold, 7 brown, 8 gray
(These are the default values, and can be changed via the SCRPENS environment variable.
Environment variables are setup at login by the .login or .profile file which in turn uses the
/usr/neuro/lib/setup.csh or setup.sh file for many of these variables including SCRPENS).
Note that setting the "Plot pens for W.Fs." parameter in this way overrides any setting of the
"Data pen" <esc>PD parameter for plotting from this analysis method.
From the Main menu, the arrow keys can be used to go to the next or previous range (right, left
arrows) right and to zoom in or out (down up arrows). Set Range also X and Y scaling
Briefly, the time range (data range) used for any analysis including the raw waveform display, is
selected by the parameters "Start of run" <esc>SRS and "End of run" <esc>SRE. The
difference between the Start and End times define a range of analysis. <esc>SRA zooms out to
the maximum extent (all of the run). The Next <esc>SRN. and Previous <esc>SRP. options
quickly show the preceding or following range. There is a Go command available from the
Set/Range menu that eliminates the need to Escape to the Main Menu each time. For other
options see Set Range
The "Absolute time scale" option <esc>SWA changes the X-axis scale to indicate either zero time (i.e. without regard to the beginning of the run, default option) or to indicate the start of the display from the beginning of the run. In both cases the plotted range is given in absolute units at the top of the screen near the file descriptor.
The Raw waveform display indicates where sections are deleted, if the "Display crossings" option <esc>SWM and "Display both crossings" <esc>SWB option are both enabled.
By default the program "connects the dots" (interpolates between points with line segments) for trace and waveform display. Change with <esc>SDTI Once displayed, the screen can be printed to a laser printer or exported to a plotter file in HPGL format. See the options are under the Plot menu.
Setting markers on Waveforms: Vertical markers can be plotted to help visualize
relationships between activity in different WFs. These markers usually indicate the start (or stop)
of step cycles in a reference waveform. Cycle lengths can also displayed. Crossings can only
be displayed and lengths measured if a step cycle has been defined in the reference WF.
The reference WF is selected with "Cycle W.F. #" <esc>SCW. Cycles (start and stop of activity)
are determined in the waveform activity menu of analysis using the window discriminator (along
with parameters for spike trains if desired). For further discussion of cycles see Setting Cycles
and for an example see Example trace analysis.
If the "Display crossings" option <esc>SWM (actually the M refers to Mark-crossings) is enabled, markers on the display will show where the cycles start, provided that the "Cycle W.F. #" parameter has been set, and the cycle related waveform parameters for that waveform have also been properly set. The "Display both crossings" <esc>SWB option adds a second set of slightly smaller markers showing the end of activity in each cycle. "Display cycle lengths" <esc>SWC will show the cycle lengths at the bottom of the display.
The overlap calculation will determine the percentage of activity common to cycles on multiple waveforms (Overlap). Cycle parameters for all waveforms of interest must be set first. When the "Calculate overlap" <esc>SWO option is enabled, it calculates and displays the overlap between activity in all waveforms in which cycles are defined, with respect to the reference waveform selected by Set/Cycles/Waveform <esc>SCWn.
Cursors If you type a "." (period) OR the "Get cursor readings" <esc>SDTC option is enabled, the program will pause after every waveform (or trace) is displayed, to allow cursor readings of the data. The period also does a Go automatically. When using <esc>SDTC the cursors will only be shown after the next "Go" command. See Cursor
Trace Display There is no corresponding "Raw trace display".
- Traces can be viewed with "Trace averaging by frame list" <esc>ATF with the "Preview
averaged data" option <esc>SAP set to Yes. (see Preview data)
- Traces can be displayed along with Waveforms (frame and trace display)
- Traces can be viewed by the Frame Select program which is accessible from the Maintenance
section of analysis (Maint-Sub Menul) and available as a stand alone program
http://www.scrc.umanitoba.ca/doc/scrchelp/frmsel.html
- Traces can be viewed with Quick Measure http://www.scrc.umanitoba.ca/doc/scrchelp/qm.html
Analysis-Overview
Overview: Combined Frame and Trace Display
To display both raw (unaveraged) waveforms and a raw trace, enable the "Mark frame positions
on W.F." option, <esc>SDWM or <esc>Wn<cr>SM Yes. This allows seeing which traces
correspond to a particular section of waveform data. The top quarter of the display will be used
to display sweeps from the trace selected by the "Amplitude trace #" <esc>SLTN. Only one
trace can be displayed along with the WFs. The sweeps (traces) are displayed vertically, and
the first point of each sweep is lined up with the time (on the waveforms below) at which the
frame containing the sweep was triggered. Deleted frames (see documentation on the frmsel
program http://www.scrc.umanitoba.ca/doc/scrchelp/frmsel.html) and frames whose tag values
are not in the "Tag list" <esc>ST are excluded. Also see comments on X and Y scaling. If the
trace selected by the "Amplitude trace #" doesn't exist, the frame positions are indicated, but no
sweeps are shown.
By default in analysis, traces are displayed vertically when <esc>SDWM is used to display traces. To change to a horizontal trace display use <esc>SDWL. This displays the last trace in the current analysis range horizontally. Normally this option is used when making a movie with traces and waveforms. You may find it useful at other times to expand the horizontal axis of one trace to the entire width of the screen. The vertical dimension of the window to be used for trace display in either vertical of horizontal mode can be changed from its default 25% using the "Trace display height" paramter <esc>SDWH (values in percent, e.g. 50).
Future enhancements will display the frame number for the traces displayed above the waveforms. Except for zooming in and out on ranges of data and using the Select-Frames subsection of Maintenance, there is presently no easy way to relate exact frame numbers to particular sections of waveforms. The range of frame numbers currently displayed is shown on the top right of the display. By judicious use of the arrow keys during and using Raw display (AR), one can quickly zoom in and out of the data and locate or note the specific frame numbers corresponding to waveform data.
Another way to determine the correspondence between waveforms and frames is to set the "Mark frame positions on W.F." option <esc>SDWM and then view the Range visually <esc>SRV. The display now shows the waveform selected by the "Range W.F. #" parameter <esc>SRW, and small dots indicating the occurrence of the start of the frames. This could be useful, for example, to estimate how many frames might be expected within an average or how many frames occurred when the waveform was active. If you set your range visually in this way, using the cursors displayed, you are shown the time range and frame range that are selected.
If the "Partial W.F. resolution" <esc>SWP option is enabled, the program will limit the resolution
of the displayed waveforms to the number of points specified by the "Display resolution"
<esc>SDWR or <esc>Wn<cr>SR parameter. This option is rarely used on Pentium class
machines. It was implemented to speed up an un-interpolated display, when you don't need the
full resolution. Note that the fetching of data is affected by this parameter and that data may be
lost (i.e. not displayed) by this procedure. Always compare the full resolution and partial
resolution displays. By default the program "connects the dots" (interpolates between points with
line segments) for trace and waveform display. Change with <esc>SDTI
Once displayed, the screen can be printed to a laser printer or exported to a plotter file in HPGL
format. See the options are under the Plot menu.
Overview: X and Y axis Scaling
For all of these analyses, the parameters "Start of run" Set/Range/Start <esc>SRS and "End
of run" <esc>SRE can be used to limit the range of data to be analyzed. This chooses the X
range for raw waveform display and the range for data analysis. By default the entire range is
selected. The X display of traces cannot be changed in analysis. Any trace averages that are
saved to disk can be viewed with the qm program where it is possible to change the X size of
traces for viewing. Traces can be trimmed shorter by creating a new run file using the trimfrms
program (see other programs).
Default units for time are in milliseconds but this can be changed setting the "Time units" <esc>SDUT parameter. To change default settings for time or other display options a new .analysis.prm is saved as explained in "Setting default parameter values".
By default the program chooses scaling options for the Y axis by scanning the data and ensuring that the most positive and negative points for each waveform are plotted. This is the function of the Autoscale option (<esc>SDSA Yes).
The most annoying aspect of Autoscale comes when you zoom in on a range of data. If Autoscaling is still enabled, changes in scaling for the subset of data often effectively preclude a direct comparison of two sections of data. There is an easy solution. Begin by doing an "Raw waveform display" <esc>ARG of the entire run. Autoscale will determine the extremes of each waveform. Then turn off autoscale (<esc>SDSA No) and values that had been determined automatically will be used for waveforms and will apply to subsequent displays.
The Y scaling parameters of individual WFs are controlled in the <esc>SDSY menu. In practice, it is usually necessary to adjust the Y scaling of only one or two WFs; the autoscaled values are often appropriate. Since autoscaling of the Y axis is enabled by default, changes to the scaling of individual waveforms will have no effect until autoscaling is disabled (<esc>SDSA No). Remember to adjust the parameters for all waveforms before doing a "Go".
At present there is no way to turn off autoscaling on the display of individual frames of data (i.e. traces) when setting parameters visually. This can be a problem for example when looking at spikes in data frames and trying to set the window discriminator (<esc>SSTVT).
You can turn off autoscaling when using the "frame select" program, frmsel, (as stand alone or under Maintanance, Maint/Select-frames); see the Rows-Cols-Scale menu item.
Note that the "Y" axis (actually the x axis) scaling of a trace (selected by "Amplitude trace #"
<esc>SLTN) plotted vertically on top of a waveform ("Mark frame positions on W.F."
<esc>SDWM or <esc>Wn<cr>SM Yes) is handled differently than the Y axis scaling for traces
plotted in the normal or horizontal manner. The program attempts to line up the start position of
each vertical sweep with the green vertical mark that indicates the time of occurrence along the
upper most plotted waveform. In order to do this, it looks at the first point on the trace (sweep)
and aligns that point with the green vertical bar. For some traces (e.g. those with a first data
point that is significantly different from the "baseline") you may get unexpected results. In
particular if you have changed the Y scaling of traces (<esc>SDSA No; <esc>SDSYT Lower
Upper etc.) according to the best appearance for horizontal plotting, the vertically plotted traces
may be off scale. This is because for normal (horizontal) trace plotting, the lower & upper
bounds of the Y scale are absolutes, whereas for this vertical plotting feature the bounds are
relative to the level at the start of each sweep. There is no quick fix to this situation, you must
either change the Y scale (<esc>SDSYT Lower Upper etc) when switching between the
horizontal and the vertical ("Mark frame positions on W.F.") modes or choose a scale that works
with both modes. A better solution is to ensure that the first point on a trace is at baseline (e.g.
delay the cal pulse a bit).
Analysis-Overview
Overview of Trace analyses
Several methods are available for sorting traces into groups for subsequent averaging or
exporting to another program. Trace sorting may be made according to whether the trace
-- is in the list of allowed traces ("Trace # list" <esc>SATT)
-- passes criteria set up in the Frame-Select program
or occurred relative to:
-- the cycle phase of the normalized step cycle,
-- a voltage level in a particular waveform
-- the occurrence of a "tag" value
A step by step example of a trace average is included in this documentation (see Example trace
analysis). Setting the "Preview average data" option <esc>SAP before a Bins-Save <esc>B
will allow exporting the raw (unaveraged) traces to a new file containing only those frames
matching the selection criteria.
For the cycle phase and waveform level analyses, traces are sorted according to when their trigger point occurred relative to the selected waveform. The trace trigger point may be the first point in the trace or if a delay was selected in the Capture program, may have occurred earlier than any of the data points. Thus later portions of the trace could actually fall into the next "bin" (e.g. the end of a long duration trace spans into the next step cycle phase). Frames triggered near the end of the active phase portion of a cycle could contain data mostly in the inactive phase. This potential problem can be avoided by recent changes to the software. The parameters "Phase selection delay" and "Phase selection window" (Set/Cycles/In-phase/Delay and Window) control the assignment of triggered sweeps to specific phases of a cycle. The range of points included within the range determined by the delay and window parameters must fall entirely in a given cycle phase, or bin within a cycle, for the sweep to be used.
The Y value of a point on the trace (amplitude) can be measured automatically. These values
are then used to prepare a graph of trace amplitude versus something else. Either individual
(raw) or averaged values can be presented. These analyses are covered in the section on
Trace Amplitude graphs (see Analysis Directory). Trace amplitude can be plotted against :
-- the normalized step cycle,
-- the amplitude of a point on a waveform,
-- the amplitude of a point on another trace,
-- the frame number in a run Main Menu
Spikes (i.e. discrete events defined by an amplitude and time window) can be counted in each
trace and this number plotted against the normalized step cycle. The latencies of spikes in a
trace can also be plotted against the normalized step cycle.
Analysis Directory Main Menu
Example trace analysis: trace average based on step cycles Main Menu
In this example analysis, stimulation of a peripheral nerve was used to evoke reflexes recorded
intracellularly in a motoneuron during fictive locomotion. ENGs were recorded as continuous
waveforms and a 4Hz pulse triggered the stimulator and frame collection. The purpose of the
analysis is to create averages of the reflex PSPs during flexion and extension. In order to do
this, step cycles must be defined; frames sorted into those occurring during flexion and
extension and averages created. In this example an envelope of activity in an integrated,
rectified ENG waveform is used to indicate the step cycle phases.
-- Use "Analysis Raw-W.F.-display Go" and "Set Range" to choose a suitable range for analysis;
for more information see Raw Waveform Display and Set Range sections.
-- Choose a waveform for cycle selection. Cycles can be set manually one at a time or
automatically. In order to optimize automatic cycle selection, a waveform that is a smooth
envelope (i.e. not too "spiky") is needed. See also the overview Setting Cycles and then
WAVEFORM PARAMETERS for details about step cycle selection.
-- The Maintenance-Filter menu of analysis offers the ability to rectify and integrate waveform
data (e.g. EMG or ENG). Even if the waveform is already rectified-integrated, further filtering
may help with automatic cycle selection. Filter the waveform if needed: <esc>MFW# (filter
waveform #) C10 (try a 10 Hz cutoff). G the program will prompt for a waveform to store the
filtered data. Now use this waveform for cycle selection.
- select waveform (n) for cycles and set them visually.
<esc>SCWn<cr> cycle crossings based on waveform n
<esc>Wn<cr>SCV set crossings visually
A choose Automatic first; then use the cursor to more accurately define the discriminator window.
M then Manual to touch up any problems with individual steps.
if the waveform is too squashed (i.e. divided into too many lines to easily see the activity, you
can change this.<esc>Wn<cr>ST or <esc>SDWT Choosing "max" as the time will put the
entire range on one line; other values are allowed. The default is 5s which means that the
selected analysis range is divided into 5 second epochs plotted sequentially and one per line on
the display. For a 50 second analysis range this would spread the waveform over 10 lines on
the screen.
if not finished, continue setting the cycles: <esc>Wn<cr>SCV
Quit Quit Quit go back up to main W.F.-activity menu
Kn<cr> Keep parameters for this waveform,
Quit
- Set the number of Bins to average into, the Waveform to be used for cycles, the Traces to average
<esc>SAB Set number of Bins for the average
<esc>SATT select which traces to average (default is ALL)
Choose Averaging based on the normalized step cycle
<esc>ATC Averaging of Trace based on Cycle phase
<esc>SCWn Select waveform to use for step cycles
Note: this method divides the cycle from waveform onset to onset into "cycles" and then by
averaging normalizes the cycles. With one bin, you will get all frames. With 2 bins you get one
bin at the beginning and the other half way through the normalized step cycle. This could be a
problem if for example, flexion and extension do not show a 50% duty cycle. Consult the
Normalization section for more on this problem and its solution Main Menu
OR
Use <esc>ATW to create trace averages that are restricted to frames occurring only during (or
in the absence of) activity in a particular waveform. This analysis is another way to examine the
modulation of PSPs during the step cycle. Instead of cycle normalization, the degree of activity
on the chosen waveform is examined and traces sorted accordingly.
Using standard methods, set the step cycles in a waveform.
<esc>SCWn Select this waveform for determining the active phase for the average
<esc>SAB 1 Select one bin for average
<esc>SLTAy Average only those frames occurring during the part of the step cycles in which
the waveform shows some activity.
<esc>SLWN Choose the waveform that the cycles were selected from
<esc>G Perform the average.
<esc>B name1 Save the average.
<esc>SCSy Choose the inactive periods of the waveform for frame selection.
<esc>G Perform the average
<esc>B name2 Save the second average.
!appendrun name1 name2 make a single file of the two saved averages. This method runs the
appendrun program from within Analysis. There is a question waiting for you on the background
screen (i.e. on the xterm window from which you ran the analysis program). Click on that screen
and answer "Y". A better way to accomplish the same thing is to have another shell running and
run the appendrun program and the qm program from that shell.
!qm name1 Examine the averages of frames occurring in the active and inactive phases of the
step cycle. Again, running from another shell is preferable. Note that by default qm will show
only the first of the two frames in the name1 file that you created. Use the Trace option to select
both frames
Trace: all;all The semicolon is critical (see qm documentation) Analysis Directory Main Menu
Congratulations! you have performed a cycle based trace analysis. Remember that script files can be written to automate many parts of an analysis. In a typical analysis a script is written that chooses the analysis method, number of bins, saves the files, appends the averages into a single file; loads qm, displays and prints the data. The user would set the cycle parameters for the particular run, exit the analysis program and save the parameters. Then the script file would be run with appropriate command line parameters that are fed into the analysis program. Command parameters might be things such as runfile name, the WF for cycle selection, number of bins, and the name of the final averaged data file. An example script called "tac" is in Script Files
*********** Details of Analyses Main Menu
1 Trace averaging by: frame list, cycle, W.F level, tag
2a Trace amplitude vs step cycle
2b Trace amplitude vs trace amplitude
2c Trace amplitude vs W.F. level
2d Trace amplitude vs frame number
3 W.F. averaging spike triggered, based on cycle phase
4 W.F. averaging - spikes within cycle
5 W.F. averaging - spike occurrence in cycle
6 W.F. averaging based on spike interval
7 W.F. activity start & stop time analysis
8 W.F. activity burst duration vs cycle duration
9a W.F. amplitude vs step cycle
9b W.F. level vs W.F. level (also create amplitude histograms in a WF)
10 W.F. L.D.P. level vs cycle duration
11 Spike train duration vs cycle duration
12 Spike position vs step cycle, sorted by cycle length
13 Spike count vs step cycle, vs W.F. level
14 Spike vs step cycle interval, frequency
15 Spike vs spike occ interval, frequency
16 Spike vs W.F. level interval, frequency
17 Spike vs Train number interval, frequency
18 Spike correlation cross-correlation, auto-correlation
19 Spike firing level vs step cycle, vs spike occurrence, vs firing frequency
20 Trace spike vs step cycle count, latencies
Many parameters can be set with the mouse using the cursors (called visual mode or visually).
Our convention is that the Left mouse button is "A", the Middle "B" and Right button "C". Button
D if available (or typing D on the keyboard) usually exits from visual mode and returns you to
your previous menu. On a two button mouse, the right button is "C", and button "B" can be
clicked by holding Shift down while clicking the left button.
When setting parameters visually, you may or may not want the data displayed to be
interpolated (i.e. you may want a line graph, or simply want the data points). Usually, the
"Interpolation" <esc>SDTI option will apply to the data shown. It can be set by selecting
Set/Disp-opt/Toggle/Interp. An exception to this is the display of waveforms for visually setting
parameters, where interpolation is instead controlled by the "W.F. Interpolation" option,
<esc>SDWI or <esc>Wn<cr>SI. This option can be set from two different places in the menus,
by selecting either Set/Disp-opt/Waveform/Interp.-W.F. or W.F.- activity/Set/Interp.-W.F.
When setting, in "text mode," a parameter which is part of the analysis parameter file, instead of
entering the parameter value in the usual way, you can enter a string of the form @@file, where
file is the full name of an existing analysis parameter file, including the .prm suffix, if it has one.
The program will set the selected parameter by reading its value from the named file. This
feature is especially useful when setting up automatic command scripts for analysis.
Setting default parameter values. Main Menu
Some analysis parameters are not set initially while others have an initial default value. The
default values may drive you crazy. Default parameter values can be set to your liking with this
procedure.
cd <enter> go to your home directory:
analysis <enter> enter the analysis program without selecting a run file
set all any or all of the parameters in any subsection of the menus to your preference
save these parameter values by using the "Keep" option from the Main Menu. You must use the
filename ".analysis.prm" and this file must be saved in your home directory. Note the leading "."
in the name of this file. This "." makes the file hidden from a standard "ls" command.
Whenever the program re-initialises all analysis parameters (when it starts up, or when you
Load a run file with no associated parameter file) it will get its initial values from the above file. If
you prefer to set up a file of initial parameter values for all users, save the same file as
/usr/neuro/lib/.analysis.prm. This file will be loaded if it exists, and if the user has no
.analysis.prm file in his home directory.
Main Menu
Unix shell scripts are text files created with an ASCII editor such as vi, pico, or emacs. To make such a text file executable you must use the chmod command. For example having created and saved a script file to disk called "cleverscript", you must leave the editor and at the shell type: chmod +x cleverscript. The +x option indicates to Unix that this text file is actually an eXecutable program.
Script Tips and tricks:
-- Script files will not work until they are made into executable files using the chmod command.
At the shell type: chmod +x myscript
-- start every script with "#!/bin/sh" on the first line. This forces the operating system to use the
Bourne shell.
-- to insert the "esc" character in a script, use the "`" (left quote) or "~" (tilde) instead. This is not
a Unix convention but a substitution recognized by the analysis program only.
-- Command line arguments: Variables can be given to the script file on the command line.
Within the script these are indicated by the $ sign followed by a number (e.g. $2). For example,
the command line: s3s2avg auc0103 temp 12
has four arguments. Argument $0 is "s3s2avg", argument $1 is auc0103, etc. Every occurrence
of $1 in the script is replaced by "auc0103". It is advisable to check for the correct number of
arguments on the command line within the script. To check for 2 user supplied variables and
terminate the script if not found:
if [ $# -ne 2 ]
then
echo "Usage: $0 variable1 variable2" >&2
exit 1
fi
Script Examples:
plotallraw: finds all the frame files in a directory (for f in *.frm) and plots out the waveforms
s3s2avg makes a cycle based waveform average with and without nerve stimulation. Used to
analyze step cycle resetting.
tacac May 14/98 - performs trace averages based on the normalized locomotor activity in a
waveform. The average of frames occurring during the active period of a waveform is created
and saved. The average calculated during the inactive period is appended to this file. QM is
used to subtract the two frames and show the difference.
Example: plotallraw
This unix shell script finds all the data files in a directory (for f in *.frm) and starts the analysis
program to analyze one run file at a time (analysis $f <<!). The shell script supplies the
characters (command sequence) that cause the raw waveforms to be printed. This process is
repeated for all data files in the current directory. This script is called "plotallraw". The comments
are included for tutorial purposes, they CANNOT be on the same line as a command in a real
script
for f in *.frm
do
analysis $f <<!
arsrs0 # Analysis Raw Set Range Start 0 [Hrt]
emax # End max
qqgppqyn # Quit Quit Go Plot Plotter Quit (really?) Yes (save params?) No
!
done
Main Menu
Example: s3s2avg
This more complex script "s3s1avg" performs a cycle based waveform average on a single run
file. It creates averaged ENG activity during locomotion with and without nerve stimulation and
could be used to analyze step cycle resetting. A window discriminator is used to trigger stimulus
delivery in a particular phase of the step cycle. ENG activity is fed into the discriminator (in our
case a separate computer running software for this purpose) to detect cycle phase. A control
matrix in the discriminator determines if steps are control (no stimulation) or perturbed (stimulus
delivery).
During the experiment one stimulator (s2) is turned on, set to 0 intensity and triggered from the
external source (discriminator) during control steps. This stimulator's marker pulse thus
indicates control steps. The other stimulator (s3) is also triggered externally by the ENG activity
but in those steps in which stimulation is desired (e.g. every third step). It stimulates a peripheral
nerve, perhaps reseting the locomotor cycle. Stimulus marker pulses are collected as an
analogue waveform (in this example, WF#1) and used to separate control from stimulated.
External hardware is used to create marker pulses with different amplitudes for each stimulator.
For a more complete description of the hardware, stimulus markers and stimulus tags see the
documentation of the Frame Select program (frmsel)
http://www.scrc.umanitoba.ca/doc/scrchelp/frmsel.html
The analysis consists of creating "spike triggered" averages of WF (ENG) activity. In this case
the "spikes" are the tag pulses captured in WF#1. The averaged waveform activity during
stimulus delivery is averaged and saved to disk in the file called $2-stim. The $2 is substituted
by a filename given by the user on the command line (see Script Tips and Tricks). An average
of control steps is created and saved to disk as $2-ctrl. The window discriminator within the
analysis program is used to separate the smaller and larger tag pulses indicating control and
stimulated steps respectively. The script works because the tag pulses have fixed amplitude
and can thus be relied upon to have the same amplitude in different run files.
N.B.: This is script file is annotated with comments as a tutorial. In a real script file the
comments in the lines must not be included within the keystroke input section of the script.
#!/bin/sh
# having the line above first in a script file forces the use of the Bourne shell,
# so that the "if" command will work properly
if [ $# -ne 2 ] # test that user has entered a file name for the run file
then # and for the files containing the averages.
echo "Usage: $0 runfile binfile" >&2
exit 1
fi
analysis $1 <<! # this feeds the keystrokes below, up to the "!" line, into analysis
w1 # (load) WF number 1
sss1706.54 # Set Spikes.
e0 # 1706.54 happens to work for these tags at the gain used
dmax
tadqqqk #Trains Automatic Quit Quit Quit Keep [Hrt]
qawcsab1 #Q Averaging by Cycle Set Average Bins 1
qqsawl1,2,4,6,7,8,10,11 #Set Average Waveform List 1, 2, 4, etc
d-300ms # Delay -300 ms (pretriggered delay)
w1200ms # Width 1200 ms
qqqscw1 # Set Cycle WF 1
qqsctyqqgb$2-stim #Set Cycle Train Yes Go Bin-save $2-stim
w1 # repeat procedure for control steps
sss852.051
e0
d1816.41
tadqqqk
qawcsab1
qqsawl1,2,4,6,7,8,10,11
d-300ms
w1200ms
qqqscw1
qqsctyqqgb$2-ctrl # save the control average.
!
appendrun $2-stim $2-ctrl # put both averages into the first (stimulated) file.
Main Menu
Example: tac: trace average normalized step cycle, active phase only
This example produces a trace average of frames occurring during the active phase of a
waveform. The normalized step cycle is divided into a number of bins and the portion of the
frame defined by delay and window is used to determine which bin the frame goes into. The
trace window and not the starting point of the trace is used for bin assignment (set cycles in-phase). There are a number of manual operations that must be made in analysis before running
the script. Analysis of each data file has a manual and scripted component.
Manual analysis operations:
a runfile
w# define step cycles using this waveform.
scva #set cycles visually automatically, then fix up with the mouse
qqqk #quit this section keeping (saving) the parameters
scid# set cycles in-phase delay: ms from start of trace for trave window
sciw# window duration (in ms following the delay)
Script file operation: tac
#!/bin/sh
# tac May 31/98
# This script runs the analysis program to perform trace averages
# based on the normalized locomotor activty in a waveform.
# The average of frames occurring during the active period of a waveform
# is created and saved. The average calculated during the inactive period is
# appended to this file. QM is used to subtract the two frames and show the difference.
# In this version, the trace average obtained during the inactive
# phase of the waveform is subtracted from that obtained during waveform activity.
#USAGE:
# 1. use analysis to set the analysis range and cycles in a waveform,
# 2. choose this waveform for cycle selection (SCW),
# 3. set cycles in-phase delay and window
# 4. exit analysis saving the modified parameters.
# 5. run this script, eg. tacac mydata newdata bins_acive bins_inactive delay
if [ $# -ne 5 ]
then
echo "script for normalized cycle based frm average" >&2
echo "Usage: $0 runfile avgfile bins-active-phase bins-inactive-phase delay" >&2
exit 1
fi
analysis $1 <<!
sab$3
qqscsntnp100
qqatcgb$2ac
Bins active=$3, Bins inactive=$4 ---- note first character on this line is a ^w entered in vi
scsyqqsab$4
qqatcgb$2in
ppqy
!
echo "y" | appendrun $2ac $2in
renamerun $2ac $2a$5
renamerun $2in $2i$5
qm $2a$5 <<!
t0
rcXA1
rcXA2
rcXA3
rcXA4
rcXA5
rcXA6
smt0
1
qm
pf$2a$5
q
!
qm $2a$5
Waveform Parameter Sub Menu Main Menu
The top menu of the waveform parameter setting sub-system bears some resemblance to the
Main Menu. The Keep and Load selections allow you to save and load waveform parameter
files for the various waveforms associated with the current run. They behave like the
corresponding selections from the Main Menu, except that they prompt you for a waveform
number, instead of a file name. The View selection shows you the current settings for all
parameters for the current waveform. The Reset selection allows you to clear all of these parameters.
The menus under the Set selection allow you to set the waveform parameters. Most can be set
in "text mode" (i.e. either by entering data from the keyboard or a script file), and many can be
set visually. The bursts of activity, for both cycles (duty cycles) and spikes (spike trains), must
be set visually. Single-unit discrimination of spikes is also set visually.
The menus under the Export selection allow you to export some of the waveform parameters,
namely the cycle start and end positions, the spike train start and end positions, or the spike
positions for individual single unit data sets.
Pressing the Escape key, while in this sub-system, will not bring you back to the Main Menu, but
rather, to the top menu of this sub-system. This is so you don't accidentally leave without saving
the waveform parameters. The Quit selection returns you to the Main Menu, but first, if any
parameters were modified, you are asked if you want to save them. Answering N, will lose any
changes made to the waveform parameters. If you answer Y, you are asked for the waveform
number, as for the Keep operation.
Note that the current start and end parameters (Set/Range) define the range for cycle selection. If you want to define cycles for multiple sections within a run there are three possibilities. The first is to choose the entire run and after setting the cycles manually delete cycles in the offending sections. The second is to delete sections of the run (actually just flag them as sections to be omitted) with the Set Range Delete-sections option. The third is to set the range to one section of interest and then define cycles within this range. Then Keep the cycles just defined, exit the Waveform subsection and select a new range. Now enter the Waveform subsection and Manually define additional cycles. If you choose automatic cycle selection, all previously defined cycles will be erased.
Set. Threshold, hysteresis and discriminator When measuring cycles or spikes, it is necessary
to set the threshold and hysteresis. The threshold is simply a level which, when crossed,
determines the start of a cycle or spike. The hysteresis is a level which, when crossed,
determines the end of a spike, or the end of activity in a cycle (the first part of the cycle). The
hysteresis is expressed as a displacement from the threshold; if the threshold is changed, the
corresponding hysteresis changes along with it.
The hysteresis can be positive, zero or negative. If it is zero, the ending threshold is the same
as the starting threshold; a positive transition across this threshold marks the start, and a
negative transition across this same threshold marks the end. If it is negative, it is added to the
starting threshold to obtain the ending threshold; a positive transition across the starting
threshold marks the start, and the level must then go back down below the ending threshold,
which is lower than the starting one, to mark the end.
If the hysteresis is positive, it is also added to the starting threshold to obtain the ending
threshold. This time however, the ending threshold is higher than the starting one. In this case, a
negative transition across the starting threshold marks the start, and the level must then go
back above the ending threshold to mark the end.
The discriminator used for spikes causes rejection of noise which can be mistaken for spikes. If
triggering on positive transitions, any spike which climbs above the discriminator is rejected. If
triggering on negative transitions, i.e. with a positive hysteresis as described above, any spike
which falls below the discriminator, i.e. a large negative spike, is rejected. Main Menu
The discriminators for cycles are used to define a range of levels to accept from the
waveform. Any point which goes above the maximum discriminator, or below the
minimum discriminator, will be rejected, and replaced by the last valid data value. This
allows you to focus in on the range of interest, and ignore any large spikes the waveform
may contain.
Cycle activity must be set visually (SCV). The common procedure is to first set it
automatically, where you fiddle with the threshold and hysteresis mentioned above to get
the cycle markers where you want them. The "Cycle crossing delay" <esc>Wn<cr>SCD
is used to eliminate false triggering on noise near the threshold. Set it to about 1/4 of the
length of a cycle, then adjust it from there.
Once the cycle markers are more or less the way you want them, quit the automatic
selection. Note upon choosing automatic cycle selection, previously defined cycles will
all be erased. Touch up any cycles, with the "manual" selection. Here you use the
mouse to select individual pairs of start and end of activity markers, and move them
where you want them. The menu prompts for all commands. Unwanted "pairs" can be
deleted and unmarked cycles can be inserted. There are also phase-shift and time-shift
operations that can move all of the markers at once.
Normally, the start of activity will be marked close to halfway up the rising edge of a
cycle. For some applications, however, you may want cycle peak to indicate the start of
activity, and the cycle trough to indicate the end (or vice versa). To do this, set the
threshold to a level below, but near the peaks, and the hysteresis to a level above, but
near the troughs (or vice versa). Once the cycles have been set in this manner, the
Find-min&max operation will adjust all of the start and end of activity markers to the local
maxima and minima.
Cycles can also be defined on the basis of spike activity (usually spike trains, but could
also be a single spike). Although a spike is most often an action potential, almost any
discrete event can be used as a spike. To use spike trains as the cycle markers for cycle
based analyses, set the "Base cycles on spike trains" <esc>SCT option. If markers
indicating stimulus delivery were captured as a waveform, they can be considered
"spikes" and used for spike-triggered averaging or defining "cycles". Remember that the
a trigger pulse used to trigger traces can be made into a waveform (Maintenance Gen-Trig) and this new waveform used as a spike for further analysis.
For most analyses of waveform spikes, it is a good idea to set the spike train markers,
so that any stray action potentials that occur outside of the spike trains (i.e. bursts of
action potentials) will be excluded from the analysis. Spike train markers are usually set
visually but the default values will work for infrequent events (such as a stimulus
marker). You must first set the spike threshold, hysteresis and discriminator mentioned
above, to indicate where the spikes occur. Then, you set the trains automatically, where
you fiddle with the "Spike train gap" <esc>Wn<cr>SSTG to get the desired separation of
spike bursts. If two consecutive spikes are closer together than this gap, they are taken
as part of the same spike train. If two spikes are farther apart than this gap, the first is
taken as the end of one spike train, and the other is taken as the start of the next train.
Once the spike train markers are more or less the way you want them, you can quit the
automatic selection, then perform manual selection. Here you can select individual pairs
of start and end of activity markers, and move them where you want them, or delete
unwanted pairs, just as for cycle activity markers. Sometimes, the start and end marker
will overlap on a single, isolated spike; you will usually want to delete such a pair. There
are also phase-shift and time-shift operations that can be performed, to move over all of
the markers. Main Menu
Setting window discriminator settings from a script file. If a waveform or spike has a known amplitude, parameters can be set from a script file for automated analysis. An example of such a script is in: setting parameters from Script Files
Single-unit discrimination In cases where the signal on a waveform (ENG or EMG)
contains spikes from several units firing simultaneously, steps must be taken to isolate a
single-unit, i.e. to detect spikes from one unit while rejecting those from other units. You
can begin by carefully setting the spike threshold and discriminator to allow only spikes
within a certain range of heights.
When this is not sufficient, you can perform further selections based on parameters such
as spike width, area under spike, and a second level discriminator. You can also save all
the spike positions for separate single-units, and later choose the single-unit data set
you want, without having to repeat the whole selection procedure. These parameters are
set from the W.F.-activity/Set/Spikes/Unit menu.
Begin by selecting the Number of the single-unit data set on which you wish to work
(initially 1). You can then visually set the appropriate parameters, then perform an
automatic selection. Once this is complete, you can perform a manual selection to delete
inappropriate spikes. In both cases, you are warned if any remaining spikes in the
current single-unit data set also appear in the data set for another unit.
Note that this is a very recent addition to the analysis program, and there is still much
room for improvement, both in selection criteria, and in manual selection capabilities.
Main Menu
Virtual-W.F.: You can Set or Reset a "virtual waveform link" to another waveform, to allow you
to maintain a separate, independent set of waveform parameters for a given waveform. You
begin by selecting a non-existent waveform in the run with the W.F.-activity or
W.F.-activity/Load selection, then you can set this waveform number to be a link to an existing
waveform.
You are first asked for the number of the waveform to be linked. Any function or analysis that is
asked to use the current waveform will use the one you specify here instead. You have to
specify the number of a real waveform, as the program can't chain virtual waveform links. You
are then asked if you want to differentiate the waveform on the fly. If you answer Y, the program
will differentiate the selected waveform automatically when the current waveform is requested.
This can save disk space by eliminating the need to store differentiated waveforms. If you
answer N, the program will give the selected waveform as-is when the current waveform is
requested. This is useful when you want to set up two or more independent waveform
parameter settings for the same waveform.
Because the selected waveform is not copied, if it is ever changed or removed, the link to it will
become unusable, or will yield different waveform data. When viewing waveform calibration
information, the links will be indicated, in the effective rate column, with the label "link to WF #"
or "diff of WF #". These links will only work in the analysis program - no permanent changes are
made to the run file itself that would carry over to other programs - but the link will be saved with
the waveform parameters for future use in analysis.
Virtual waveform links don't actually create file links, so they can work on file systems that don't
support file links, for example on a DOS partition under Linux.
The Calibration selection <esc>C from the Main Menu allows you to view and change
the calibration for the current run. Calibration includes waveform and trace names, units
and user defined scaling of A/D units. The calibration information in a data run was
written into the ".frm" file header by one of the data capture programs which in turn
obtained it from the "default.cal" file as the data file was being created. Consult the
"calibrate" program documentation for details about calibration and data capture. Consult
the "fixcal" program documentation for how to change the calibration of several runs of
data at once. Note that some displayed units are internal to the analysis program and
not affected by the information in the ".frm" file. This includes the units used for time
(default ms) which can be changed from the <esc>SDUT menu item. See also Setting
default parameter values
When choosing the Trace or Waveform selection of the calibration menu, you are
prompted for the trace or waveform number. You can then change the calibration
values, or the channel name, for that trace or waveform. Any changes you make are
kept in memory only, and are lost when you select a new run or exit this program, unless
you explicitly Save the calibration information back in the run header on disk <esc>CS.
You can also Load the old calibration information back from the disk, to abandon any
changes made since the last Save. This information is also loaded automatically from
the disk when you select a new run, or when the current run is modified by another
program, such as frmsel, which can be called by an "escape" to the shell (e.g. frmsel)
from the Maintenance sub-menu or from another terminal window (see HELP). Note that
most of the maintenance operations from the main menu described (except select-frame) will modify the in-memory copy of the run header, then automatically save it to
disk. This has the side-effect of also saving any changes you made to the calibration information.
You can also provide an alternate unit specifier for any trace or waveform. This unit
specifier, which is entered in parentheses at the end of the channel name, selects the
units in which the trace or waveform will be scaled when displayed. This unit specifier
overrides the global unit specifier for voltage levels, sample units <esc>SDUL. It is used
by default for the final display; the global unit specifier is still used by default to scale
values for parameter setting.
When setting parameters for traces or waveforms that have an alternate unit specifier, the current parameter value is displayed in the units determined by the global unit specifier (normally "mV"), followed in parentheses by the value scaled in the alternate units. To set the parameter value using the alternate units, you must enter not just the numeric value, but you must explicitly follow it with the alternate unit name, as it appears in the alternate unit specifier for this trace or waveform. (E.g. "10 V/s".)
The alternate unit specifier can be in either of two forms. It can be a simple specifier of
voltage or A/D units, such as (mV) or (A/D). It can also be used to indicate how voltage
or A/D levels sampled represent some other type of units, such as pressure,
temperature, current, etc. In this second form, a one-to-one correspondence can be
specified, or numbers can be given to indicate the ratio of sampled levels to actual units.
For example, you could specify units for various waveforms by setting the channel
names as follows:
Waveform 0: Potential (mV)
Waveform 1: Pressure (mV = mmHg)
Waveform 2: Temperature (V = 10 deg. C)
Waveform 3: Current (3 A/D = 10 uA)
If voltage levels are specified on the left hand side, then values sampled will be converted to the specified voltage levels (using the zero, height and level in the calibration information) before being converted to the units on the right hand side. If A/D levels are specified on the left hand side, they are converted directly to the units on the right hand side, and the zero level is not shifted. Main Menu
Here is an example of the list revealed by a Calibration/View/Waveform operation
<esc>CVW
WF Div Effective rate Zero Height Level Name
2 1 2000.00 Hz 0 2048 2500000 uV EUS eng
3 50 40.00 Hz -1177 1013 40 uV Bladder Press. (uV=mmHg)
6 10 200.00 Hz -2047 2048 250000 uV Current (50000uV=uA)
The combination of Height, Level and the information between the parentheses in Name
determine the units displayed by analysis. In the above example, one mmHg for
waveform 3 corresponds to 1 mV as given in the alternate unit specifier, and in turn 40
uV corresponds to 1013 A/D levels, out of 4096 levels for the full range of a 12 bit A/D
converter at the gain setting used.
The default hardware gain of the A/D can be set by the environment variable
ADGAINCODE for devices with settable gain. (Environment variables are setup at
login by the .login or .profile file which in turn uses the /usr/neuro/lib/setup.csh or
setup.sh file for many of these variables including those for the A/D). Gain can also be
set using the calibrate program to generate default.cal.
The zero parameter adjusts the scaling offset so that for example, negative volts on the
A/D can be displayed as positive units. The Zero is specified in A/D units and represents
the level the A/D converter captures when the signal unput is held at zero volts.
Height and Level correspond to the same value; the former specified in A/D units and
Level in user units. In other words, one A/D unit equals (Level/Height) user units. Height
is used during the automatic calibration procedure. In that case, a level or a pulse is
scanned and read in A/D units. This value will appear as Height. The user enters the
user units corresponding to this level (e.g. 2 mV).
The analysis program calculates scale values by
(A/D_units - Zero)*(Level/Height).
For WF #6 above, each of the 2048 units (Height) correspond to 250 mV from the A/D.
50 mV corresponds to one uA, so one unit corresponds to 2.44 nA.
Alternate unit specifiers (in the Name parameter) can be set ahead of time, using the
calibrate program. However, they are currently recognised only by analysis; any other
program will ignore them, treating them simply as a part of the channel name. Thus QM,
raster, etc. will display values only in mV.
When using alternate unit specifiers, the intermediate microvolt levels can actually be
quite arbitrary, and don't need to correspond to actual signal levels at any stage in your
equipment. This can be used to your advantage by setting up a straight forward
correspondence between mV and your own units. For example, if we changed
waveform 3's unit specifier above to "(mV=mmHg)", and changed the level parameter
accordingly to "40 000 uV", then when programs like qm and raster report levels in mV
on a waveform agerage, you know those levels are actually in mmHg. Whenever
possible, you should make use of a simple correspondence like this.
************** Maintenance Sub Menu Main Menu
The Maint selection accesses a number of operations on the run file or the waveform
files. Some of these are built into the Analysis program and others are stand-alone
programs that are called (transparently) by Analysis and can also be accessed from the
shell without the analysis program. The choices are:
Blanking replace sections of data in a waveform with a straight horizontal line
Change-descr
Differentiate create the derivative of a waveform
Erase-W.F
Filter high pass, low pass (integrate), rectify, amplify, set baseline, clip waveforms
Gen.-trigger turn frame triggers into a waveform
Link-Waveform have two sets of parameters (eg. step cycle parms) for one waveform
Make Waveform turn traces into waveforms
Reframe turn waveforms into traces
Select-frames tag frames manually or automatically as deleted
Trim throw away sections of waveforms and associated frames
Maintenance Blanking replaces sections of a waveform with a straight line. Blanking is always
performed on a copy of the original waveform; i.e. a new waveform is created and the original
waveform remains. A trace cannot be blanked but traces can converted to waveforms and then
blanked. see Make Waveform
Blanking is used to remove stimulus artefacts or other transients whose presence would distort
an average more than their removal. A "sample and hold" technique is used to achieve
blanking. i.e. the last sample in the waveform before the start of the blanking interval is repeated
throughout the duration of the blanking interval replacing existing samples in that range.
The sections to be blanked out are determined by the times of occurrence of spikes on another
waveform. This is "time zero". From this a delay allows a pre or post start of the blanking
window. The duration of the blanking window including the delay time is set by the Window
parameter.
Why Blanking ?
A typical use might be to "blank out" a short section of a waveform contaminated by a stimulus
artefact. After the blanking operation, the integration of this waveform (actually a low pass
filtering, see Maintenance - Filter) would not include the stimulus artefact.
You can use Maintenance Gen-trig to create a new waveform consisting of "spikes" placed at
the trigger point of frames. This reference waveform can then be used as a source of "spikes"
for blanking sections of other waveforms. This is very useful if stimulus marker pulses were not
captured but the stimuli were triggered at a fixed interval from the Frame trigger. If stimulus
marker pulses were collected, as a waveform, this waveform could be used as the reference
waveform for blanking without using Gen-Trig.
.
How to blank a waveform:
- set the "spikes" on the reference waveform by loading the waveform into the waveform section
of analysis and using the Set Spikes Visually operation. <esc>Wn<cr>SSV The "spikes" need
not be action potentials, but will typically represent stimulus artefacts, trigger or tag pulses.
When done set Trains Automatic. Quit the waveform sub menu Keeping the parameters.
- use this waveform as the blanking reference. The "Spike W.F. #" <esc>SSWN parameter,
which is also used for action potential analyses, selects the reference waveform.
- from Maintenance-Blanking set the waveform to be blanked (Number), the Window selection
to specify the length of the blanking interval triggered by each spike, and the Delay selection to
specify the time (positive or negative) from the start of a spike to the start of the associated
blanking interval.
- Once these parameters, and the spike-related parameters mentioned above are all set, use
the Go selection of the Maint/Blanking menu to begin the blanking operation. If the parameters
have been set correctly, you are asked for the number of the new waveform, which must be
different from the one being blanked, and from the reference waveform used to trigger the
blanking. If you enter the number of a waveform which already exists, this waveform is erased,
and the new one takes its place.
Maintenance- Change-descr. change the text in the run description. Maintanence Main Menu
The text descriptor is a separate file with the same prefix as the run file (eg. mydata.txt). It can
be viewed, edited and copied using any appropriate unix commands. Changing it from within
analysis is just a convenience.
"lsrun" is a program which searches for all .frm files in a directory and then sees if there is an
associated .txt file. All text file descriptors found are by default typed to the screen. The output
of lsrun can also be sent to the printer. lsrun | lp OR lsrun | prt
On the QNX machines use: lsrun | lpr -Phpt
Maintenance- Differentiate calculates the derivative of any waveform.
A new waveform containing the differential of the selected waveform is created. It will only be
displayed if its number is in the <esc> SWL list. The resulting waveform contains differences
between adjacent sample points in the selected waveform, with the first point set to zero. The
units are changed in the display of the new waveform's channel name. Maintenance Main Menu
Maintenance- Filter Creates a new filtered waveform from an existing waveform.
Filter performs a digital high or low pass filtering of a selected waveform. The selected
waveform can be first rectified to create a linear envelope of the signal. Integrated, rectified ENG
and EMGs can be created from raw data by rectifying and low pass filtering using at a low cutoff
frequency (e.g. 10 Hz). Low pass filtering is often desirable before differentiation to eliminate
"noise".
Use the Waveform selection to set the waveform number for the data to be filtered. Set the
Cutoff for the -3db cutoff frequency. By default the filtering will be a 2nd-order Lowpass
"Second-order, zero-lag Butterworth filter". A Hipass filter can be selected as an option. There is
an option that attempts to perform a digital correction of the phase shift produced by filtering.
"Zero-lag filtering" option <esc>MFZ: By default the zero-lag option should not be enabled but
check to ensure that it is turned off (MFZ No). DO NOT USE THE ZERO-LAG OPTION. THERE
ARE BIG BUGS..
In all cases end-point extrapolation is used to start off the filter; points equal to the average of
the first few points (and of the last few points) of the waveform are temporarily prefixed (and
appended) to the waveform.
The Maint/Filter operation automatically updates the new waveform name to indicate the cutoff
frequency, and whether the result is above (high-pass) or below it (e.g. Waveform 10 >10Hz).
The Cutoff parameter specifies the cutoff frequency in Hz of the filter but the program will limit it
to 1/3 of the sampling rate for the new waveform, to avoid the "ringing" caused by too high a
cutoff frequency. A choice of 0 Hz will allow the other processing, such as rectification and
spurious point rejection, but disable the filtering.
The Divisor selection allows you to set the sampling rate divisor to be used when the new
waveform is created. This divisor must be a positive integer. A divisor of 1, the initial value, will
mean that the sampling rate will not be divided. This reduces the number of data points in a
waveform. A waveform that was initially sampled at 1000 Hz and then rectified-integrated with a
cut off of 10 Hz can probably have a divisor of 20 (even up to 50) without visible alteration of the
filtered waveform. As an example, a 10 minute run sampled at 1 Khz occupies (2bytes * 60s *
10 min =) 1.2 Mbytes of disk space that could be reduced to (1.2M /50=) 60Kbytes. A good idea
is to rectify-filter a waveform twice and compare the results obtained using a divisor of "1" and
then a higher number. (The divisor must be 1 for "Zero-lag filtering".)
The Rectify selection enables full-wave rectification of the signal, before filtering. This is disabled
by default. The three remaining parameters - the rectifier baseline and the lower and upper
window discriminators - can be set either by making the appropriate selection from the menu
then entering the value, or by using the Visually selection then selecting the levels with the
pointing device. (When you select Visually, the program asks you whether you want to view just
the current analysis range, selected by the "Start of run" <esc>SRS and "End of run" <esc>SRE
parameters, rather than the whole run. Whichever you choose, the waveform is displayed, and
the cursor is turned on so you can point to the levels you want.) The window discriminators are
used to perform spurious point rejection. If this is not desired, set them to the minimum and
maximum allowed values. The baseline indicates the level to be used as the "zero" for fullwave
rectification. To disable rectification, set it to the minimum allowed level, or just disable the
Rectify option.
Finally, once all parameters have been set, use the Go selection of the Maint/Filter menu to
begin the filtering operation. If some of the parameters are set incorrectly, the operation will quit.
Otherwise, you are asked for the number of the new waveform, which must be different from the
one being filtered. If you enter the number of a waveform which already exists, this waveform is
erased, and the new one takes its place.
A new waveform data file will be created, and any combination of four operations will be
performed to generate the new waveform, depending on which options are set. If the window
discriminators are set, spurious point rejection is performed; all points out of this range are
rejected, and replaced with the last valid point. If the baseline level is set, the waveform will be
full-wave rectified. If the cutoff frequency is set, the (possibly rectified) waveform will be filtered.
Finally, if the divisor is set to some integer n, which is greater than 1, then the resulting
waveform's sampling rate will be divided by n. That is, only the first of every n points will be kept
in the file. Once the operation has completed, the run header in the frame file is updated and the
new waveform name changed to indicate the cutoff frequency, and whether the result is above
(high-pass) or below it. The new, fillted waveform can only be viewed if its number appears in
the Waveform display list <esc>SWL.
If the signal being filtering is fairly weak, you may want to amplify the signal to preserve the
smoothness of the resulting signal. You can accomplish this by using the Amp selection to set
the gain of the filter, before you start filtering. If you want to differentiate the filtered signal, a
strong signal is needed, so you probably should amplify it. You can amplify a signal beyond the
range of 4096 levels generated by the A/D converter; the software allows eight times that range.
A problem can occur if you use too large a gain on a signal that is not centered on zero volts:
the offset from zero volts is also amplified, and it can overflow the short integer in which it is
stored, in the calibration information. If this occurs, the calibration will be incorrect. The relative
voltage levels will still be accurate for the new waveform, but the voltage offset of the waveform
will be false. This may not be a problem if you're only interested in the differentials.
Maintenance
Maintenance- Make-W.F.
This selection allows you to create a waveform from a trace. This waveform can then be used
for certain analyses based on waveforms. The current run file must contain frames for this
operation to work. In most cases the length of data contained in a trace is short relative to the
run duration. In other words, there will be gaps of time between the last point in a frame and the
first point of the subsequent frame. The Make_WF operation interpolates missing data between
frames.
You are first asked for the trace number for the trace to be converted. If this trace has no points,
the operation will end.
You are then asked whether to include deleted frames. Unless you have a good reason not to
include them, they should probably be included. If deleted frames are not included, the program
does a linear interpolation between the last point of an included (undeleted) frame and the first
point of the next undeleted frame. The waveform data for intervening deleted frames consists of
this interpolated data.
If the current run file contains only averaged data and no waveforms, then a waveform is
created that is an exact multiple of the duration of the traces (waveform duration = number of
frames times the duration of each frame). The waveform will be the concatenation of all frames
from first to last, with no intervening gaps. Depending on the averaging method used, this may
be a sensible approach, or it may not. You'll have to be the judge. The program will ask if it's
OK to change the run length. If you answer N, or if it can't change the length because
waveforms already exist, then it will pad or truncate the waveform it generates to match the
current run length.
You are then asked for the number of the new waveform to be created. If this waveform already
exists, it is erased. The program then generates a waveform using the data in the specified
trace, at the sampling rate at which the trace was captured. For raw trace data, it will create the
missing parts between captured sweeps by interpolating from the last point of one sweep to the
first point of the next sweep. Before the first sweep, it will create a straight line at the level of the
first point, and similarly at the end of the last sweep, it will extend a line from the last sample to
the end of the run. (This is also how it will pad averaged data, if it has to.) The calibration
information, and all other information in the run header associated with the selected trace, is
duplicated for the new waveform.
Maintenance- Reframe
This selection allows you to create a new set of frames, triggered by spikes on a waveform. You
have the option of using all of the data (the entire run), or limiting it to a smaller range. By
reframing only a range of the run, all of the data outside of the current analysis range are simply
ignored. You also have the option of creating a new run, which is a reframed (and maybe
trimmed) version of the current run, a new run without waveforms, or you can overwrite the
current run directly.
Spike triggered averaging can be accomplished without reframing One application is shown in
the Example: cycle based waveform average. In that example, "spikes" (actually stimulus tag
pulses) are used to create an average of waveform activity occurring before (pre-delay) and
after the "spike" event. Reframing is another way to create data for spike triggered averages. By
making data in waveforms into frames, the Trace-analysis options become available. Obviously
a waveform containing action potentials (spikes) is one source of triggers for the averaging. You
can also use Maintenance Gen-trig to create a new waveform consisting only of pulses (
"spikes") placed at the trigger point of frames. This reference waveform can then be used to
trigger frame generation and create frames from data collected as waveforms.
This operation uses the same parameters as the spike-triggered waveform averaging described
above, i.e. it is concerned with the spikes, or action potentials, or a waveform. The spike W.F.#
<esc>SSWN parameters selects this waveform and you must set the spike-related waveform
parameters for this waveform. Each action potential triggers a sweep from each of the
waveforms in the "W.F. # list" <esc>SAWL. The "W.F. avg delay" <esc>SAWD and "W.F. avg
window" <esc>SAWW control the onset and duration of each sweep. All of the sweeps from one
action potential form a single frame, and a frame is generated for each action potential. All
existing frames (if any) are thrown out; only the new frames are kept. The trace numbers for the
sweeps in these frames are the same as the waveform numbers in the list, and the calibration
information for these new traces is simply copied from their corresponding waveforms.
If you are creating a new run, you will be asked to enter the run file name for this new run. If you
enter the name of an existing run file, or if you are overwriting the current run, you will be asked
for confirmation before the run is overwritten. The reframing is performed in a temporary file, so
you will need enough free disk space to hold the generated run, even if you are overwriting an
existing run. Once the new frame file is generated, the waveform files are generated (and
possibly trimmed) as for the Trim operation. The same caveats apply to both operations.
Maintenance Main Menu
Maintenance- Select-frames
This selection invokes the Frmsel program to allow frame selection on the current run. Consult
the frmsel documentation for more details.
Frmsel can display any trace from any frame in a run file. Its main purpose is to delete
undesired frames either manually or automatically, and assign labels to frames based on the
presence of certain tag pulses. Traces can also be zero-adjusted to correct for any DC shift
from frame to frame.
Frmsel allows examination of frame files produced by cap or cavg. It can be run stand-alone
from the shell with: "frmsel runfile". If no run file name is specified, you will be prompted for one
which may be specified with or without the ".frm" suffix. More commonly it is invoked from the
Maintenance Select-frame option of the Analysis program and then works on the current run file.
Frmsel has several uses. These include automatically deleting frames in which the data was
clipped off scale or an action potential occurred. These traces are "marked" for deletion which
means that they are excluded from subsequent averages. They are not really deleted, and the
process of setting the "delete flag" can be undone automatically or changed manually. Traces
can also be scanned automatically for the presence of a valid (user defined) calibration pulse
and deleted if this pulse is missing. Three delete flags indicate whether a frame was deleted
manually (M), deleted automatically because of a bad calibration pulse (P) or deleted
automatically because of clipping (C). These flags are shown by their letters in both the frame
Display mode and frame List mode. Frmsel can also be used to adjust the DC position of
frames. A DC baseline can be chosen from a reference frame and all frames in the run file
adjusted to this baseline (Zero-adjust). Finally, frames can be tagged according to which
stimulator was being used when the frame occurred. Maintenance Main Menu
Maintenance- Trim
This selection allows you to trim the run to a smaller size, by throwing out all the data outside of
the current analysis range. You have the option of creating a new run, which is a trimmed
version of the current run, or you can overwrite the current run directly. If you are creating a new
run, you will be asked to enter the run file name for this new run. If you enter the name of an
existing run file, or if you are overwriting the current run, you will be asked for confirmation
before the run is overwritten. When the run is trimmed, frames in the frame file outside of the
current analysis range are thrown out, and all waveform data files are shrunk so as to include
only samples in that range. The trimming is performed in temporary files, so you will need
enough free disk space to hold the trimmed run, even if you are overwriting an existing run. This
operation does not preserve links; even if waveform data files are linked together in the current
run, separate data files are generated for each waveform in the trimmed run.
Note that neither the analysis parameters, nor the waveform parameters, are changed by this
operation. If you create a new run, none of the parameter files are copied. If you trim your
current run, the time-related parameters will no longer be properly set, and will eventually have
to be reentered. (These include the analysis range and the spike and cycle activity bursts for all
waveforms.) Maintenance Main Menu
Use trimfrms (other programs of interest) to change the length of a frame for plotting vertically
on top of the waveform. A new run file is created, leaving the original intact
<esc>PV plot video produces a "screen dump" raster image and sends it to an HP laser printer.
The image will be smaller and lower resolution than that produced by <esc>PP
All printing (plotting) is spooled by the operating system (Unix-Linux-QNX). The printer that will
receive the information to plot is determined by Unix. Unix printer commands are also used to
send the print to remote printers and to cancel print jobs. An introduction to printing under Unix
is included in the SCRC main help document
http://www.scrc.umanitoba.ca/doc/scrchelp/scrcguide.html.
Consult the operating system manuals concerning problems with jobs not printing or with the
spooler.
When this program was first written, a HP pen plotter was used for most graphics output. Because of the switch to HP laser printers, several sections of the Plotting subsystem are rarely used. To make it easier to understand the operations relevant to the printer, sections concerning the Plotter are presented in green text below.
The Plot subsection presents a new 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. Selecting pen number 0 suppresses plotting of those items. Note that the display of many of these same items can be suppressed or altered within the Set Display options sections of the analysis program.
File This selection allows you to save the analysis display (HPGL commands) in a file. The contents of this file can be subsequently plotted by "hardcopy"; imported into "layout" or sent to a Windows machine and imported into Corel Draw (or other) graphics programs. You are prompted for the file name and if a file by that name exits, you will be prompted before overwriting the existing file. It is good practice to use the extension ".plt" when naming these files. This allows importation into Corel Draw.
Interpolation This selection allows you to change the "Plot interp." <esc>PF option. If this option is enabled, the data points of the plotted sweeps will be connected by line segments. If disabled, only the data points are plotted. This is similar to the "Interpolation" <esc>SDTI 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. (Note that, in either case, interpolation will not be performed on the data points in the graphs of action potential position vs cycle.)
Plotter This selection allows you to plot the graph directly to the plotter. Note that the printer driver for HP laser printers can interpret these commands directly. In most installations a Plot/Plotter command gives a printed laser image that is larger than the one resulting from Plot/Video. The hardcopy program is invoked to plot the displayed graph. If you are using a plotter, 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 Main Menu
Screen This selection allows you to change the "Plot screen redraw" <esc>PS 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. On Pentium class machines screen updates are fast enough that you can leave this option enabled.
Text This selection allows you to change the "Plot text" <esc>PT 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 produces a printed copy on the laser printer of the video display's current
contents - a screen dump - by invoking another supplied program called "sdump". The menu
area is cleared before the screen dump. Control-B also produces (the same) screen dump. The
Plot/Video operation has the advantage that it can be used even when analysis is reading its
commands from a file, rather than the terminal. The image produced by a screen dump is
typically smaller than that produced on the same laser printer by a Plot/Plotter command.
************** Command Line Options
Normally, the only command line option given to analysis is the name of the parameter file or
run to be loaded.
The command, "analysis -core corefile", will cause analysis to start up in the usual way, then
search for the analysis parameters in the given corefile, a core dump previously produced by
analysis. This allows you to recover parameters after a fatal error, and is usually used only for debugging.
The command, "analysis -dispmenus", will cause analysis 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 Options
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. Main Menu
************** Summary of Files Used
*.frm the frame file
*.w[0-9][0-9] untriggered waveforms
*.prm the analysis parameter file
*.p[0-9][0-9] waveform parameter files
/usr/neuro/bugs/ana*.prm parameters saved after internal error
/usr/neuro/bugs/ana*.core saved core dump
usr/neuro/lib/analysis.hlp help file
*.frX, *.X[0-9][0-9] temporary files
analysis [file] -> data analysis, averaging and graphing
OR
a [file] -> an alias for analysis
OR
al -> an alias that selects the most recent file written to disk ( alias al 'a `ls -t .frm`' )
these alias should be in .cshrc or .profile
Analysis allows you to analyse a run of data captured by one of the capture programs (cap or
cavg) but is mainly for analysis of files containing unaveraged data (traces, waveforms or both).
Two basic kinds of analyses can be performed: averaging of frames within a run into one or
more bins, and producing X-Y graphs showing how a signal varies with respect to time or to
another signal.
analysis [file] OR a [file] -> data analysis, averaging and graphing
If the optional file name argument is given, analysis will attempt to perform a Load operation on
this file. (The file can be a parameter file, or a run file.) If no file is specified, you will have to
select one from within the analysis program using "Load" <esc>L.
al -> analyze the most recent file written to disk ( alias al 'a `ls -t .frm`' ) these alias should be
in .cshrc, .profile, or .bashrc (depending on which shell you use).
Analysis should be run from a supported graphics terminal or on a computer running X-windows. It can be run remotely from other types of terminals, but no data will be displayed on screen.
Many parameters can be set with the mouse using the cursors (called visual mode or visually).
Our convention is that the Left mouse button is "A", the Middle "B" and Right button "C". Button
D if available (or typing D on the keyboard) usually exits from visual mode and returns you to
your previous menu. On a two-button mouse, the left button is "A" and the fight one is "C".
Button "B" is obtained by clicking the left button while holding down the Shift key. Main Menu
At the bottom of the display, the following menu prompt line is printed:
Analysis Bins-save Calibration Directory Go Keep Load Maint Plot Quit Reset Set View W.F.-activity
This is the main menu, the top level in a hierarchy of menus. To initiate an operation in any menu in the hierarchy, type the first letter of the menu. Some items will perform an operation and/or prompt you for input; other items will simply bring you to another menu, one level lower in the hierarchy. An alternative method of selection is to highlight the item you want from the menu, then hit Return. The space bar will cause the next item to be highlighted; the Backspace key (or DEL key, if this is your erase key) will highlight the previous item. If an item is highlighted, the last line of the display briefly describes the choice, or shows the next menu. Pressing the Escape key at any time will usually bring you back to the main menu. Some operations bring you back directly to the main menu after completion. Others leave you in some lower level menu, in which case the position in the menu hierarchy is shown at the left of the menu.
************ Other programs used in conjunction with analysis Main Menu
trimfrms is used to create a new run file (destination) in which the length of traces is trimmed
down (data is deleted from the beginning and/or end). Trimfrms creates a copy of the entire
source run including waveforms while trimming each trace in the frames.
Usage: trimfrms source destination
Associated parameter files are not copied. Data will be trimmed from the start and/or end of
each trace in all frames, according to your specifications. Enter the amounts to trim in
milliseconds.
calibrate is used to create the calibration data for a run before it is captured. Can also be used to create a new set of trace and waveform calibrations (names, gains, units, offsets) that can be forced onto an existing run file by the fixcal program Calibrate Documentation
fixcal forces a new set of information into an existing run header file
cap used to create the data used by analysis
frmsel run standalone or from within analysis (Maint/select-frames) to discard frames containing bad data (e.g. traces clipped by action potentials) Frmsel
dumprun displays the calibration and channel information for a file. Gets information from the runheader portion of the .frm file. With the -t option it will display the data points in a frame file as ascii formatted values. e.g. dumprun -t somefrmfile > textfile.txt creates a text file that can be imported into a spreadsheet. There are some "gotcha's"; see the dumprun documentation under "file utilities".
wtsum can combine waveforms or traces from several files and perform subtractions and
additions (e.g. use it to subtract extracellular fields). The trick to remember is that once a file is
selected and a trace from that file, you must use Bin-select to store that trace in wtsum. Then
use File-select to get the next trace.
The ouput of wtsum can be saved to disk as data (Save) option or plotted (Plot). File saved
contain frames, one for each trace imported into wtsum.
Wtsum has the advantage that different traces can be combined into a single file. The difficulty
with wtsum is that it expects all traces to have been captured at the same rate and same
calibration. For example, if you bring in a microelectrode and a cord dorsum trace with different
sampling rates, wtsum cannot deal with this difference and will write a file to disk that is of
incorrect duration.
Wtsum is an old program that should be used rarely. There are options within QM that do most
of the things that wtsum was designed to do.
appendrun can put one "run" on the end of another. This also works for averages (i.e. .frm files). This is the preferable method for combining averages created in analysis for subsequent display and subtraction by QM.
asc2run creates a run file from ascii data. It converts the data and sets up the header to give sample rates, etc. that can be understood by analysis.
axon2run creates a run file from Axon instruments standard data format files (e.g. Pclamp). It converts the data and sets up the header to give sample rates, etc. that can be understood by analysis.
rmendfrm physically deletes the last frame in a .frm file. This can be used to clean up after axon2run, if the Axon data file had an undesired extra episode in it, with the wrong trigger time, as can happen at times.
raster displays frames from a run file. It is used to create rasterized displays of a selected trace in a series of frames. The data may be overlapping (each frame has the same X and Y origin) or offset. When raster is invoked from within analysis (!raster) or from the command line with the file name (raster jul24-19) all frames will be "rastered". If the program is invoked without a data file name or the File option of raster is used, raster will ask for a trace number and a list of frames to be plotted. Only those frames that are not flagged as deleted will be plotted. Therefore Select-frames in Analysis (i.e. the frmsel program) can be used first to limit the rastering to fewer frames.
Another way to reduce the frames that raster plots from a large run-file is to use the "Preview averaged data option" <esc>SAP and then a Bin-save in Analysis. In this way any frames that would have been selected for an average are saved in a new run-file. For example, setting the range start and end to define a shorter range and then performing an average will limit the number of frames in the new run file. Another example: if you wanted to create a new run file with only those frames during extension, perform an "Trace average based on waveform level" <esc>ATW after selecting steps based on the activity of an extensor waveform. Then use Bins-Save to save the data raster documentation
qm is the main tool used to examine and change the plotting of averaged records saved by
analysis. qm documentation
qm can display more than one frame at a time. To do this, make sure that "<esc>SA" is "Y".
Raster is another way to see all frames at once. Qm also contains extensive frame manipulation
(smoothing, differentiation, addition, subtracting, etc.)
lsrun is used to make a listing of all the *.txt files in a directory. It searches for .frm files in the
directory and if there is an associated .txt file it is displayed. By default output will appear on the
screen.
To send the output to the printer use a pipe.
lsrun | lp OR lsrun | prt
On QNX machines use: lsrun | lpr -Phpt
replot changes standard (i.e. Gilles') HPGL files into something that older versions of the
import filter in Corel Draw could understand. The "-s" option strips offending HPGL characters
from the file. The only thing of consequence lost in translation is the "label origin" command.
Thus labels placed in the Layout program will all be Left Justifed. Corel 3 required the use of
replot before importing HPGL files. Corel 4 and subsequent versions do not require running
replot, except when the Corel output will be EPS. Bugs in the Corel postscript code caused data
traces with many points to be corrupt. the solution was to run replot with a specific option limiting
the number of nodes in trace segments. Newer Corel versions seem to be fine (Version 5 and above)
General Usage: replot -s oldfile.hp > newfile.plt
Postscript bug fix: replot -s -l500 file1.plt > file2.plt (minus, lower case "L", then 500)
the -l500 option makes replot break up runs of over 500 connected line segments, so
that Corel Draw can handle a large waveform as a number of smaller objects which are
better handled by the PostScript output drivers.
hpgl2mcd displays an HPGL (plot) file on the graphics terminal. Useful for checking the contents of plot files.
peel is a program usually accessed from within qm. It is used to fit two exponentials to a curve. IT was specifically written to calculate motoneuron electrotonic length. It is rarely used as a standalone program.
Corel Draw hpgl files from qm, layout, analysis, etc. can be imported into Corel. Use the ".plt"
extension for plotter files created in analysis and set the Corel filter for PLT files when importing.
See "replot" above.
Earlier versions of Corel (< 4) had problems with too many nodes. The fix was to use less
resolution in analysis or Corel 4. If the "Partial W.F. resolution" <esc>SWP option is enabled, the
program will limit the resolution of the displayed waveforms to the number of points specified by
the "Display resolution" parameter, <esc>SDWR or <esc>Wn<cr>SR. Note that the fetching of
data is affected by this parameter; data may be lost (i.e. not displayed) by this procedure.
Always compare the full resolution and partial resolution displays. Limiting the resolution will also
speed up an un-interpolated display.
hardcopy sends a HPGL file to the printer. It is rarely used as a standalone program.
sdump a raster image of the display and sends it to the printer. It is rarely used as a standalone program.
There are a few types of online help available in the analysis program. First, like in most of the
other programs, when you type a slash (/) at any of the menus, the program will display a brief
description of every item in the current menu.
Typing ? at any menu will cause the program to search for a "help page" describing the
currently highlighted menu item. If a help page exists for that item, it will be displayed on the
screen, and if there is more than one screen-full of text, 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. If no help page exists for the highlighted item, the program
summarises the current menu, as it does for the slash key above. Help pages exist for each
analysis method selectable under the analysis menu, all analysis and waveform parameters,
and all operations under the Main Menu.
The most useful information comes from the "View/Required" menu. This presents a context
sensitive display of the parameters that can (or must) be set for the currently selected analysis
method. The key sequences to type to set these parameters are shown as well as their current
values. Parameters that are required but not set are shown with a "?". View/All displays all
parameters in the program.
Certain display parameters will affect the appearance of the resulting graph. Most will appear in
the list of "Required" parameters, but some may not. To get a complete list of all display
parameters, select View/Display-options.
The usual sequence of events, after you selected a run file to analyse, is to first select an
analysis method, under the Analysis item of the main menu. Help pages are available for any
item under Analysis which sets the analysis method. These help pages contain descriptions
comparable to the sections of this documentation describing the analyses methods. Next, select
View/Required to see which parameters you have to set. Type in the key sequence given for
each parameter you wish to set. If you are unsure of how to set any parameter, just hit Return
when prompted for the parameter, to leave it unchanged. The menu item for that parameter will
now be highlighted, so you can call up the help page for it. Once all parameters are set, select
Go from the main menu, to perform the analysis. Main Menu
!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. This can be done at any level in the menu hierarchy, except from a "pointing device menu", when cursor tracking is enabled. You can recall and edit the last command entered by hitting the "up arrow" key, or Control-K, after typing the exclamation point. In most cases it is preferable to open another shell from the window manager by clicking in the area outside the analysis program window. Leave this shell open for quick access to the system while still running analysis.
$ 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 analysis.. Main Menu
See Setting Analysis Parameters for a general discussion and Script File for how to perform
repetitive analyses Note: This Text was extracted from parms.doc which contains both an
alphabetical and a natural order (i.e. order or occurrence) of menu parameters.
Active cycle phase only <esc>SLTA
Amplitude trace # <esc>SLTN
Amplitude W.F. # <esc>SLWN
Analysis method <esc>A
Auto scale <esc>SDSA
Axes pen <esc>PA
Base cycle stats. on start <esc>SLWA
Base cycles on spike trains <esc>SCT
Base cycles on stop time <esc>SCS
Base spike stats. on start <esc>SSWA
Base X on spike trains <esc>SMSXT
Base X on stop time <esc>SMSXS
Base Y on spike trains <esc>SMSYT
Base Y on stop time <esc>SMSYS
Blanking delay <esc>MBD
Blanking W.F. # <esc>MBN
Blanking window <esc>MBW
Burst cycle offset <esc>SMBC
Burst duration type <esc>SMBD
Burst positions in cycle <esc>SMBV
Corr. spikes after trigger <esc>SSCA
Corr. spikes before trigger <esc>SSCB
Cycle activity name <esc>Wn<CR>SCN
Cycle crossing delay <esc>Wn<CR>SCD
Cycle durations on X <esc>SMSC
Cycle hysteresis <esc>Wn<CR>SCE
Cycle threshold <esc>Wn<CR>SCS
Cycle W.F. # <esc>SCW
Cycles on graph <esc>SGC
Data pen <esc>PD
Diamond symbol size <esc>SDGDD
Display both crossings<esc>SWB
Display crossings <esc>SWM
Display cycle activity <esc>SSWD
Display cycle lengths <esc>SWC
Display relative levels <esc>SDTR
Display resolution <esc>SDWR
Display resolution <esc>Wn<CR>SR
Display std dev <esc>SDTS
End of run <esc>SRE
Extend interpolation <esc>SDTX
Filter cutoff freq. <esc>MFC
Filter gain factor <esc>MFA
Filter W.F. # <esc>MFW
Find max trace amplitude <esc>SLTWF
Find second max trace ampl.
<esc>SLSTWF
Fixed W.F. level bins <esc>SLWF
Flip durations <esc>SMBF
Flip L.D.P. and duration <esc>SMLF
Frame list <esc>SATF
Freq. units <esc>SDUF
Get cursor readings <esc>SDTC
Graph description <esc>SDD
Graph tag symbol <esc>SDGT
Graph type <esc>SDGG
Highpass filtering <esc>MFH
Histogram display <esc>SDTH
Histogram type <esc>SDGH
Interpolation <esc>SDTI
Main Menu
Main graph title <esc>SDM
Mark frame positions on W.F. <esc>SDWM
Mark frame positions on W.F. <esc>Wn<CR>SM
Markers pen <esc>PM
Max. area under spike (A/D sum <esc>Wn<CR>SSUSU
Max. cycle discriminator <esc>Wn<CR>SCLU
Max inter-spike interval <esc>SMIU
Max. spike width <esc>Wn<CR>SSUWU
Max trace level <esc>SDSYTU
Max W.F. amplitude <esc>SLWRU
Max W.F. level <esc>SDSYWU
Max W.F. section <esc>SDWT
Max W.F. section <esc>Wn<CR>ST
Max window discr. <esc>MFU
Max X <esc>SDSXU
Max Y <esc>SDSYU
Max Y- hist <esc>SDSYHU
Min. area under spike (A/D sum) <esc>Wn<CR>SSUSL
Min. cycle discriminator <esc>Wn<CR>SCLL
Min inter-spike interval <esc>SMIL
Min. interval between spikes <esc>Wn<CR>SSUOI
Min. spike width <esc>Wn<CR>SSUWL
Min trace level <esc>SDSYTL
Min W.F. amplitude <esc>SLWRL
Min W.F. level <esc>SDSYWL
Min window discr. <esc>MFL
Min X <esc>SDSXL
Min Y <esc>SDSYL
Min Y- hist <esc>SDSYHL
Normalization <esc>SGN
Number list format <esc>SDN
# bins- avg <esc>SAB
# bins- graph <esc>SGB
# of cycle activity bursts <esc>Wn<CR>SCV
# of deleted sections <esc>SRD
# of single-unit data sets <esc>Wn<CR>SSUA
# of spike trains <esc>Wn<CR>SST
Overlay bins <esc>SDTO
Overlay second waveform <esc>SDWO
Partial W.F. resolution <esc>SWP
Plot file <esc>PF
Plot interp. <esc>PI
Plot screen redraw <esc>PS
Plot text <esc>PT
Preview averaged data <esc>SAP
Range W.F.# <esc>SRW
Raw W.F. # list <esc>SWL
Rectifier baseline <esc>MFB
Rectify before filtering <esc>MFR
Regression degree <esc>SGR
Relative burst durations <esc>SMBR
Reverse spike occurrences <esc>SSWR
Run file <esc>SF
Main Menu
Sample rate divisor <esc>MFD
Sample units <esc>SDUL
Second ampl. trace # <esc>SLSTN
Second ampl. W.F. # <esc>SLSWN
Second max W.F. ampl. <esc>SLSWRU
Second min W.F. ampl. <esc>SLSWRL
Second spike discriminator
<esc>Wn<CR>SSUD
Second trace ampl. as % of max <esc>SLSTP
Second trace ampl. integration <esc>SLSTWI
Second trace ampl. point <esc>SLSTS
Second trace ampl. point window <esc>SLSTWS
Second trace ampl. ref <esc>SLSTR
Second trace ampl. ref window <esc>SLSTWR
Second W.F. ampl. as % of max <esc>SLSWP
Show areas under curves <esc>SDTA
Show time on X-axis <esc>SMLT
Single-unit data set #
<esc>Wn<CR>SSUN
Spike activity name <esc>Wn<CR>SSN
Spike baseline <esc>Wn<CR>SSUB
Spike corr. W.F. # <esc>SSCN
Spike discriminator <esc>Wn<CR>SSD
Spike display window delay <esc>Wn<CR>SSUOD
Spike display window size <esc>Wn<CR>SSUOW
Spike hysteresis <esc>Wn<CR>SSE
Spike threshold <esc>Wn<CR>SSS
Spike trace # <esc>SSTN
Spike train gap <esc>Wn<CR>SSTG
Spike W.F. # <esc>SSWN
Spikes to skip <esc>SSWS
Start bin-avg <esc>SAS
Start bin-graph <esc>SGS
Start of run <esc>SRS
Std. deviation type <esc>SDGS
Strict triggering <esc>Wn<CR>SCT
Main Menu
Tag list <esc>ST
Take interval after spike <esc>SMIA
Time units <esc>SDUT
Top title display <esc>SDTT
Trace ampl. as % of max <esc>SLTP
Trace ampl. integration <esc>SLTWI
Trace ampl. point window <esc>SLTWS
Trace ampl. ref window <esc>SLTWR
Trace amplitude point <esc>SLTS
Trace amplitude ref <esc>SLTR
Trace # list <esc>SATT
Trace spike delay <esc>SSTO
Trace spike discr. <esc>SSTD
Trace spike hysteresis <esc>SSTE
Trace spike threshold <esc>SSTS
W.F. ampl. as % of max <esc>SLWP
W.F. amplitude delay <esc>SLWD
W.F. amplitude window <esc>SLWW
W.F. avg delay <esc>SAWD
W.F. avg window <esc>SAWW
W.F. Interpolation <esc>SDWI
W.F. Interpolation <esc>Wn<CR>SI
W.F. # list <esc>SAWL
X scale bars <esc>SDSXS
X-axis cycle offset <esc>SMSXC
X-axis W.F. # <esc>SMSXW
Y scale bars <esc>SDSYS
Y-axis cycle offset <esc>SMSYC
Y-axis W.F. # <esc>SMSYW
Zero-lag filtering <esc>MFZ
Main Menu
End of Analysis Parameters section