findSpikes
findSpikes
Searches NSx data structure for spikes by thresholding. The output is
compatible with NEV.Data.Spikes data structure.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Use OUTPUT = findSpikes(NSx, 'threshold', 'preThreshold', 'spikeLength', 'channels', 'duration', 'filter')
NSx: The data structure holding the NSx structure
NOTE: All following input arguments are optional. Input arguments may
be in any order.
'threshold': The threshold value to apply to the file.
DEFAULT: -65 uV
'preThreshold': The number of pre-threshold crossing samples to save.
DEFAULT: 10
'spikeLength': Length of each extracted spike in number of samples.
DEFAULT: 48
'channels': The channels to perform spike extraction on.
DEFAULT: will perform spike extraction on all channels
'duration': The duration of file to perform spike extraction on.
DEFAULT: will perform extraction on the entire file
'filter': The filter cut-off frequency applied before spike
extraction.
DEFAULT: no filter will be applied
OUTPUT: Contains the NEV.Spikes structure.
USAGE EXAMPLE:
Spikes = findSpikes(NSx, 'channels', 1:3, 'duration', 1:10000, 'threshold', -65);
In the above example the NSx analog data is searched for spikes on
channels 1 through 3 for samples between 1 and 10000. Threshold is
set to -65 uV for all channels.
Spikes = findSpikes(NSx, 'channels', 1:3, 'threshold', [-65 -100 -85]);
In the above example the NSx analog data is searched for spikes among
channels 1 to 3. Thresholds for channel 1 is set to -65 uV, for channel
2 is set to -100 uV, and for channel 3 is set to -85 uV.
Original Author: Ehsan Azar
Contributors:
Kian Torab, Blackrock Microsystems, ktorab@blackrockmicro.com
Version 1.0.2.0