Skip to content

rasterprep

  RASTERPREP workhorse function for calculating spike correlations

  Example
  [pbin tb intervals]=RASTERPREP(trigger, spiketimes, duration, pretime)

  Inputs: trigger         the trigger times
          spiketimes      the spike times
          duration        sweep duration
          pretime         the pretime period

  Outputs:
          pbin            the histogram counts as number of spikes
          tb              the timebase for the correlation
          intervals       the interspike intervals for each spike:
                                t(n)-t(n-1)

  To calculate a post- or peri - stimulus time raster, debounce the
  triggers before calling rasterprep. For spike-train cross-correlation,
  do not debounce.

  See also debounce
  -------------------------------------------------------------------------
  Author: Malcolm Lidierth 03/08
  Copyright © The Author & King's College London 2008-
  -------------------------------------------------------------------------

  -------------------------------------------------------------------------
  Note that this file may be shadowed by a mex-file and, in that case, will
  not execute. If no mex-file is present, a message will be be issued at
  the command line (once per MATLAB session), and this m-file will be
  executed. Note that the mex-file will run ~5000x faster.
  To produce a mex-file for the current platform, compile rasterprep.cpp
  using mex or sigTOOL('compile')
  -------------------------------------------------------------------------

  Revisions:
  12.12.08  Help text corrected. Remove occasional trailing zero when intervals
            returned and first spike fell in a sweep. rasterprep.cpp
            updated accordingly. Unnecassary for loop removed from m-file