Home > chronux_2_00 > spikesort > ssg > ssg_databrowse3d.m

ssg_databrowse3d

PURPOSE ^

SSG_DATABROWSE3D Feature projection GUI in 3D (work in progress).

SYNOPSIS ^

function ssg_databrowse3d(spikes, assigns, show)

DESCRIPTION ^

 SSG_DATABROWSE3D  Feature projection GUI in 3D (work in progress).
     SSG_DATABROWSE(SPIKES) creates a 3-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 anywhere in the axis to rotate the camera.
         Double-click outside of the axes to make a density snapshot of the current view.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function ssg_databrowse3d(spikes, assigns, show)
0002 % SSG_DATABROWSE3D  Feature projection GUI in 3D (work in progress).
0003 %     SSG_DATABROWSE(SPIKES) creates a 3-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 anywhere in the axis to rotate the camera.
0011 %         Double-click outside of the axes to make a density snapshot of the current view.
0012 
0013 if (nargin == 1)
0014     assigns = [];  show = [];
0015 elseif (nargin == 2)
0016     if (length(assigns) ~= size(spikes.waveforms, 1))
0017         error('SSG:assignments_length_mismatch', 'The assignments vector length must match the number of waveforms in SPIKES.');
0018     end
0019     show = [];
0020 elseif (nargin == 3)
0021     if (~all(ismember(show, assigns)))
0022         error('SSG:show_request_invalid', 'The requested clusters are not in the assignments list');
0023     end
0024 else
0025     error('SSG:invalid_number_args', 'The SSG_DATABROWSE3D function only accepts 1-3 inputs.');
0026 end
0027 
0028 if (size(spikes.waveforms, 2) < 3)
0029     error('SSG:data_dimensions_too_small', 'There are not enough data points per waveform.');
0030 end
0031 
0032 ssgtest(spikes, assigns, show, 'xyz');

Generated on Fri 15-Aug-2008 11:35:42 by m2html © 2003