Home > chronux_1_1 > spikesort > SpikeSortingQuickReference.m

SpikeSortingQuickReference

PURPOSE ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SORTING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SORTING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SORTING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0002 
0003 load spikes2
0004 
0005 %% The following commands run the Fee algorithm
0006 spikes = ss_dejitter(spikes);
0007 spikes = ss_outliers(spikes);
0008 spikes = ss_kmeans(spikes);
0009 spikes = ss_energy(spikes);
0010 spikes = ss_aggregate(spikes);
0011 
0012 %% The following commands merge/split clusters
0013 % spikes = merge_clusters(spikes, clusternumber1, clusternumber2);
0014 % spikes = split_cluster(spikes, clusternumber);
0015 
0016 
0017 %% The following commands run Ken Harris' KlustKwik
0018 projection = pcasvd(spikes.waveforms);
0019 [assigns,log] = kkm(spikes.waveforms(:,1:3),0);
0020 
0021 %%%%%%%%%%%%%%%%%%%%%%%%%% VISUALIZATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0022 
0023 %% General visualization tools in 2 and 3 dimensions -- results depend on
0024 %% whether you have run ss_kmeans or ss_aggregate.  Can also specify the
0025 %% assignments list as in:  ssg_databrowse2d(spikes,assigns);
0026 ssg_databrowse2d(spikes);
0027 ssg_databrowse3d(spikes);
0028 
0029 
0030 %% You can always look at:
0031 figure;  plot(spikes.waveforms');  axis tight;  title('Spike Waveforms');
0032 figure;  histxt(spikes.waveforms);  colormap jet(256);
0033 
0034 %% After running the ss_outliers step, try
0035 figure; plot(spikes.outliers.waveforms'); axis tight;
0036 
0037 %% After running the ss_kmeans step, try
0038 figure;  set(gcf, 'Renderer', 'OpenGL');  clusterXT(spikes, spikes.overcluster.assigns);  title('Local Clusters');
0039 
0040 %% After running the ss_energy step, try
0041 figure; set(gcf, 'Renderer', 'OpenGL');  clusterXT(spikes, spikes.hierarchy.assigns); title('Final Clusters');
0042 figure; showclust(spikes, spikes.hierarchy.assigns);
0043 figure; correlations(spikes, spikes.hierarchy.assigns);
0044 figure; aggtree(spikes); title('Aggregation Tree');

Generated on Sun 13-Aug-2006 11:49:44 by m2html © 2003