xcorr

The 'xcorr' analysis routine computes cross-correlograms (CCGs), auto-correlograms (ACGs), and all-way shift-predictors. It operates on spike data and continuous (float) data.

A peak at negative times means that chan1 fires before chan2. Thus, the time axis shows what chan1 does relative to a spike on chan2. (Note, the nData Viewer has the opposite convention, which is that the first channel (Channel 0) is the reference channel.)

Options:

Parameter definitions:

Example:


#
#  Compute cross-correlation and shift-predictor, avarage over all trials.
#
xcorr
all
plot

chan1 unit0        # 'unit0' is name of first channel of data
chan2 unit1        # 'unit1' is name of first channel of data

sampling 1000.0    # time units are milliseconds

start 200          # start of analysis window
period 1800        # length of analysis window
lag 200            # plot CCG from plus/minus this time lag

sigma 2.0          # SD of Gaussian for smoothing the CCG (not shift predictor)

xcorr_flag 1       # Write the raw CCG to the output file
shift_flag 1       # Write the shift predictor to the output file
diff_flag 1        # Write the difference, CCC - shift, to output file

xnorm gmsr         # Use the 'geometric mean spike rate' normalization

Example:

#
#  Cross-correlation and shift-predictor for continous data
#
xcorr
group 1 direction
plot

chan1 v1_opp1       # name of first channel of data
chan2 mt            # name of second channel of data

sampling 1000.0     # time units are milliseconds

start 50            # start of analysis window
period 950          # length of analysis window
lag 200             # plot CCG from plus/minus this time lag

sigma        2.0    # SD of Gaussian for smoothing the CCG (not shift predictor)
shift_sigma  0.0    # SD of Gaussian for smoothing the shift predictor

shift_type  simple  # 'simple' is the only choice for float data.

xcorr_flag 1        # Write the raw CCG to the output file
shift_flag 1        # Write the shift predictor to the output file
diff_flag 1         # Write the difference, CCC - shift, to output file

xnorm  zscore       # 'zscore', 'zeromean' or 'raw'

Example:

#
#  Cross-correlation for coherence series from Newsome Data.
#
xcorr
group 1 coherence
special_01

start 300
period 1700
lag 200
xnorm gmsr
centerflag 1
mintrials 4
weight_flag 1
weight_power 0.0

condition
point_count_min unit0 300 1700 4
point_count_min unit1 300 1700 4