CAVG
Home ›
Software ›
Manual Pages ›
CAVG
Section: User Commands (1)
Updated:
Index
Return to Main Contents
NAME
cavg - combined capture and averaging
SYNOPSIS
cavg
[
-n
] [
-f
runfile
] [
-p
parmfile
]
DESCRIPTION
Cavg
captures a
run
of data from the
A/D converter,
much like
cap(1).
The difference is that only one frame is generated
in the frame file, consisting of the
average
of all sweeps triggered from each of the
triggered channels.
(If you select a multi-bin average, there will be one frame
generated in the frame file for each bin.)
The untriggered channels are stored in individual
waveform files,
as for
cap.
You have the option to
perform a disk capture
or a queued capture.
A disk capture allows a higher transfer rate,
but defers the calculation of the average until after the
data have been captured, limiting its usefulness.
For a queued capture,
while the averaged traces are being calculated, they are
displayed periodically on the screen, so you can see what you
are capturing.
The queued capture also allows you to stop the data capture before the
run length has expired, by typing a
Q,
or by limiting the number of sweeps.
Cavg
maintains, in your current directory, the file
default.cap,
which keeps track of all the parameters used to control the
data capture.
If this file does not exist in your current directory, it will be created.
Also, if there is no
default.cap
in your current directory,
cavg
will attempt to load the parameter file of the same name,
from the directory
/usr/neuro/lib/parmgrps.
Cavg
allows you to set all required parameters,
and then brings you to its main menu, described below.
If
cavg
is invoked with either the
-n
option, the
-f
option, or the
-p
option, it will not go into its initial parameter setting mode,
but will instead bring you to its main menu
right away.
The
-n
option will cause all current parameter values to be used for
the next capture.
The
-f
option allows you to specify an alternate output file name,
runfile;
all other current parameter values are taken as-is.
The
-p
option allows you to specify a parameter set,
parmfile,
to be loaded;
all parameter values other than the output file name are taken from
this file.
The
parmfile
name can be a simple parameter set name, to be taken from your
current parameter group, or a name of the form
groupname/setname
to load a set from any parameter group.
When
cavg
is invoked without any of the above options,
it displays all current parameter values.
A line at the top of the display shows the free disk space remaining
on the current volume.
The right side-bar shows a list of alternate parameter sets which can
be loaded,
or a list of parameter groups.
Parameters and parameter sets are handled in exactly the same way as with
cap(1).
The "# of Bins" parameter selects the number of bins used in a
multi-bin, real-time average.
It also determines whether the program will make use of the
tagging information on the trigger signal.
When this number is
0,
the average is a single bin (single frame) containing all sweeps
captured, and the tagging information is ignored.
When another number is given,
automatic tagging is enabled, and
the averages are calculated in the
specified number of bins, where each bin receives sweeps with a
specific tag value.
(I.e. sweeps with tag 0 go in the 1st bin, tag 1 in the 2nd, and
so on.)
The bins are written out to the frame data file as one frame for each bin.
Use this feature only if your hardware is set up for this.
See
TAGGING
in
dsepr(1)
for more details.
Once you have finished setting the parameters, and wish to proceed to
the data capture, press either
C
or
Q.
The entered parameters are then saved in the file
default.cap,
and you are brought to the main menu, where you can begin the capture.
Unlike in
cap(1),
you cannot abort the parameter setting by pressing ESCAPE.
After ending the initial parameter setting,
cavg
displays its main menu at the bottom of the screen, as follows:
-
Bin-shift Continue Load New-avg Parameters Quit Save Undo View
An operation is initiated by typing a single letter, the first
letter of an item in the menu line.
You can also step through the menu using the space bar and the
backspace (or erase) key, to highlight the item you want, then
press RETURN to select that item.
You will usually begin with the
New-avg
selection, described below, to begin a new
run
of averaged data.
You can then add to that run using the
Bin-shift
and
Continue
selections.
All three of these selections capture into a temporary buffer in
your current directory.
(The programs alternates between the temporary run files
undo0,
undo1
and
undo2.)
At any time, you can back up to the previous state by selecting
Undo,
or save the data in its current state by selecting
Save.
The operations selectable from the menu are as follows:
Bin-shift
This selection allows you to
restart the capture from scratch on a new bin or set of bins,
but keeping the bins already captured in the current run.
The capture will be restarted, prompting you again to hit RETURN
or SPACE before the capturing actually begins,
just like the capture started by the
New-avg
selection.
The capture of untriggered channels, if any, is restarted from scratch.
In order to be able to add to an existing run, it is important that the
parameters are compatible with those used to capture the run to
which you are adding.
The capture program will ensure this by making sure that
the sampling rate,
the window duration and delay,
and the channel assignments and divisors
are all the same in the old run as in the current parameters.
Parameters that you are allowed to change include
the file name,
the run length,
the trigger mode,
the number of bins (OK for
Bin-shift, not for Continue),
the number of sweeps,
the trigger threshold,
and the queue buffer length.
Continue
This selection allows you to
resume the capture which just ended, adding more sweeps to the current average.
You are asked how many additional sweeps you want to capture.
If you aborted the last capture before reaching the specified
maximum number of sweeps, then the difference will be the default
value, allowing you to complete the capture.
If you reached the maximum, the default value will be the
specified maximum number of sweeps, allowing you to capture
another "set" of sweeps.
In either case, you can specify any number you want, and as usual
you will be able to abort the capture before that number is
reached (for a queued capture).
Once you enter the number, or just hit RETURN,
the capture will be restarted, prompting you again to hit RETURN
or SPACE before the capturing actually begins,
just like the capture started by the
New-avg
selection.
If you had captured untriggered channels, the old data from these
are discarded, and the capture of these channels is restarted from scratch.
As for the
Bin-shift
selection,
the capture program will ensure that the parameters are compatible.
Also, it will check that there are bins in the run, and
that the number of bins is the same, since
you want to add into the same bins.
Load
This selection allows you to
copy any saved run of averaged data into a temporary buffer, so
you can add to it with the
Bin-shift
or
Continue
selections.
You are asked for the name of the run to load.
The run you select will be copied into a buffer, then
cavg
will show you the data just loaded, by calling the
qm
program, just like the
View
selection below.
New-avg
This selection allows you to
start up a new capture, using the current parameter settings.
The program will capture a new run of averaged data into a
temporary buffer, which you can save later.
Cavg
invokes
qcavg
or
dcavg
to perform the capture and averaging.
(See
dsepr(1)
for more details about the data capture,
and about the files produced.)
In either case, you will be prompted to hit RETURN
or SPACE before the capturing actually begins.
The capture program will copy the calibration information
into the run header
of the frame file it will create.
Once the capture has completed,
cavg
will show you the data just captured, by calling the
qm
program, just like the
View
selection below.
Parameters
This selection allows you to
change your current parameter values.
It brings you to the parameter editing screen it presented
initially, allowing you to set individual parameters or load
parameter sets.
See
cap(1)
for more details about how to do this.
Press
Q
to leave the parameter setting screen, and return to the main menu.
It is also possible to load in a parameter set, without leaving
the main menu.
If you hit a key that corresponds to one of the twelve parameter
sets in your current group, while at the main menu, the parameter
set is loaded.
Note that the parameter values are not redisplayed on the screen
when this is done.
On an X Window terminal,
the keys
F1
through
F12
are used to load in the twelve parameter sets.
On ASCII terminals, use
1
through
9,
0
and
-
to load the first eleven sets.
The
=
key will not select the twelfth set from the main menu, as it
already serves another function;
it will work correctly from the parameter setting screen.
Quit
This selection
causes the program to terminate.
Save
This selection allows you to
save the current run of averaged data.
If the current run has already been saved, you will be warned of this;
just hit a key to erase the message and go on.
You are asked for the run file name.
The default value is the current value of the "File" parameter,
but you can change the parameter at this point by entering a new name.
If you decide not to save, (for instance, if the run is already saved),
hit ESCAPE at the file name prompt, to return to the main menu.
Once you enter the file name, or just hit RETURN,
the run will be saved under the given name.
If a run of that name already existed, you will be asked if it's
OK to overwrite it.
You are then asked to provide a
run description
for the run just saved.
When prompted, enter a single line of text describing the run.
Cavg
will then attempt to "increment" the run file name parameter
so that the next time you save a run,
it will be set to the next run number.
Undo
This selection allows you to
back out of an unwanted change to your data.
For example, if you added to your current run with the
Bin-shift
or
Continue
selection, and don't like the result, selecting
Undo
will put things back to the previous state.
It will also show you the data again, by calling the
qm
program, just like the
View
selection below.
View
This selection allows you to
view the current data again.
The
qm(1)
program is simply called again, letting you see the same run.
Once you quit the
qm
program, you are returned to the menu shown above.
If you modified the data at all, while in
qm,
(for example, using its
Run/Calc
selection),
then an
Undo
operation will restore the data to the state it was when the
View
was started.
!command
Whenever the menu line has just been printed,
instead of typing a letter to select a menu item,
you can type an exclamation point, followed by any UNIX command,
then hit RETURN.
A UNIX shell is invoked to interpret and execute this command.
You can recall and edit the last command entered, by hitting the
"up arrow" key, or Control-K, after typing the exclamation point.
$ or %
Whenever the menu line has just been printed,
you can also type either a dollar sign
($),
to invoke an interactive Bourne shell,
or a percent sign
(%),
to invoke an interactive C shell.
In either case, the shell will continue accepting commands until
you type a
Control-D,
to exit from the shell, and return to
this program.
? or /
Whenever the menu line has just been printed,
you can also type either a question mark
(?),
or slash
(/),
to get a short description of all choices available in the current menu.
NOTES
Cavg
should be run from a graphics terminal, in order to view
the captured traces.
It can be run from other types of terminals, to capture data,
but no graphs will be generated on screen.
Unlike with the previous version of
cavg,
runs must now be saved explicitly.
If you do not save a run that you want to keep, it will be lost
when the temporary buffer in which it was captured is re-used.
Although there are three buffers, you can really only undo the
last change made, not the last two.
This is because a buffer is used (temporarily) whenever
cavg
calls
qm.
On an X Window terminal,
cavg
clears the
KEYMAP
environment variable while it is running, to disable any keyboard
mapping you may have enabled, such as the ISO Latin 1 character set.
It does this so that the function keys, which are mapped internally to
upper-half 8-bit characters, have their usual assignments.
The side effect is that if you selected an alternate keyboard
mapping, it will not work while in
cavg,
or in any program called from
cavg.
X WINDOW SUPPORT
When
cavg
is run from an
xterm
(or
kterm)
window on an X Window terminal,
a new window will be shown.
Like the other X Window programs in this package,
cavg
will recognise the usual X command line options,
such as
-display,
-geometry,
-font,
etc.
The environment variables for setting these options will also work.
(This is provided that the
DISPLAY
environment variable is set, and
TERM
is set to xterm or kterm.)
See
analysis(1)
for details on X options and environment variables.
FILES
default.cap default capture parameters
/usr/neuro/lib/parmgrps/*.ini configuration files
/usr/neuro/lib/parmgrps/editprms.grp group list
/usr/neuro/lib/parmgrps/*/editprms.grp parameter set lists
/usr/neuro/lib/parmgrps/*/*.cap parameter sets
default.cal calibration information
/usr/neuro/lib/default.cal system calibration file
undo?.??? temporary capture buffer files
*.raw produced by disk capture
*.frm the frame file
*.w[0-9][0-9] untriggered waveforms
*.txt run description text line
*.p?? parameter files
SEE ALSO
dsepr(1), cap(1), calibrate(1), lsrun(1), analysis(1), qm(1)
BUGS
Due to bugs in the kernel (pre-3.0 release),
dcavg
(the disk capture)
may cause the system to hang.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- Bin-shift
-
- Continue
-
- Load
-
- New-avg
-
- Parameters
-
- Quit
-
- Save
-
- Undo
-
- View
-
- !command
-
- $ or %
-
- ? or /
-
- NOTES
-
- X WINDOW SUPPORT
-
- FILES
-
- SEE ALSO
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 17:58:02 GMT, February 20, 2019
Copyright © G. R. Detillieux,
Spinal Cord Research Centre,
The University of Manitoba.