| Description |
% function sdf=SDFConv(spk,AlignEv,bn,ktype,sig)
%
% Inputs:
% SPK: = SPK is a 2D numeric array with the timestamp (in ms) for each
% spike in each trial down the other. SPK is assumed to be
% Nan-padded so that it's width is equal to the maximum number of
% spikes in one trial.
% ALIGNEV: = A vector of the time of the Align event in each trial. The
% program converts it to a column vector if it isn't already.
% Defaults to all zeros (assuming the input is already
% aligned)
% BN: = The time bin around the Align event you you would like
% to analyze. In form [starttime endtime]. Defaults to [-300 800]
% *Note that the effects from spikes from before bn(1) are
% included in the smoothed histogram, i.e. sdf, (including
% effects from spikes up to the kernel's half-width before
% bn(1)), though the time is not included in the output of the
% smoothed histogram
% KTYPE: = The type of kernel to use. 1 for PSP kernel, 2 for Gaussian
% kernel. Defaults to 1
% For an explanation of the PSP kernel, see:
% Thompson KG, Hanes DP, Bichot NP and Schall JD (1996).
% Perceptual and motor processing stages identified in the
% activity of macaque frontal eye field neurons during visual
% search. Journal of Neurophysiology. 76:4040-4055.
%
% SIG: = If using a gaussian kernel, this is the value of sigma (i.e.
% the std of the kernel) in units of ms. Defaults to 30
%
% OUTPUTS
% SDF: = The smoothed histogram
%
% Note- this doesn't require a for loop, and such easy translation into
% histograms is the main advantage to storing spikes in a 2D trials array
% padded with Nans, which is why it was determined to store spikes in that
% way.
%
% By Matt Nelson
|