Skip to content

hazem171/Spike-Sorting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spike-Sorting

Implementing the spike sorting algorithm. The function takes as inputs the raw extracellular activity of multiple electrodes. The function returns a vector that contains the timestamps of the peaks of the detected spikes for each neuron and a vector for the mean spike of each neuron. the function is applied on the data in the file “Data.txt”. Each column in the data file corresponds to one electrode. The sampling rate of this data is 24414 Hz. To detect spikes, the computed threshold is as either 3.5 times the standard deviation of the first 500 samples of each electrode, or 5 times the standard deviation of the first 500 samples of each electrode. Spikes are aligned based on their peak value. Extracted spikes have duration 2 msec, where the peak is at the center of the extracted spike window. Attached files: • The feature space obtained for each electrode after applying Principal Component Analysis (PCA) to the aligned extracted spikes of each electrode. Using two principal components. The figures “FeatureSpace_1_3_5.jpg” for electrode 1 and “FeatureSpace_2_3_5.jpg” for electrode 2 for threshold of 3.5 times the standard deviation, and “FeatureSpace_1_5.jpg” for electrode 1 and “FeatureSpace_2_5.jpg” for electrode 2 for threshold of 5 times the standard deviation are obtained. • A text file stating the number of clusters that you identified by visual inspection of the feature space of each electrode. The files “Number of Neurons_3_5.txt” for threshold of 3.5 times the standard deviation and “Number of Neurons_5.txt” for threshold of 5 times the standard deviation are obtained. • A figure showing the first 20,000 samples of the raw data of each channel with an “*” marking the detected spikes colored with different colors depending on the neuron each spike belongs to. The figures “DetectedSpikes_1_3_5.jpg” for electrode 1 and “DetectedSpikes_2_3_5.jpg” for electrode 2 for threshold of 3.5 times the standard deviation, and “DetectedSpikes_1_5.jpg” for electrode 1 and “DetectedSpikes_2_5.jpg” for electrode 2 for threshold of 5 times the standard deviation are all obtained. • A figure showing the average spike of each neuron colored with different colors. The figures “Templates_3_5.jpg” for threshold of 3.5 times the standard deviation, and “Templates_5.jpg” for threshold of 5 times the standard deviation are obtained.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published