|
RA Response Area Data Collection Users Guide |
|
Table of Contents
See also RA Technical Notes |
Ravi Kochhar Department of Physiology University of Wisconsin Madison, Wi. 53706 Technical Report no. 3 Oct. 24, 1996 Rev. 1.012, Aug. 24, 2001 ![]() |
Back to Top
(1) Introduction
The program RA runs on the VAX/VMS computer and is used for single
unit data collection with auditory (sound) stimuli.
It can be used to present many different types
of auditory stimuli, e.g.
tones, AM, Clicks, Noise etc.
One or two channels of sound can be presented with many possible variations
of Intensity (SPL), Duration Time, and Number of Reps. etc.
Upto two parameters (e.g. FREQ and SPL) can be varied
systematically (or randomly) over a specified range.
These are called the RA-variables, or more specifically, the
X-variable and the Y-variable.
Some possible RA-variables are FREQ, SPL, DELAY, FMOD, DMOD
etc.
Unit (spike time) data can be collected with a user settable time base
of 1.0 microsec or larger.
All times are synchronized to the start of stimulus onset.
(2) Starting RA
RA can be started in one of two ways:
In most cases it is an advantage to use the second method for starting
RA (i.e. run DCP first, then use "XP RA" to start RA).
The reasons for this are:
(1) There are many query frames in RA, if you start DCP first you have a
chance to use a macro to set many of the variables that don't change much
during an experiment.
This greatly reduces the amount of typing needed.
(2) When started from DCP, the RA program stays in memory (RAM) when finished
with data collection for any data set.
Then it starts up very quickly for the next data set.
If started directly from the $ prompt, RA must be loaded from disc for each
data set, wasting several precious seconds.
It is helpful to be somewhat familiar with DCP
commands before using RA.
(3) Query Frames
When started by either method, the program presents a series of query
frames and expects the user to answer questions.
The query frames are each numbered (e.g. 1,2,3...etc.).
A typical query frame (#9) is shown below
The final query frame (#100) displays the estimated time (in minutes) for
that particular run, and waits for you to enter "Y" to proceed with
stimulus presentation.
At present there are 46 different query frames in RA.
They can be seen by clicking here.
Of course only some of the frames are presented for any particular paradigm.
This list can be further reduced by use of the "FRAMES #1 #2.." command
in DCP to limit the frames to the most essential for a particular experiment.
You can also "pre-answer" any or all questions via commands in a
DCP macro.
(4) Stimulus Types
The RA program can be used to present many different types of
auditory stimulus.
You may choose to play the same (or a different) stimulus type from
one or two channels of DSS output.
A "stimulus point" consists of an arbitrary (user specified) number
of repetitions of a stimulus.
The user may specify a "duration time", a "repetiton time" and the
"number of repetitons". These are illustrated in the following diagram.
Please note the following general points about the stimulus (see figure above):
The accuracy with which the timers are set depends on the value of the
time. The following table lists the accuracy:
The following is a list of available stimulus types,
followed by a brief description of each:
Pure Tone
A Pure Tone stimulus is simply a sine wave of consisting of a single
frequency.
Amplitude Modulation (AM)
An Amplitude Modulated (AM) waveform refers to a sine wave (tone) whose
amplitude is modulated by a sine wave of another frequency.
The two sine waves are referred to respectively as the carrier and the
modulater.
An AM waveform with zero modulation depth (Dm=0) is the same as a sine wave.
The following diagrams show the same carrier (Fc=1000Hz) and modulator
(Fm=50Hz) frequencies with two different modulation depths.
(Dm=1 and Dm=0.5).
Note that the waveform with more modulation depth has a greater peak
amplitude, all other factors being the same.
The above figure illustrates an AM waveform with 100% modulation.
(Fc=1000, Fm=50, Dm=1.0).
The above figure illustrates an AM waveform with 50% modulation.
(Fc=1000, Fm=50, Dm=0.5).
General Waveform
A "General Waveform" stimulus refers to a stimulus waveform that is
pre-computed and stored in a file on disk, and played back during data
collection.
The waveform is loaded from disk to the waveform buffer (GEWAB) memory
of the DSS.
Examples include clicks, speech and noise waveforms.
This type of waveform offers the maximum flexibility in the type of
waveform that can be used, since anything that be computed or visualized
can be played.
The main downside is that may take a few seconds to load each waveform
from disk, and also it is necessary to pre-compute waveforms.
The longest waveform that can be played is limited by the DSS waveform
buffer memory, and in the current DSS (DSS-II), that limit is 1 million
points per channel.
At present (Feb. 1999), the program can only read waveforms
stored in the GW format (described elsewhere), but may be expanded in
the future to include other file formats.
General Waveforms can optionally be "flattened" for the phone
characteristics using the previously stored acoustic phone calibration.
This flattening is done "on demand" as needed during data collection,
and can introduce a delay of upto several seconds depending on the size
of the waveform.
The flattening for calibration is an option that can be either enabled
or disabled by one of two ways (a) by use of the "SET GW FLAT @1 @2"
command in DCP, or by answering the relevant question in frame # 16,
as shown below:
If the question had been answered "N" then no flattening is done and
the waveform is played out unmodified.
If the the question: "Flatten with Claibration (Y/N) ?" is answered
with an "A", then the waveform correction is done for Amplitude values
only, if it answered with a "P", then for Phase values only, and if with
a "Y", then both amplitude and phase are corrected (flattened)/
The program does correctly re-flatten the waveform whenever any change
occurs that may affect its spectral characteristics.
One example of this is when the playback resolution (GWRES) is one of
the RA variables.
A new flattened waveform is computed for each different value of GWRES.
The flattening process does not rotate, shift or filter the waveform
in any way (other than that necessary for compensate for the calibration).
The following note is relevant to some older data collected using the GW
stimulus type, for the case where DSNUM (data set number) was one of
the RA-variables:
Gewab AM
A "Gewab AM" stimulus refers to a stimulus waveform where either a general
waveform (noise, speech etc.) modulates a (sine) tone, or where a sine wave
modulates a general waveform.
A general waveform is any waveform that can be stored in the memory of
the stimulus system (DSS).
The following paragraph explains the way in which the attenuator is
set for the two Gewab AM cases.
Shifted GW
The "Shifted GW" (or SHFTGW) stimulus (proposed by Philip Joris) is
an important paradigm for the study of binaural phenomenon.
It is similar to the case
of the normal GW (General Waveform) stimulus with the following two
important differences:
These seemingly minor changes result in dramatic differences between the
GW and SHFTGW cases.
Introducing a difference in the playback rate to one ear results in
the sensation of a "moving" stimulus that appears to travel along the
azimuth.
The direction of movement depends on whether the playback rate is less or
more than the "normal" stimulus, and the rate of movement is dependent
on the magnitude of the rate difference.
The traditional method for studying "movement" is to simulate it at
discrete points along the azimuth by presenting successive stimuli
with varying Interaural Time Differences (ITD's).
This does an effective job of simulate movement along the azimuth, but
suffers from two main drawbacks, (a) It is slow, esp. if fine steps
along azimuth are to simulated, and (b) It offers no way of varying the
"rate of movement".
These two drawbacks are addressed effectively by the Shifted GW stimulus.
The RA program allows the following parameters to be varied when
the Shifted GW is selected:
SPL DELAY ITRATE ITD1#S ITD2#S
The SPL is the sound pressure level and is normally used to set an
appropriate level for unit response. It, along with DELAY (initial delay),
is normally not varied in this paradigm.
ITD1 and ITD2 refer to the "initial" and "final" delays between the
stimulus to the two ears.
Since the playback rates are different for the SHFTGW stimulus, ITD1 and
ITD2 need not be equal.
(The #S suffix after ITD1 and ITD2 refers to the fact that these are
referenced to the "slave" DSS channel, thus a positive ITD1#S means that
the slave stimulus starts after the master - see figure below).
It is important to keep in mind that for this stimulus, the same number of
waveform points are played for both channels, only the playback rate or
delays are varied. Also, the same waveform is played for each
channel (except for the time playback rate difference).
The following figure illustrates these parameters:
In the above example, ITD1#S is not equal to ITD2#S, and this is
the general case.
Also, in this example, ITD1#S is positive while ITD2#S is negative.
The same number of points are played for both channels, therefore
the fact that slave duration is less than the master duration implies
that, in this example, slave playback rate is higher than the master
playback rate, i.e. Rs > Rm.
The "movement rate" (or ITD rate, or ITRATE for short) is determined
by the difference between Rm and Rs.
The RA program simplifies things for the experimenter by letting the
user specify ITRATE (in units of microsecs per second) rather than
having to compute Rm and Rs (the playback rates).
In fact Rm is fixed at the "normal" playback rate which is part of
the GW waveform.
Rs is computed as follows:
ITRATE is specified in units of Microsecs/second.
The above equations yield an exact value for INT(s) (the slave
playback interval in microsecs).
However, the DSS is a digital device and there is a finite accuracy
with which playback intervals can be set.
The RA program sets the actual playback interval to the nearest value
that can be achieved by the hardware.
For example, if the computed interval is 5.3215 microsecs, the actual
(achievable) value may be 5.32146 microsecs.
This aparently minor difference can lead to noticable differences for
long duration times (i.e. for low values of ITRATE).
For example, consider the following case:
The RA program displays the actual (exact) values for INT(s), ITRATE
and ITD2#S on the screen during data collection.
It is also possible to compute these at a later date by using the
program ITRATECOR.
A note about the accuracy of GW playback
The Digital Stimulus System (DSS-II) (see Ref. 1) is used for playback
of all general waveforms.
It uses a base clock of 524.288 KHz, but for General Waveform (GW) playback
it requires 12 microcycles, which means that the smallest playback
interval is 2.2888 microsecs.
Playback rates greater than this are achieved by "skipping" certain
points.
For example, if we want to play a waveform at 1.1444 microsec interval
(between points), the DSS will skip every alternate point.
If we want to play a waveform at 2.2888*(2/3)=1.5259 microsecs interval,
then the DSS will skip every third point, and so on.
This means that playback intervals are not constrained to being just
integer multiples of the minimum interval, and much faster, and much
finer, steps can be achieved in practice.
However, there is still a limit on how accurately a specific interval
can be achieved.
This is because the GEWAB playback rate (the so-called GEWAB frequency)
is specified as a 32-bit integer with 200,000 (octal) corresponding to the
max rate of 524.288*(10/12)=436.907 KHz.
This means in practice that we can achieve a GEWAB frequency (playback rate)
of (for example) 200,000 and 177,777 (octal) but nothing in-between.
Let us take a concrete example:
Suppose we want to play a waveform at exactly 5.00000 microsec interval.
What can we really achieve?
This can be computed as follows:
A similar calculation for a desired value of 2.00000 microsecs yields
2.0000267 microsecs as the actual interval.
For 10.00000 microsecs, we actually get 10.000677.
Thus we see that there is a small but non-zero error for most playback
intervals.
For most experiments, this is entirely insignificant.
However, for the Shifted GW case, where small differences in GW interval
are combined with long playback durations (several seconds), it can
result in a noticeable difference in the values of ITRATE and ITD2#S
(as illustrated above, see the Shifted GW description).
A necessary allowance should be made during analysis.
The program ITRATECOR can be very helpful for this.
(5) Data Collection
After all questions have been answered, the program proceeds with
presenting the stimulus and collecting data.
Incoming data is automatically added to the end of the current data file
as a new data set.
While data collection is in progress, RA graphs the incoming
data on the workstation screen in near real time.
These plots include some commonly used measures such as a Response Area,
Rate Curve, PST, ISIH, Cycle histogram etc.
You can choose (query frame #15) between 1 and 6 plots from a menu
for on-line display.
These plots are updated approx. every 2 seconds.
The on-line graphing is asynchronous with the data collection and storage
and does not affect stimulus timing in any direct way.
In addition to the plots, RA displays another menu in the terminal window.
This menu contains a number of Interrupt Commands that can be used to
modify data collection in midstream.
The menu is shoum below:
For instance, if you lost the unit and wanted to terminate RA while
discarding the current data set, simply type AP (Abort Program).
On the other hand, if you wanted to improve the recording by moving the
electrode a bit, use HP to Hold Program, then move the electrode,
then type RP to Resume Program form the point where it was held.
The current values of the RA-variables are also displayed and updated
in this window.
During data collection, please watch the on-line graphs for feedback, and
also keep an eye on the oscilloscope to make sure that the trigger level
is set right.
RA does not have any way of distinguishing bad triggers from good ones.
When all specified stimuli have been presented, the program
updates the data file and returns
control to either DCP or the "$" prompt.
Data storage is in a lab standard format described by a
Data Schema.
At this point you may choose to either collect more data, look for another
unit, or use RAP to analyze the data.
(9) Acknowledgements
This work was done under the direction of Dr. W.S. Rhode, and
also benefited from comments of the many users of the Physiology
Auditory Laboratory. Support provided in part by a Grant from NIH.
If you have questions or suggestions about this document,
please send them by e-mail to
kochhar@physiology.wisc.edu
Return to Computing Page
(1) By typing "RA" at the $ prompt.
or (2) By giving the command "XP RA" within DCP
Please enter the FREQ range
Low : 500 Hz
High : 3000 Hz
In steps of : 200 Hz
Randomize (Y/N) : Y
OK (Y/N) : ?
This frame is used to set the Frequency range over which data will be
collected.
When a query frame is on the screen, you can use the arrow keys to move
to the proper field and change any value by typing it in.
Answering the "OK (Y/N) ?" question with a Y (or RETURN) means you
accept these values and the program proceeds to the next query frame.
Other useful keystrokes are:
CTRL-P Previous Frame
CTRL-G GO (skip remaining frames)
CTRL-Z Terminate RA program
Please pay attention to the units of the various parameters.
Times are mostly specified in millisecs, except for Delay which is
specified in microsecs.
In each case the units are displayed on the query frames next to the values.
Time Value (millisecs) Accuracy
---------------------- --------
0 to 64 1 microsec
64 to 640 10 microsecs
640 to 6400 100 microsecs
6400 to 64000 1 millisec
64000 to 640000 10 millisecs
640000 to 6400000 100 millisecs
6400000 to 64000000 1 second
64000000 to 640000000 10 seconds
Pure (Sine) Tone
Amplitude Modulated (AM)
General Waveform (GEWAB)
Masked Stimulus(gw+tone)
GEWAB AM (tone mods. GW)
GEWAB AM (GW mods. tone)
Shifted GEWAB (SHFTGW)
Synth. Single Formant
Click pairs
GEWAB pairs
Computed AM (CAM)
Virtual Space (VS)
Synthetic Notch (SYN)
Computed Noise (CNOIS)
Specify GEWAB param for Master DSS (#1) :
Waveform Storage File Name : GW.DAT
Waveform ID : CLK100
Data Set Number : 1
SPL (dB) : 30
Compute Effective SPL (Y/N) : Y
Unfrozen Noise (Y/N) : N
Flatten with Calibration (Y/N) : Y (A=Amp,P=Phase only)
Filter for GW (or NONE) : NONE
OK (Y/N) : ?
The following two recent changes in the RA data collection program
may affect how you interpret data already stored, and data stored in
the future.
These changes only impact data collection where at least one of the
RA-variables is either DSNUM or GWRES _and_ "Effective SPL" computation
is asked for (by using the command "SET GW ESPL Y" or answering
the related question in frame # 16) - no other cases are affected.
Until last week (1/20/1999), if the RA-variable was DSNUM _and_
"effective SPL" was set to Y, the program would display a warning
message with Frame # 16 stating that this was not allowed, and
automatically set the "effective SPL" flag to N, i.e. it did not
use "effective SPL" even if it was asked for. It did correctly record
within the data set header that this flag was N. It proceeded to
set attenuators using a default translation of 0 db SPL = 127 dB Atten,
which is what is normally used when the "eff. SPL" option is set to N.
Therefore, it is possible that some data may have been collected
with "eff. SPl"=N, when it was actually intended to be collected
using "eff. SPL"=Y. This is for the case where one of the variables
was DSNUM (data set number). In every case the GWESPL flag that
is stored with the data set header is correct (it's value can be
examined with the RAP command "GV V1 GWESPL"). If necessary, the
correct "eff SPL" can be computed after the fact for old data, using
the GWE program (option 21).
As described in the change notice below, as of 1/20/1999 the program
has been changed to allow "eff SPL"=Y with the case of varying DSNUM.
The other affected case is when GWRES (GW playback resolution) is
one of the variables. This is a fairly new RA option, and no useful
data is believed to exist for this case. This is the second case
described below.
Done: 1/19/1999 (V4.049)
Modified RA so it now computes an "effective SPL" (if so asked)
for each GW stimulus when GWRES is varied. For example, if
GWRES is the variable, and it is varied from 10,20, to 30 microsecs,
and the "effective SPL" is asked for (in query frame # 16), then
the effective SPL is computed for each individual GWRES case
separately. Before today (Jan. 19, 1999), the program would
compute the effective SPL only once (using the default GWRES stored
within the GW dataset) and apply that to all the different GWRES's
that were varied.
Done: 1/20/1999 (V4.050)
Modified RA so that it now permits computation of "effective SPL"
(if so asked) when DSNUM is one of the RA-variables (e.g. with
a general waveform stimulus type). Before today (Jan. 20, 1999),
the program would display a warning message if this was attempted
and simply set the "Compute Effective SPL" flag to "N". After
this change, the program now pauses between each stimulus point
to compute the effective SPL of each new waveform, as necessary.
Done: 5/18/2000 (V4.068)
Changed the way in which RA computes attenuator setting for
the case of "GEWAB AM" stimulus type. Until today, the max.
SPL was simply set to 127 dB for all cases of GEWAB AM stimulus
type (i.e. whether "Tone modulates GW" or "GW modulates Tone").
Now (after 5/18/2000), the case of "Tone modulates GW" is the
same as before, i.e. max. SPL = 127 dB for all stim. points, but
for the case of "GW modulates Tone", the max. SPL which is
used for computing attenuator setting is now computed by fetching
the phone calibration value at the tone carrier frequency and
subtracting 6 dB from it. The GW waveform is ignored for this
purpose. The 6 dB subtraction is done because of the way the
waveform is presented - it will have half the amplitude of
a regular tone stimulus when mod. depth = 0 (i.e. Valc is fixed at 0.5)
where INT(s) is the playback interval for the slave DSS and INT(m)
is the playback interval for the master DSS.
Thus: Rs = 1/INT(s) and Rm = 1/INT(m).
The units of INT(s) will be the same as INT(m), normally microsecs.
INT(s)=INT(m).(1 + ITRATE/1000000)
INT(s)=INT(m).(1 - ITRATE/1000000)
This yields a value for INT(s) of 4.9950 usecs.
However, the DSS will actually achieve 4.994839 usecs, which leads
to the following actual values for ITRATE and ITD2#s:
iTemp=int((('200000)*(1000/436.907))/5.00000)
Actual Interval=(('200000)*(1000/436.907))/iTemp)
(where '200000 means Octal 200000 and int(...) means integer portion of)
which yields a value of 5.000167 microsecs.
Interrupt Commands : NREPS : 200
STIM DUR : 50.0
AP Abort Program (and discard data) REP TIME : 100.0
TP Terminate Program (and save data)
HP Hold Program
RP Resume Program ATTN-1= 81
CT Change Threshold (set min Y-var) ATTN-2= -1
GB Go Back and repeat some points
Command : ??
Back to The Basement
This page last modified on : Mar. 6, 2002