SCRC Analysis User’s Manual

ANALYSIS User’s Manual

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

 


 

********** Documentation Topics for quick reference
Analysis Overview
Set-range data range selection
Setting Cycles what is a cycle? and overview
Normalization creating normalized step cycles
Polar-Plots
Statistics
Cursors
Preview-Data viewing data that will make up an average
Raw Waveform Display viewing waveforms
Frame&Trace-display viewing waveforms and associated frames
X and Y Axis scaling
Overview of Trace Analysis
Example: Trace Average
Analyses Directory the 22 analyses methods
Setting Analysis Parameters changing default parameters
Script Files automated analysis with examples

 


 

************ The top menu of the Analysis program.
Analysis directory of available analyses
Bins-save export data: ASCII values, averages
Calibration calibration information (see calibrate program)
Directory
Go perform chosen analysis
Keep save current parameter set
Load load new parameters or data
Maint blank stimulus artefact
change run descriptors
erase, differentiate, filter, rectify waveforms
Gen-Trig: turn a frame trigger pulse into a waveform
Link-Waveform: create multiple parameter sets for one waveform
Make Waveform: turn a trace into a waveform
Reframe: create new frames based on events in a waveform
Select-frame: delete inappropriate frames
Trim (discard) sections of the run

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)

Analysis-Overview Main Menu

 


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 Menu) and available as a stand alone program https://scrc.sites.umanitoba.ca/our-research/scrc-data-capture-and-analysis-software/scrc-data-capture-and-analysis-users-guide/frmsel-users-guide/
– Traces can be viewed with Quick Measure https://scrc.sites.umanitoba.ca/our-research/scrc-data-capture-and-analysis-software/scrc-data-capture-and-analysis-users-guide/qm-guide/

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 https://scrc.sites.umanitoba.ca/wp-content/uploads/sites/18/2024/07/umanitoba.ca/our-research/scrc-data-capture-and-analysis-software/scrc-data-capture-and-analysis-users-guide/frmsel-users-guide/) 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

 

 

  1. Trace averaging by frame list <esc>ATF, cycle ATC, W.F level ATW, tag ATF
    Trace averaging is performed on all traces in the “Trace # list” <esc>SATT. In all trace averages frames can be excluded. Thus deleted frames, and frames whose tag values are not in the “Tag list” <esc>ST are excluded. Use the Select-frames option under the Maintenance sub menu to automatically or manually flag frames as deleted.a. In the “Trace averaging by frame list” <esc>ATF, you can select frames not only by setting the analysis range and/or by deleting or tagging frames, but also via the “Frame list” <esc>SATF.

    b. In the “Trace averaging based on cycle phase” <esc>ATC, the number of bins selected by the “# bins- avg” <esc>SAB parameter evenly divides the normalized cycle, as selected by the “Cycle W.F. #” <esc>SCW. See the discussion on Setting Cycles.

    c. In the “Trace averaging based on W.F. level” <esc>ATW analysis, the bins evenly divide the range of voltage levels measured from the waveform selected by the “Amplitude W.F. #” <esc>SLWN. Each frame in the range to be analyzed is added in to the appropriate bin, based on the waveform level associated with the frame. The parameters “W.F. amplitude delay” <esc>SLWD and “W.F. amplitude window” <esc>SLWW indicate a range of points, relative to the point where the frame was triggered, used to obtain a level reading on the waveform. The range of voltage levels can be restricted to a smaller range, by setting the parameters “Min W.F. amplitude” <esc>SLWRL and “Max W.F. amplitude” <esc>SLWRU (or <esc>SLWRA for auto-range or <esc>SLWRV for visual setting). Only frames whose associated waveform level readings stay within these bounds will be included in the average. Normally, these two parameters only restrict the range, and do not enlarge it: if the parameters are beyond the range of voltage levels in the waveform, it is the measured range which is divided into bins, not the range defined by the parameters. However, if the “Fixed W.F. level bins” <esc>SLWF option is enabled, then the two parameters above will always define the range which is divided into bins, even if it exceeds the range of levels in the waveform. Frames occurring during the inactive phase of cycles on the waveform selected by the “Cycle W.F. #” <esc>SCW, can be excluded by enabling the “Active cycle phase only” <esc>SLTA option. This restricts the average to frames that occur between the start and stop times of activity in any cycle. If the “Base cycles on stop time” <esc>SCS option is also enabled, then the opposite is true; frames occurring in the inactive phases are included, and frames in the active phases are left out. “Trace averaging based on tag value” also supports the “Active cycle phase only” option. These options are discussed in Setting Cycles.

    d. In the “Trace averaging based on tag value” <esc>ATF, a number of bins are set up for each trace, corresponding to the tag values in the “Tag list” <esc>ST. Each frame in the range to be analyzed is added in to the appropriate bin, based on its tag value and where this value appears in the list. Analysis Directory Main Menu

  2. Trace amplitude vs step cycle <esc>AGTV, W.F. AGTT, Trace AGTY, Frame AGTB
    The amplitude of a point on a trace can measured automatically for all frames within the current analysis range. The trace selected for automatic measurement is the “Amplitude trace #” <esc>SLTN. A graph is created where the Y axis is the individual (raw) or averaged (bins) trace amplitudes and the X axis can be the normalized step cycle <esc>AGTV, the amplitude of a waveform <esc>AGTT, the amplitude of a point on another trace <esc>AGTY, or the frame number (i.e. sequentially in the run) <esc>AGTB. The number of bins in a histogram is controlled by “# bins- graph” <esc>SGB (not SAB which is for frame averages).Two points on the selected trace of each frame, the reference-baseline and point-of-interest, are measured and their difference shown. The position of these two points within the trace are determined by “Trace amplitude point” <esc>SLTS and “Trace amplitude ref” <esc>SLTR. The first parameter selects the point-of-interest and the second selects the reference measurement location. These two parameters can be single points or “windows” (a range of points). If windows are used, the baseline will be averaged if the “Average trace ampl. ref.” <esc>SLTWA option is Yes (default). If windows are used the program can search for the maximum point or the minimum point. The choice between max and min is controlled by “Find max trace amplitude” <esc>SLTWF. If the “Trace ampl. integration” <esc>SLTWI option is enabled, rather than searching for the maximum or minimum point in the “Trace ampl. point window” <esc>SLTWS for each frame, the program will sum (integrate relative to baseline) the points in this range. If either of the two “window” parameters is 0, a single point will be measured (i.e. no window used). A line above the graph will indicate the point or range of points used for measurements. The reference level is subtracted from the sample level to obtain the trace amplitude in the frame regardless of the use of single points or ranges. To take the sample level as an absolute reading (the reference level is not measured) set “Trace amplitude ref” <esc>SLTR to a negative value (e.g. -1p).

    You can also get the trace amplitude calculations to use a sloped trace reference level, rather than a straight horizontal line. By setting the “Trace ampl. ref. regression degree” <esc>SLTWD, you make the analysis program calculate the slope of the data in the reference window, rather than searching for a maximum level or a minimum level, or calculating a flat average level. Curvilinear regression is performed by setting this parameter to the degree desired: 0 for no regression, 1 for linear regression, 2 for quadratic, etc. (up to 20). A regression line or curve will be calculated as the reference level for each frame, and this sloped line or curve will be subtracted from any amplitude measurements taken in that frame, interpolating or extrapolating as needed to determine how the curve fits within the “Trace ampl. point window”. If the degree is set to -1, a linear slope is taken between the two endpoints of the reference range, ignoring points in between.

    Deleted frames, and frames whose tag values are not in the “Tag list” <esc>ST are excluded.

    a. Trace amplitude vs step cycle <esc>AGTV
    Trace measurements for all cycles within the analysis range are plotted against the normalized step cycle. Consult the Normalization section. The WF for cycle selection is chosen by the “Cycle W.F. #” <esc>SCW. For each cycle on the waveform, the corresponding frames are measured and displayed as individual values. The two variations are “Raw trace amplitude vs step cycle” <esc>AGTVR and “Averaged trace amplitude vs step cycle” <esc>AGTVA with the number of bins is set by “# bins- graph” <esc>SGB.

    Develop the possibility to graph the trace amplitude histogram of the averaged bins as well, not only the single point of the averaged amplitude at the start of the bin. [Editor’s note: Could whoever made this request please clarify? I don’t understand what it means -Gilles]
    Analysis Directory
    Main Menu

    b. Trace amplitude vs trace amplitude <esc>AGTY
    The amplitude of a point on one trace is plotted against the amplitude of a point on another trace. The X axis trace is selected by the “Amplitude trace #” <esc>SLTN, and the Y axis trace is selected by the “Second ampl. trace #” <esc>SLSTN.
    The trace amplitude measurements for the X axis are taken the same way they are for the Raw trace amplitude vs step cycle. Frames flagged as deleted, frames whose tag values are not in the “Tag list” <esc>ST and frames outside the analysis range are excluded.
    The amplitude measurements for the trace to be plotted on the Y axis are taken in a very similar way using “Second trace ampl. point” <esc>SLSTS and “Second trace ampl. ref” <esc>SLSTR. These two parameters have corresponding “window” parameters, which can be used to select two ranges of points in the frame’s window; the action taken in these ranges is determined by the parameters “Find second max trace ampl.” <esc>SLSTWF, “Average second trace ampl. ref.” <esc>SLSTWA and “Second trace ampl. integration” <esc>SLSTWI.

    The graph can show individual (raw) <esc>AGTYR or Averaged trace amplitudes <esc>AGTYA where the number of bins on the X-axis is divided is set by “# bins- graph” <esc>SGB, and the Y-axis data is averaged in these bins. Analysis Directory Main Menu

    c. Trace amplitude vs W.F. level <esc>AGTT
    Amplitudes of the trace selected by the “Amplitude trace #” <esc>SLTN, are measured for each frame and graphed with respect to corresponding level measurements (amplitudes) on the waveform selected by the “Amplitude W.F. #” <esc>SLWN. The trace amplitude measurements are taken as in Raw trace amplitude vs step cycle. The waveform amplitude measurements are taken as in Trace averaging based on W.F. level. Deleted frames, and frames whose tag values are not in the “Tag list” <esc>ST are excluded.

    The “Fixed W.F. level bins” <esc>SLWF option actually applies to both the raw and averaged variations of this graph. It has a slightly different effect on the raw graph, since the range of levels is not divided into bins, but it may affect (increase) the range of levels displayed, by “fixing” the range of levels you set. The analysis can be restricted to frames that occur during the active phase of cycles <esc>SLTA, or the inactive phase <esc>SCS, in the same way used for “Trace averaging based on W.F. level” analysis.

    The two variations are the Raw trace amplitude vs W.F. level <esc>AGTRA and the Averaged trace amplitude vs W.F. level <esc>AGTTA. For the averaged graph, the range of voltages in the selected waveform is divided into bins <esc>SABn, and trace measurements are added into these bins and averaged. The “Fixed W.F. level bins” <esc>SLWF option has the same effect here as it does for the “Trace averaging based on W.F. level” analysis above. Analysis Directory Main Menu

    d. Trace amplitude vs frame number <esc>AGTB
    Trace amplitude (“Amplitude trace #” <esc>SLTN) is measured for each frame as for the Raw trace amplitude vs step cycle and plotted against the frame numbers. By default all frames in the analysis range appear on the X axis and in sequence from the first to last frame collected. The “Frame list” <esc>SATF parameter selects the frames to be measured, and the order in which they are presented. A ranges of frame numbers or individual frames can be specified and the order of frames changed. The Frame number for each point on the X axis is the frame’s position in the sequence and not its actual frame number. Only when frames are displayed in sequence, beginning with frame 1, and no frames are excluded are the numbers on the X axis the same as the frame numbers. Deleted frames, and frames whose tag values are not in the “Tag list” <esc>ST are excluded. Analysis Directory Main Menu

  3. W.F. averaging spike triggered <esc>AWSA based on cycle phase <esc>AWCa. W.F. averaging – spike triggered <esc>AWSA
    An average of each waveform in the “W.F. # list” <esc>SAWL is created that is triggered from an event in a reference waveform. Each event in the reference waveform (within the selected analysis range) triggers a “sweep” which is used to obtain an average for each waveform. The events are defined with the window discriminator under the W.F.-activity menu.
    The parameter “W.F. avg window” <esc>SAWW controls the total duration of the averaged data. The “W.F. avg delay” <esc>SAWD parameter creates a positive, zero or negative offset from the trigger point to the beginning of the sweep window. This analysis is also used to create “stimulus triggered” averages of waveforms. If a stimulus marker pulse is captured as a waveform then it can be considered as a “spike” and used to create waveform averages based on the presence of a stimulus.

    “Preview averaged data” <esc>SAP and Bins-save operations can be used to create a new run file of these segments of waveforms.

    If several spikes occur in succession (e.g. multiple shocks) they can be considered as a single train. However, if you want the average to triggered from only the first spike in the train, you must set the analysis up to use trains as cycles, and use the averaging based on cycle phase, below, with a single bin. The duration of activity considered as a single train is also under the W.F.-activity menu. To enable “Base cycles on spike trains”, use Set Cycles Trains <esc>SCT.

    b. W. F. averaging based on cycle phase <esc>AWC
    A number of bins are set up for each waveform in the “W.F. # list” <esc>SAWL, evenly dividing the normalized cycles. For each cycle in the range to be analyzed, a “sweep” is triggered at the start of each bin in the cycle, and the sweep is added into its bin. The window and delay are set as they are for spike triggered averages above.

    This analysis is also used to create “stimulus triggered” averages of waveforms. If a stimulus marker pulse is captured as a waveform then it can be considered as a “step cycle” and used to create waveform averages based on the presence of a stimulus. If multiple shocks are used you may need to use trains as cycles feature to define a single step from a train of shocks. To do this, enable “Base cycles on spike trains” <esc>SCT and set up the trains under the W.F.-activity menu. Analysis Directory Main Menu

  4. W.F. averaging – spikes within cycle <esc>AWBV
    A number of bins are set up for each waveform in the “W.F. # list” <esc>SAWL, evenly dividing the normalized cycles. Each action potential in the range to be analyzed triggers a “sweep” from each of the above waveforms. Sweeps are added in to the appropriate bins, based on the point in the cycle where each sweep was triggered. The window and delay are set as they are for spike triggered averages above. Analysis Directory Main Menu
  5. W.F. averaging – spike occurrence in cycle <esc>AWBS
    A number of bins are set up for each waveform in the “W.F. # list” <esc>SAWL, corresponding to individual action potentials, or spike occurrences, in the cycles. For example, 10 bins represent the first 10 action potentials in each cycle. A sweep is triggered for each of these action potentials, and added into its corresponding bin. The window and delay are set as they are for spike triggered averages above.
    The “Spikes to skip” <esc>SSWS parameter can be set to indicate how many spikes to ignore at the beginning of each cycle. If it were set to, say, 5, then 10 bins would represent the sixth to the fifteenth actions potentials. If the “Reverse spike occurrences” <esc>SSWR option is then enabled, the 10 bins would represent the fifteen down to the sixth action potentials from the end of the cycle. Analysis Directory Main Menu
  6. W.F. averaging based on spike interval <esc>AWSI
    A number of bins are set up for each waveform in the “W.F. # list” <esc>SAWL, evenly dividing the range of inter-spike intervals selected by the “Min inter-spike interval” <esc>SMIL and “Max interspike interval” <esc>SMIU parameters. Each action potential in the range to be analyzed triggers a sweep from each of the above waveforms. Each sweep is added in to the appropriate bin, based on the interval from the previous action potential. No sweep is triggered for the first spike in the range to be analyzed, since no previous spike exists to permit an interval calculation. If the spike trains for the waveform selected by the “Spike W.F. #” <esc>SSWN have been properly set, intervals are calculated and sweeps are triggered only for spikes in the same spike train, and no sweep is triggered for the first spike in each train. The window and delay are set as they are for spike triggered averages above.If the “Take interval after spike” <esc>SMIA option is enabled, the bin for a given sweep is selected based on the interval to the next action potential, rather than the interval from the previous one. No sweep is triggered for the last spike in the range to be analyzed, rather than the first, nor for the last spike in each train, when spike trains are set.
    Analysis Directory Main Menu
  7. W.F. activity start & stop time analysis <esc>AS
    The start or stop of activity on the waveform selected by the “Y-axis W.F. #” <esc>SMSYW is plotted with respect to the start or stop of activity on the waveform selected by the “X-axis W.F. #” <esc>SMSXW. A point is plotted for each cycle on the waveform selected by the “Cycle W.F. #” <esc>SCW, and the start or stop times are calculated relative to the start of the cycle in which they occur. If the “Normalization” <esc>SGN option is enabled, times are calculated as a percentage of the cycle length. See the Normalization section.
    If the option “Base X on stop time” <esc>SMSXS is enabled, times for the end of activity, rather than for the start of activity, are used for the X coordinates. If the option “Base X on spike trains” <esc>SMSXT is enabled, the start or end of spike trains for this waveform are used for the X coordinates, rather than the usual (duty cycle) activity. The “X-axis cycle offset” <esc>SMSXC is used to effectively time-shift the cycles for the purpose of determining in which cycle a particular burst of activity or spike train falls. This allows more reliable results in borderline cases. For example, if a burst usually starts somewhat after the start of the cycle, but starts a bit early for a few cycles, you can select a negative offset of a few milliseconds so that these few bursts will properly be associated with the cycles in which they occur, even though they start a few milliseconds before the start of their associated cycles. Similarly, a positive offset can be used if a few bursts end slightly after the end of the cycle in which they occur. Note that this offset does not affect the calculation of the coordinate, so it is possible to get negative points plotted. Similar options for the Y-axis waveform exist, and are used in the same way.
    If the “Cycle durations on X” <esc>SMSC option is enabled, the usual X-axis is overridden by the cycle durations. In other words, the graph becomes one of start or stop time of activity in cycle, versus cycle duration. Analysis Directory Main Menu
  8. W.F. activity burst duration vs cycle duration <esc>AGWD
    The duration of activity (duty) on the waveform selected by the “Amplitude W.F. #” <esc>SLWN is displayed with respect to the duration of cycles on the waveform selected by the “Cycle W.F. #” <esc>SCW. A point is plotted for each activity burst on the former waveform, which falls into one of the cycles of the latter waveform in the selected range to be analyzed. If the option “Base cycle stats. on start” <esc>SLWA is enabled, the start of activity, rather than the end of activity, is used for the purpose of determining in which cycle a particular burst of activity falls, and where it falls within the cycle.
    The “Burst cycle offset” <esc>SMBC is used to effectively time-shift the cycles for the purpose of determining in which cycle a particular burst of activity falls, much like the cycle offset parameters for the “W.F. activity start & stop time analysis” graph above. The “Burst duration type” <esc>SMBD parameter determines the way in which the burst duration is calculated for each burst of activity. The initial value, 0, means the duration is the time from the start of the burst to the end of it. A 1 means the time from the start of the burst to the start of the next burst. A 2 means the time from the end of the burst to the start of the next, and a 3 means the time from the end of the burst to the end of the next. If the “Relative burst durations” <esc>SMBR option is set, burst durations are shown as a percentage of the corresponding cycle durations.
    If the “Burst positions in cycle” <esc>SMBV option is enabled, the usual X-axis is overridden by the cycle positions of the activity bursts. In other words, the graph becomes one of burst duration versus position of burst in cycle. Just like any of the other graphs of “something” vs cycle, this graph can be normalised (see the normalization section), and the “Cycles on graph” <esc>SGC parameter will then take effect. If the “Flip durations” <esc>SMBF option is enabled, the usual X and Y axes are transposed, giving you a graph of cycle duration versus burst duration. If the “Flip durations” option and the “Burst positions in cycle” option are both enabled, the graph becomes one of cycle duration versus position of burst in cycle. Analysis Directory Main Menu
  9. W.F. amplitude vs step cycle <esc>AGWV vs W.F amplitude <esc>AGWY a. W.F. amplitude vs step cycle <esc>AGWV
    The waveform selected by the “Amplitude W.F. #” <esc>SLWN is plotted against step cycles obtained from the reference waveform selected by the “Cycle W.F. #” <esc>SCW. That is, for each cycle on the reference waveform, the corresponding segment of the “Amplitude W.F, #” is displayed, overlaid by segments corresponding to all other cycles in the range to be analyzed. If the cycle related parameters for the displayed waveform have been properly set, statistics will be given for activity on this waveform, relative to the above cycles. Cycles can be normalized or not. See the Normalization section. The parameters “Min W.F. amplitude” <esc>SLWRL and “Max W.F. amplitude” <esc>SLWRU can restrict the voltage levels allowed in the analysis to a smaller range.

    The two variations are Raw W.F. amplitude vs step cycle <esc>AGWVR and
    Averaged W.F. amplitude vs step cycle <esc>AGWVA. In the averaged graph, the cycles are divided into a number of bins, and averaged. The “locomotor drive potential” reported at the top of this graph is simply the difference between the minimum and the maximum averages calculated.

    b. W.F. level vs W.F. level <esc>AGWY
    A graph of the amplitude of one waveform versus the corresponding levels on another waveform is displayed. The X axis waveform is selected by the “Amplitude W.F. #” <esc>SLWN, and the Y axis waveform is selected by the “Second ampl. W.F. #” <esc>SLSWN.
    The parameters “W.F. amplitude delay” <esc>SLWD and “W.F. amplitude window” <esc>SLWW indicate a range of points, relative to the point where each Y axis waveform sample occurs, used to obtain the corresponding level reading on the X axis waveform. The parameters “Min W.F. amplitude” <esc>SLWRW and “Max W.F. amplitude” <esc>SLWRU can restrict the voltage levels allowed on the X axis to a smaller range. Similarly, the parameters “Second min W.F. ampl.” <esc>SLSWRL and “Second max W.F. ampl.” <esc>SLSWRU restrict the Y axis. Only points whose X and Y axis level readings stay within their respective bounds will be included in the graph.

    The two variations of this graph are Raw W.F. level vs W.F. level <esc>AGWYR and
    Averaged W.F. level vs W.F. level <esc>AGWYA. In the averaged graph, the range of voltage levels for the X axis is divided into a number of bins, and all Y axis levels are added into these bins to obtain an average. The “Fixed W.F. level bins” <esc>SLWF option has the same effect here as it does for the “Trace averaging based on W.F. level” analysis above.

    c. All-points Histogram (plot of WF vs. WF as a histogram) <esc>AGWYA
    In this graph the same waveform can be plotted against itself and a histogram created to give the distribution (incidence) of amplitudes in a waveform. <esc>SLWN selects the number of the first waveform <esc>SLSWN indicate the second waveform number (same as the first). Use <esc>SLWFY to have a fixed (i.e. absolute voltage levels) range. Set the upper and lower bounds of the first waveform range with <esc>SLWRL and <esc>SLWRU . Use <esc>SLSWRL;<esc>SLSWRU to set the levels form the second waveform. In this case these levels must be set to the same values as for the first waveform. Set the number of bins <esc>SGB to be used in the histogram [remember that in order for the binwidth to be fixed the ranges must be set and fixed]. <esc>SDTHY sets the display to a histogram. The data in the histogram can then be exported (see Bins-Save) and used in further statistical analysis. Note that histograms can be obtained of any averaged graph in this way. It’s not limited to this particular analysis, although this one is noteworthy.
    Analysis Directory Main Menu

  10. W.F. L.D.P. level vs cycle duration <esc>AGWL
    The “locomotor drive potential” amplitude on the waveform selected by the “Amplitude W.F. #” <esc>SLWN is plotted with respect to the duration of cycles on the waveform selected by the “Cycle W.F. #” <esc>SCW. A point is plotted for each complete cycle. The L.D.P. for each cycle is calculated as the difference between the minimum and maximum levels measured on the former waveform. The parameters “W.F. amplitude delay” <esc>SLWD and “W.F. amplitude window” <esc>SLWW indicate a range of points, relative to the highest or lowest point in the cycle, used to obtain an average level reading for the maximum or minimum part of the cycle. The parameters “Min W.F. amplitude” <esc>SLWRW and “Max W.F. amplitude” <esc>SLWRU can restrict the voltage levels allowed in the analysis to a smaller range.
    If the “Preview averaged data” <esc>SAP option is enabled, the calculated minimum and maximum levels are displayed as markers on the waveform. You can use the cursor to move the markers to the levels you desire, to correct the L.D.P. calculation. When you exit the preview display, the complete graph is shown. If this option is set, and you are repeating the “Go” operation when the graph does not need to be recalculated, the program will ask you if you want to recalculate it anyway, and if not, whether you want to review the calculated levels.
    If the “Show time on X-axis” <esc>SMLT option is enabled, the usual X-axis is overridden by the cycle start times. In other words, the graph becomes one of L.D.P. amplitude versus time of cycle occurrence in the run. If the “Flip L.D.P. and duration” <esc>SMLF option is enabled, the usual X and Y axes are transposed, giving you a graph of cycle duration versus L.D.P. amplitude. If the “Flip L.D.P. and duration” option and the “Show time on X-axis” option are both enabled, the graph becomes one of cycle duration versus time of cycle occurrence. Analysis Directory Main Menu
  11. Spike train duration vs cycle duration <esc>AGAD
    The duration of spike trains on the waveform selected by the “Spike W.F. #” <esc>SSWN is displayed with respect to the duration of cycles on the waveform selected by the “Cycle W.F. #” <esc>SCW. A point is plotted for each spike train on the former waveform, which falls into one of the cycles of the latter waveform in the selected range to be analyzed. If the option “Base spike stats. on start” <esc>SSWA is enabled, the start of the train, rather than the end of the train, is used for the purpose of determining in which cycle a particular spike train falls, and where it falls within the cycle.
    The “Burst cycle offset” <esc>SMBC, “Burst duration type” <esc>SMBD, “Relative burst durations” <esc>SMBR, “Flip durations” <esc>SMBF, and “Burst positions in cycle” <esc>SMBV parameters have the same effect as in the “W.F. activity burst duration vs cycle duration” graph.Analysis Directory Main Menu
  12. Spike position vs step cycle <esc>AGAVP sorted by cycle length <esc>AGAVSa. Action potential position vs step cycle <esc>AGAVP
    Action potentials occurring on the waveform selected by the “Spike W.F. #” <esc>SSWN are displayed with respect to cycles on the waveform selected by the “Cycle W.F. #” <esc>SCW. That is, for each cycle on the latter waveform, a row of points is drawn, showing where in the cycle each action potential occurred. If the spike trains for the former waveform have been properly set, statistics will be given for activity on this waveform, relative to the above cycles.

    b. Action potential position sorted by cycle length <esc>AGAVS
    In this graph the cycles are sorted in ascending order of cycle length. You will usually want to disable normalization to view this graph, <esc>SGNn.

    For both of these graphs, when you disable “Normalization” <esc>SGN and “Autoscale” <esc>SDSA, you can set the lower bound and upper bound of the X axis to go beyond the start and end of each cycle and the program will display the points occurring in those areas (in the previous or next cycle). This behaviour of manual scaling is unique to this analysis.
    Analysis Directory Main Menu

  13. Spike count vs step cycle <esc>AGAVC vs W.F. level <esc>AGAWCa. Action potential vs step cycle histogram <esc>AGAVC
    The cycles on the waveform selected by the “Cycle W.F. #” <esc>SCW are divided into a number of bins, and each bin counts the number of action potentials, on the waveform selected by the “Spike W.F. #” <esc>SSWN, occurring in its part of the cycle. The resulting graph shows the average number of action potentials in each part of the cycle. If the spike trains for the latter waveform have been properly set, statistics will be given for activity on this waveform, relative to the above cycles.

    b. Action potential vs W.F. level histogram <esc>AGAWC
    The range of voltage levels measured from the waveform selected by the “Amplitude W.F. #” <esc>SLWN is divided into a number of bins. Each bin counts the number of action potentials, on the waveform selected by the “Spike W.F. #” <esc>SSWN, occurring when the level on the first waveform is in the range of this bin. The resulting graph shows the average number of action potentials at each waveform level sub-range.
    The parameters “W.F. amplitude delay” <esc>SLWD and “W.F. amplitude window” <esc>SLWW indicate a range of points, relative to the point where the action potential occurred, used to obtain a level reading on the waveform selected by the “Amplitude W.F. #” <esc>SLWN. The range of voltage levels can be restricted to a smaller range, by setting the parameters “Min W.F. amplitude” <esc>SLWRL and “Max W.F. amplitude” <esc>SLWRU. Only action potentials whose associated waveform level readings stay within these bounds will be included in the histogram.
    Analysis Directory
    Main Menu

  14. Spike vs step cycle interval <esc>AGAVI frequency <esc>AGAVF a. Spike interval vs step cycle
    The intervals between action potentials occurring on the waveform selected by the “Spike W.F. #” <esc>SSWN are displayed with respect to cycles on the waveform selected by the “Cycle W.F. #” <esc>SCW. That is, for each spike on the former waveform, the interval from the previous spike is calculated, and plotted on the graph at the position in the current cycle where this spike occurred. No interval is plotted for the first spike of the first cycle, if no previous spike was found, in the selected range to be analyzed, to permit an interval calculation. If the spike trains for the former waveform have been properly set, statistics will be given for activity on this waveform, relative to the above cycles. Also, in this case, intervals are calculated and plotted only for spikes in the same spike train, and no interval is plotted for the first spike in each train.
    If the “Take interval after spike” <esc>SMIA option is enabled, the interval to the following spike, rather than the previous one, is calculated. No interval is plotted for the last spike of the last cycle, if no following spike is found in the selected range. If spike trains have been set, no interval is plotted for the last spike in each train.
    Instantaneous spike frequency graphs and spike interval graphs are able to calculate and display the frequencies or intervals with more precision than allowed by the effective capture rate of the waveform. The software interpolates between samples at the spike threshold crossing to get a more accurate measurement of the trigger time.

    i. Raw inter-spike interval vs step cycle <esc>AGAVIR
    In this graph, and in the similar raw instantaneous frequency graph below, when you disable “Normalization” <esc>SGN and “Autoscale” <esc>SDSA, you can set the lower bound and upper bound of the X axis to go beyond the start and end of each cycle and the program will display the points occurring in those areas (in the previous or next cycle). This feature will not work for the averaged graphs.

    ii. Averaged inter-spike interval vs step cycle <esc>AGAVIA
    In this graph the cycles are divided into a number of bins, and all data are added into these bins to obtain an average.

    b. Spike frequency vs step cycle <esc>AGAVF
    This graph is similar to the “spike interval vs step cycle” graph except that the instantaneous frequency of each spike (the inverse of the interval) is plotted.

    i. Raw instantaneous spike frequency vs step cycle <esc>AGAVFR
    Similar to the raw inter-spike interval graph above.

    ii. Averaged instantaneous spike frequency vs step cycle <esc>AGAVFA
    This graph is similar to the raw one above, except that the cycles are divided into a number of bins, and all data are added into these bins to obtain an average curve which is displayed. Analysis Directory Main Menu

  15. Spike vs spike occ. interval <esc>AGASI frequency <esc>AGASF a. Spike interval vs spike occurrence
    This graph is similar to the “spike interval vs step cycle” graph above, except that the X-axis is divided into a number of “bins” <esc>SGB, corresponding to individual spike occurrences in each cycle. For each cycle, the intervals for all spikes falling into one of these “bins” are displayed, overlaid by data from all other cycles in the range to be analyzed.
    You can also skip spikes, or sample spike occurrences from the end of the cycle, just like for the “W.F. averaging – spike occurrence in cycle” analysis above. The “Spikes to skip” <esc>SSWS parameter can be set to indicate how many spikes to ignore at the beginning of each cycle. If it were set to, say, 5, then 10 bins would represent the sixth to the fifteenth actions potentials. If the “Reverse spike occurrences” <esc>SSWR option is then enabled, the 10 bins would represent the fifteen down to the sixth action potentials from the end of the cycle.

    The two variations of this are Raw inter-spike interval vs spike occ. <esc>AGASIR, in which
    the bins are not used for averaging, but only to separate spike occurrences in each cycle, and Averaged inter-spike interval vs spike occ. <esc>AGASIA, in which the bins are used for calculating average intervals for each spike occurrence, across all cycles.

    b. Spike frequency vs spike occurrence. <esc>AGASF
    This graph is similar to the “spike interval vs spike occurrence” graph except that the instantaneous frequency of each spike (the inverse of the interval) is plotted.

    The variations are Raw instantaneous spike frequency vs spike occ. <esc>AGASFR, and Averaged instantaneous spike frequency vs spike occ. <esc>AGASFA. In the averaged graph, bins are used for calculating average intervals for each spike occurrence, across all cycles. Analysis Directory Main Menu

  16. Spike vs W.F. level interval <esc>AGAWI frequency <esc>AGAWFa. Spike interval vs W.F. level <esc>AGAWI
    The intervals between action potentials occurring on the waveform selected by the “Spike W.F. #” <esc>SSWN are displayed with respect to the corresponding levels on the waveform selected by the “Amplitude W.F. #” <esc>SLWN. That is, for each spike on the former waveform, the interval from the previous spike is calculated, and plotted on the graph at the position representing the level on the latter waveform. The parameters “W.F. amplitude delay” <esc>SLWD and “W.F. amplitude window” <esc>SLWW indicate a range of points, relative to the point where the action potential occurred, used to obtain a level reading on this latter waveform. The range of voltage levels can be restricted to a smaller range, by setting the parameters “Min W.F. amplitude” <esc>SLWRL and “Max W.F. amplitude” <esc>SLWRU. Only action potentials whose associated waveform level readings stay within these bounds will be included in the graph.
    No interval is plotted for the first spike in the selected range to be analyzed, since a previous spike is needed to permit an interval calculation. If the spike trains for the former waveform have been properly set, intervals are calculated and plotted only for spikes in the same spike train, and no interval is plotted for the first spike in each train.
    If the “Take interval after spike” <esc>SMIA option is enabled, the interval to the following spike, rather than the previous one, is calculated. No interval is plotted for the last spike of the last cycle, if no following spike is found in the selected range. If spike trains have been set, no interval is plotted for the last spike in each train.
    All W.F. spike vs W.F. level graphs supports the “Active cycle phase only” option, discussed in Setting Cycles.

    Variations are “Raw inter-spike interval vs W.F. level” <esc>AGAWIR, and
    “Averaged inter-spike interval vs W.F. level” <esc>AGAWIA. In the averaged graph the range of voltage levels on the X axis is divided into a number of bins, and an average obtained.

    b. Spike frequency vs W.F. level <esc>AGAWF
    This graph is similar to the “spike interval vs W.F. level” graph above, except that the instantaneous frequency of each spike (the inverse of the interval) is plotted.

    Variations are “Raw instantaneous spike frequency vs W.F. level” <esc>AGAWFR, and
    “Averaged instantaneous spike frequency vs W.F. level” <esc>AGAWFA. In the averaged graph the range of voltage levels on the X axis is divided into a number of bins and an average calculated. Analysis Directory Main Menu

  17. Spike vs Train number interval <esc>AGABI frequency <esc>AGABFa. Averaged inter-spike interval vs Train number <esc>AGABI
    The intervals between action potentials occurring on the waveform selected by the “Spike W.F. #” <esc>SSWN are averaged for each spike train on that waveform, and the averages are displayed for each train. That is, for each spike on this waveform, the interval from the previous spike is calculated. For each train, the mean interval is then plotted on the graph at the position representing the train number.
    The spike trains for this waveform must be properly set. Intervals are calculated and averaged only for spikes in the same spike train, and no interval is measured for the first spike in each train. If the “Take interval after spike” <esc>SMIA option is enabled, the interval to the following spike, rather than the previous one, is calculated. No interval is plotted for the last spike of the last cycle, if no following spike is found in the selected range. If spike trains have been set, no interval is plotted for the last spike in each train.

    b. Spike frequency vs Train number <esc>AGABF
    This graph is similar to the “Averaged inter-spike interval vs Train number” graph above, except that the instantaneous frequency of each spike (the inverse of the interval) is plotted.
    Analysis Directory Main Menu

  18. Spike correlation: cross-correlation <esc>AGCC auto-correlation <esc>AGCAa. W.F. spike cross-correlation <esc>AGCC
    Each action potential on the waveform selected by the “Spike W.F. #” <esc>SSWN, in the range to be analyzed, triggers a “sweep” from the waveform selected by the “Spike corr. W.F. #” <esc>SSCN. The window and delay for these sweeps are set as they are for spike triggered averages above. The sweep window is divided into a number of bins, which count the number of action potentials found in each part of every sweep analyzed. The resulting graph shows the average number of action potentials in each part of the sweep window.
    You can limit the number of spikes counted in each sweep, to a certain number allowed before the sweep was triggered (if using a negative delay), and a certain number allowed after the sweep was triggered. This is done by setting the parameters “Corr. spikes before trigger” <esc>SSCB and “Corr. spikes after trigger” <esc>SSCA.

    The program performs a test of statistical significance on the peak of the graph, and indicates above the graph if the peak is significant. A significant peak is one where the peak count exceeds the mean baseline count by more than 3.29 times the root of this mean. The results of a “K test” are also shown above the graph. These tests are described in Short term synchronization of intercostal motoneurone activity by T. A. Sears and D. Stagg, J. Physiol. (1976), 263, pp. 357-381.

    b. W.F. spike auto-correlation <esc>AGCA
    This graph is similar to the cross-correlation, except that the waveform is analyzed with respect to itself. Only the waveform selected by the “Spike W.F. #” <esc>SSWN is used; the “Spike corr. W.F. #” <esc>SSCN is ignored. Analysis Directory Main Menu

  19. Spike firing level vs step cycle <esc>AGAFV vs spike AGAFS vs firing frequency AGAFF 

    a. Firing level vs step cycle <esc>AGAFV
    The firing levels at each action potential are displayed with respect to cycles on the waveform selected by the “Cycle W.F. #” <esc>SCW. That is, for each spike on the waveform selected by the “Spike W.F. #” <esc>SSWN, the level is measured at that same location on the waveform selected by the “Amplitude W.F. #” <esc>SLWN, and displayed on the graph at the position in the current cycle where this spike occurred. The parameters “W.F. amplitude delay” <esc>SLWD and “W.F. amplitude window” <esc>SLWW indicate a range of points, relative to the point where the action potential occurred, used to obtain a level reading on this waveform. The range of voltage levels can be restricted to a smaller range, by setting the parameters “Min W.F. amplitude” <esc>SLWRL and “Max W.F. amplitude” <esc>SLWRU. Only action potentials whose associated waveform level readings stay within these bounds will be included in the graph.
    This graph is most useful when dealing with a differentiated waveform. Spikes on the differentiated waveform, indicating high rates of change in level on the original waveform, can be used to trigger firing level measurements on the original waveform.
    If the spike trains for the waveform selected by the “Spike W.F. #” <esc>SSWN have been properly set, statistics will be given for activity on this waveform, relative to the above cycles.Variations are “Raw firing level vs step cycle” <esc>AGAFVR, and
    “Averaged firing level vs step cycle” <esc>AGAFVA. In the averaged graph the cycles are divided into a number of bins and data averaged.

    b. Firing level vs spike occurrence. <esc>AGAFS Raw Averaged
    This graph is similar to the “firing level vs step cycle” graph above, except that the X-axis is divided into a number of “bins” <esc>SGB, corresponding to individual spike occurrences in each cycle. For each cycle, the firing levels for all spikes falling into one of these “bins” are displayed, overlaid by data from all other cycles in the range to be analyzed.
    You can also skip spikes, or sample spike occurrences from the end of the cycle, just like for the “W.F. averaging – spike occurrence in cycle” analysis above. The “Spikes to skip” <esc>SSWS parameter can be set to indicate how many spikes to ignore at the beginning of each cycle. If it were set to, say, 5, then 10 bins would represent the sixth to the fifteenth actions potentials. If the “Reverse spike occurrences” <esc>SSWR option is then enabled, the 10 bins would represent the fifteen down to the sixth action potentials from the end of the cycle.

    Variations are “Raw firing level vs spike occ.” <esc>AGAFSA, in which the bins are not used for averaging, but only to separate spike occurrences in each cycle, and
    “Averaged firing level vs spike occ.” <esc>AGAFSA, in which the bins are used for calculating average firing levels for each spike occurrence, across all cycles, and a single average curve is displayed.

    c. Firing level vs firing frequency <esc>AGAFF
    The firing levels at each action potential, calculated as for the “firing level vs step cycle” graphs above, are displayed with respect to the instantaneous frequency of each action potential. No point is displayed for the first spike in the range to be analyzed, since no previous spike exists to permit a frequency calculation. If the spike trains for the waveform selected by the “Spike W.F. #” <esc>SSWN have been properly set, frequencies are calculated and points are displayed only for spikes in the same spike train, and no point is displayed for the first spike in each train.
    If the “Take interval after spike” <esc>SMIA option is enabled, the interval to the following spike, rather than the previous one, is calculated. No interval is plotted for the last spike of the last cycle, if no following spike is found in the selected range. If spike trains have been set, no interval is plotted for the last spike in each train. Analysis Directory Main Menu

  20. Trace spike vs step cycle count <esc>AGIS latencies <esc>AGIL 

    a. Trace spike count vs step cycle <esc>AGIS
    The number of spikes found for each frame, on the trace selected by the “Spike trace #” <esc>SSTN, are plotted against cycles on the waveform selected by the “Cycle W.F. #” <esc>SCW. That is, for each cycle on the latter waveform, the corresponding frames are examined. For each of these frames, the selected trace is searched for spikes, and the number of spikes found is shown on the graph, at the position in the cycle where the frame was triggered. The spike measurement is controlled by the parameters “Trace spike threshold” <esc>SSTS, “Trace spike hysteresis” <esc>SSTE, and “Trace spike discr.” <esc>SSTD. The “Trace spike delay” <esc>SSTO is simply an offset from the start of the frame’s window where the search for spikes is to begin; if set, spikes before this delay are ignored. The data for all cycles in the range to be analyzed are overlaid on the graph. Deleted frames, and frames whose tag values are not in the “Tag list” <esc>ST are excluded.Variations are “Raw trace spike count vs step cycle <esc>AGISR, and
    “Averaged trace spike count vs step cycle” <esc>AGISA.
    In the averaged graph the cycles are divided into a number of bins, and data averaged.

    b. Raw trace spike latencies vs step cycle <esc>AGIL
    The latencies of spikes found for each frame, on the trace selected by the “Spike trace #” <esc>SSTN, are displayed with respect to cycles on the waveform selected by the “Cycle W.F. #” <esc>SCW. That is, for each cycle on the latter waveform, the corresponding frames are examined. For each of these frames, the selected trace is searched for spikes, and the latencies of all spikes found are shown on the graph, at the position in the cycle where the frame was triggered. The spike measurement is controlled by the same parameters as for the trace spike count graphs above. Latencies are measured from the point in the window where the search for spikes begins. The data for all cycles in the range to be analyzed are overlaid on the graph. Deleted frames, and frames whose tag values are not in the “Tag list” <esc>ST are excluded. Analysis Directory Main Menu

 


 

File Operations
File Types: Analysis vs W.F. parameters, raw vs. averaged files
Load
Keep
Bins-save
W.F activity
Load
Keep
Export
Dump-run
Asc2-run
Axon2-run

 


 

Setting Analysis Parameters Script Files Main Menu
The Set selection, from the Main Menu, is used to set the various analysis parameters. All parameters can be set in “text mode,” where you type in the number or string desired. When setting a numeric parameter in “text mode,” you can enter the word “min” or “max” to set it to the minimum or maximum allowed value. A full listing of parameters ALPHABETICAL LISTING is presented. In most cases, use View/Required (<esc>VR) to see the parameters that must be set for the chosen analysis method and to see which menu is used to set them. Many will be changed through the Set menu.

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

 


 

Using script files from outside of the analysis program
A script file is a text file that contains the letters that would be typed to perform an analysis. They must be in the exact order and carriage returns are critical. Once debugged, they allow almost complete automation of many types of analysis. Analysis scripts can “fed” into the analysis program using the standard Unix redirection conventions. For example to feed a file called “analysis-made-easy” into the analysis program, make sure that you are in a Unix shell and type:
analysis runfilename < analysis-made-easy
More commonly, analysis scripts are included within a standard Unix shell script files. All examples described here require the Unix “Bourne” shell and may not work with the “C” shell. By combining Unix and analysis commands, it is possible to search a directory for all the data runs and perform analysis operations on each file.

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) https://scrc.sites.umanitoba.ca/our-research/scrc-data-capture-and-analysis-software/scrc-data-capture-and-analysis-users-guide/frmsel-users-guide/

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.

 


 

*************** Calibration sub menu Main Menu

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 Erase-W.F. erases a waveform. The waveform parameters are also deleted, so this can be used to remove a virtual waveform link. There is no recovery or undo from this operation. 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- Gen.-trigger turns a trigger signal into a waveform which can then be used for certain analyses based on waveform spikes. The current run file must be a run of raw data (i.e. not just averages) contain framing.
This operation is useful for creating averages from a waveform of the effects of a stimulus but when stimulus marker pulses were not collected as a separate waveform. The use of Gen-Trig or collecting stimulus marker pulses to make a waveform indicating the exact time of stimulus delivery allows these events to be treated as “spikes” and then creating “spike” triggered averages of waveforms.
You are first asked whether to include deleted frames. If these frames had been deleted due to false triggering, you will likely want to exclude them. Otherwise, they should probably be included.
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 containing the trigger at the sampling rate at which the run was captured. This waveform will include a 1 ms duration trigger pulse each time the frames were triggered. Each trigger pulse is followed by a 2 ms encoded level representing the tag value for the frame. See the frame select and dsepr(1) program documentation for more information about tagging of the trigger signal. Maintenance Main
Menu


Maintenance- Link-W.F.
This selection allows you to create a link to a waveform. You are first prompted for the number of the waveform to be linked. You are then asked for the number of the new waveform, which must be different from the first one. If the second waveform already exists, it is erased. The calibration information, and all other information in the run header associated with the first waveform, is duplicated for the new waveform. A link is then made to the waveform data file for this first waveform, so that the same data are available for either waveform number. This allows you to maintain separate sets of waveform parameters (i.e. _____.pnn files) for what is really just one waveform. A maximum of 16 waveforms are supported by analysis. This number includes linked waveforms.
This operation has become obsolete, as it can now be done using a virtual waveform link in the waveform parameters. Whereas this operation requires a file system format that supports file links, the virtual waveform links will work without the need for such a file link, for example on a DOS partition under Linux. Maintenance Main Menu

 


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

 

 

 


 

********** Plotting Sub Menu Main Menu
The Plot selection produces paper plots of the last data display produced by a Go operation and can save the screen image as a disk file (HPGL format) for subsequent manipulation by Layout or other programs (e.g. Corel Draw).

The three most often used Plotting commands are:
<esc>PP plot plotter. Although this can be used for a real plotter, it is the best way to send graphics to an HP compatible printer. Sending HPGL to a laser printer gives the maximum sized plot and the best picture quality. Note that the exact size of the data displayed is scaled according to the presence of labels, units, text, fonts and axes.

<esc>PF plot file saves the current graphics image to disk as HPGL for subsequent importing into layout or a third party graphics program (e.g. Corel Draw). Because this file contains the same information created by a plot plotter operation, the sizes of the data traces are influenced by labels, units, text, fonts and axes. Thus when saving multiple files for importing into a single figure, it is wise not to change any display options. This insures that all data will be scaled the same (avoids stretching or shrinking traces).

<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 https://scrc.sites.umanitoba.ca/our-research/scrc-data-capture-and-analysis-software/scrc-data-capture-and-analysis-users-guide/.
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.


 

************* Error Handling and Reporting
Although this program has been thoroughly tested, it is possible, in a program of this complexity, for some bugs to slip through. Severe errors, such as a memory fault, can cause the program to abort, producing a core dump. If this happens, the core dump will automatically be saved in a special directory, so it can be examined later.

Certain other errors are caught by the program, triggering an “INTERNAL ERROR” message. If this happens, the current set of analysis parameters will automatically be saved in a special directory, for later examination. You will be able to continue in the program, but bear in mind that any results produced at the time of the error will almost certainly be incorrect.

If you detect a bug which does not cause one of the above actions, but produces results which appear incorrect, save your current parameters so that the error can be reproduced, and make a note of the problem. In all of these cases, keep the relevant runs of data online, and report the bug or error.

When analysis reports an error, whether an internal error or a user error, it asks you to hit a key to continue. After reading the message, hit a key from the main keyboard, such as space bar, Return, or Escape. The program will then return to the current menu, and allow you to continue.

If you redirected the standard input to the program, so that it reads its commands from a file, rather than the terminal, then errors (user and internal) will be handled differently. Instead of printing the message, reading the next “keystroke” from the file, and continuing, these errors are fatal; the program will show the message, and then terminate. However, warning messages are not fatal, and the program will simply continue.

 


************** 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 9×15 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 program usage

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.

Main Menu

 


 

************** Setting parameters, using Online HELP, running shells

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

 


 

  1. *********** Analysis Parameters – Alphabetical listing

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.

Parameter to Set              Type In

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

Main Menu

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

Main Menu

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

Main Menu

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