Description Usage Arguments Details
View source: R/SpikeExtraction.R
This function uses much less memory, especially if the recording session is very long.
1 2 3 4 5 | spikeExtractionTetrodeTrialByTrial(rs, df, tetrodeNumber, minPassHz = 800,
maxPassHz = 5000, powerWindowSizeMs = 0.4, powerWindowSlideMs = 0.1,
SDThreshold = 2, simultaneousSpikeMaxJitterMs = 0.2,
spikeDetectionRefractoryMs = 0.5, waveformWindowSizeMs = 1,
firstSample = 0, lastSample = -1)
|
rs |
RecSession object |
df |
DatFile object |
tetrodeNumber |
Tetrode number. Index starts at 1. |
minPassHz |
Minimal frequency in Hz that is kept before calculating power |
maxPassHz |
Maximal frequency in Hz that is kept |
powerWindowSizeMs |
Size in ms of the sliding window to calculate power |
powerWindowSlideMs |
Shift of the power window between calculation of power |
SDThreshold |
Power threshold in standard deviation above the mean for detection of a spike |
simultaneousSpikeMaxJitterMs |
Use to join spikes detected on several channels |
spikeDetectionRefractoryMs |
Period of refractory in the detection of spikes |
waveformWindowSizeMs |
Window size used when extracting the spike waveforms. |
firstSample |
First sample to consider in spike detection, by default 0, indices start at 0 |
lastSample |
Last sample to consider in spike detection, if not set by user, all samples will be used |
A RecSession object is used to get the information about the assignation of the recorded channels to tetrodes and the file names. For each channel of the tetrode, the raw signal is band pass filtered and the power is estimated with the root mean square in sliding windows. Baseline variation in power are estimated by the standard deviation of power. Time windows above a threshold contain a spike. The spike times are aligned to the most negative value within the adjacent windows with power above the threshold. The spike times in sample number are saved in sessionName.res.tetrodeNumber. The spike waveforms are saved in binary format in sessionName.spk.tetrodeNumber. The features of spikes are obtained via principal component analysis and 3 features are kept for each channel. The spike features are saved in sessionName.fet.tetrodeNumber.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.