lockedTrain {STAR} | R Documentation |
lockedTrain
constructs and plot.lockedTrain
(and
print.lockedTrain
) plot what van Stokkum et al (1986) call a time-dependent
cross-correlation diagram. The lags between spikes of a test and a
reference trains are plotted against the time of occurrence or the
rank of the reference train spikes.
lockedTrain(stRef, stTest, laglim, acquisitionWindow) ## S3 method for class 'lockedTrain': plot(x, keepTime = FALSE, stimTimeCourse = NULL, colStim = "grey80", xlim, pch, xlab, ylab, main, ...) ## S3 method for class 'lockedTrain': print(x,...)
stRef |
a spikeTrain or a repeatedTrain object. |
stTest |
a spikeTrain or a repeatedTrain object. If
missing(stTest) is TRUE then stRef is used. |
x |
a lockedTrain object. |
laglim |
a two elements vector, the time window (in s) in which
spikes in stTest around spikes in stRef are looked
for. Default value are supplied when the argument is missing (+/- 3
times the sd of the inter-spike intervals of stRef ). |
acquisitionWindow |
a 2 elements vector specifying the begining and
the end of the acquisition. If missing values are obtained
using the floor of the smallest spike time and the
ceiling of the largest one. |
keepTime |
a logical, if TRUE the ordinate is shown in s,
otherwise (default) the spike index is shown. |
stimTimeCourse |
NULL (default) or a two elements vector
specifying the time boundaries (in s) of a stimulus presentation. |
colStim |
the background color used for the stimulus. |
xlim |
a numeric (default value supplied). See plot . |
pch |
data symbol used for the spikes. See plot . |
xlab |
a character (default value supplied). See plot . |
ylab |
a character (default value supplied). See plot . |
main |
a character (default value supplied). See plot . |
... |
see plot or print . |
The time-dependent cross-correlation diagram is described in van
Stokkum et al (1986) and is also used by Brillinger (1992) Fig. 4. For
each spike of stRef
neighboring spikes of stTest
are
selected within a window defined by laglim
. The lag between
these stTest
spikes and the ones of stRef
are displayed
(that is, the times of the stRef
spikes is subtracted from the
times of the neighboring spikes in stTest
).
If repeatedTrain
s are given for stRef
and stTest
they must have
the same number of components and are interpreted as coming from
repetitions of the same stimulation, the spike times of the different
trains of stRef
are therefore reordered.
The ordinate on the plot generated by plot.lockedTrain
can be
in term of real time or in term of stRef
spike indexes.
If stimTimeCourse
is specified a box corresponding to the
stimulus presentation is drawn in the background.
lockedTrain
returns a LIST of class lockedTrain
with the
following components:
shiftedT |
a list of lists. Each sublist has three components:
refTime , the time of the reference spike; repIdx , the
index of the stimulus repeat to which the reference spike belongs;
crossTime , a vector of shifted times of the test
neurons. These times are shifted because they are expressed with
respect to the reference spike time. |
nbRefSpikes |
the total number of reference spikes used. |
nbTestSpikes |
the total number of test spikes occurring during the same observation period. |
laglim |
the value of laglim used. |
acquisitionWindow |
the value of the acquisitionWindow used. |
obsTime |
the total observation time used (in s). |
call |
the matched call. |
plot.lockedTrain
and print.lockedTrain
are used for
their side effects: a plot is generated. print.lockedTrain
calls plot.lockedTrain
.
plot.lockedTrain
displays essentially the "raw data" from which a
cross-intensity histogram is built.
Christophe Pouzat christophe.pouzat@gmail.com
van Stokkum, I. H., Johannesma, P. I. and Eggermont, J. J. (1986) Representation of time-dependent correlation and recurrence time functions. A new method to analyse non-stationary point processes. Biol Cybern 55: 17–24.
Brillinger, David R. (1992) Nerve Cell Spike Train Data Analysis: A Progression of Technique. JASA 87: 260–271.
as.spikeTrain
,
as.repeatedTrain
,
raster
## Not run: ## load spontaneous data of 4 putative projection neurons ## simultaneously recorded from the cockroach (Periplaneta ## americana) antennal lobe data(CAL1S) ## convert data into spikeTrain objects CAL1S <- lapply(CAL1S,as.spikeTrain) ## look at the individual trains ## first the "raw" data CAL1S[["neuron 1"]] ## contruct the lockedTrain of each neuron with itself and look at ## it using a lag of +/- 25 ms lockedTrain(CAL1S[["neuron 1"]],laglim=c(-1,1)*0.025) lockedTrain(CAL1S[["neuron 2"]],laglim=c(-1,1)*0.025) lockedTrain(CAL1S[["neuron 3"]],laglim=c(-1,1)*0.025) lockedTrain(CAL1S[["neuron 4"]],laglim=c(-1,1)*0.025) ## Look at the Vanillin responses ## Get the data data(CAL1V) ## convert them into repeatedTrain objects ## The stimulus command is on between 4.49 s and 4.99s CAL1V <- lapply(CAL1V,as.repeatedTrain) ## look at the individual raster plots plot(CAL1V[["neuron 1"]],stimTimeCourse=c(4.49,4.99),main="N1") plot(CAL1V[["neuron 2"]],stimTimeCourse=c(4.49,4.99),main="N2") plot(CAL1V[["neuron 3"]],stimTimeCourse=c(4.49,4.99),main="N3") plot(CAL1V[["neuron 4"]],stimTimeCourse=c(4.49,4.99),main="N4") ## construct the locked train for the 3 pairs with neuron 1 as a ## reference plot(lockedTrain(CAL1V[["neuron 1"]],CAL1V[["neuron 3"]], laglim=0.01*c(-1,1)),stimTimeCourse=c(4.49,4.99),pch="*") plot(lockedTrain(CAL1V[["neuron 1"]],CAL1V[["neuron 2"]], laglim=0.01*c(-1,1)),stimTimeCourse=c(4.49,4.99),pch="*") plot(lockedTrain(CAL1V[["neuron 1"]],CAL1V[["neuron 4"]], laglim=0.01*c(-1,1)),stimTimeCourse=c(4.49,4.99),pch="*") ## End(Not run)