realigneSpikes

PURPOSE ^

realign spikes (after they were upsampled to 100KHz).

SYNOPSIS ^

function [newSpikes,newTimestamps, shifted] = realigneSpikes(allSpikes, allTimestamps, alignParam, stdEstimate, peakAlignMethod)

DESCRIPTION ^

realign spikes (after they were upsampled to 100KHz).

input:
allSpikes: spikes before realignment
allTimestamps: timestamps of those (will be adjusted).
alignParam:   this param is only considered if peakAlignMethod=1.
      1: positive (peak is max)
      2: negative (peak is min)
      3: mixed
stdEstimate: std estimate of the raw signal. only used if peakAlignMethod=1.
peakAlignMethod: (same as in detectSpikesFromPower.m, see for details).  1-> findPeak, 2 ->none, 3-> peak of power signal

returns:
newSpikes
newTimestamps
shifted -> by how many samples was the spike shifted. can be used to adjust the timestamp.

urut/2004
urut/april 2007: revised. now supports multiple peakAlignMethods.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 03-Oct-2007 12:29:38 by m2html © 2003