


SSG_DATABROWSE2D Feature projection GUI in 2D (work in progress).
SSG_DATABROWSE(SPIKES) creates a 2-D databrowse figure. Call with a
spike sorting object SPIKES and an optional assignments vector whose length
corresponds to the number of waveforms in the SPIKES structure. If no
assignments vector is specified, the function chooses the first of
{final, local, or none} clustering depending on which have been computed.
Once the figure appears, you can:
Click on the axis labels to change features.
Click on a data point to bring the associated cluster to the front.
Double-click outside of the axes to make a density snapshot of the current view.

0001 function ssg_databrowse2d(spikes, assigns, show) 0002 % SSG_DATABROWSE2D Feature projection GUI in 2D (work in progress). 0003 % SSG_DATABROWSE(SPIKES) creates a 2-D databrowse figure. Call with a 0004 % spike sorting object SPIKES and an optional assignments vector whose length 0005 % corresponds to the number of waveforms in the SPIKES structure. If no 0006 % assignments vector is specified, the function chooses the first of 0007 % {final, local, or none} clustering depending on which have been computed. 0008 % Once the figure appears, you can: 0009 % Click on the axis labels to change features. 0010 % Click on a data point to bring the associated cluster to the front. 0011 % Double-click outside of the axes to make a density snapshot of the current view. 0012 0013 % Last Modified By: sbm on Fri Jul 29 16:37:08 2005 0014 0015 if (nargin == 1) 0016 assigns = []; show = []; 0017 elseif (nargin == 2) 0018 if (length(assigns) ~= size(spikes.waveforms, 1)) 0019 error('SSG:assignments_length_mismatch', 'The assignments vector length must match the number of waveforms in SPIKES.'); 0020 end 0021 show = []; 0022 elseif (nargin == 3) 0023 if (~all(ismember(show, assigns))) 0024 error('SSG:show_request_invalid', 'The requested clusters are not in the assignments list'); 0025 end 0026 else 0027 error('SSG:invalid_number_args', 'The SSG_DATABROWSE2D function only accepts 1-3 inputs.'); 0028 end 0029 0030 if (size(spikes.waveforms, 2) < 2) 0031 error('SSG:data_dimensions_too_small', 'There are not enough data points per waveform.'); 0032 end 0033 0034 ssgtest(spikes, assigns, show, 'xy');