diff --git a/+bc/+qm/qualityParamValuesForUnitMatch.m b/+bc/+qm/qualityParamValuesForUnitMatch.m index 70241cf..99e96e3 100644 --- a/+bc/+qm/qualityParamValuesForUnitMatch.m +++ b/+bc/+qm/qualityParamValuesForUnitMatch.m @@ -68,8 +68,8 @@ % refractory period parameters - change closer together paramBC.tauR_valuesMin = 2/1000; % refractory period time (s), usually 0.0020 change -paramBC.tauR_valuesStep = 0.5./1000; % refractory period time (s), usually 0.0020 -paramBC.tauR_valuesMax = 2./1000; % refractory period time (s), usually 0.0020 +paramBC.tauR_valuesStep = 0.5/1000; % refractory period time (s), usually 0.0020 +paramBC.tauR_valuesMax = 2/1000; % refractory period time (s), usually 0.0020 paramBC.tauC = 0.1/1000; % censored period time (s) paramBC.hillOrLlobetMethod = 1; % 1 to use Hill et al method; 0 to use Llobet et al method diff --git a/+bc/+viz/unitQualityGUI_synced.m b/+bc/+viz/unitQualityGUI_synced.m index 015b808..e5b347a 100644 --- a/+bc/+viz/unitQualityGUI_synced.m +++ b/+bc/+viz/unitQualityGUI_synced.m @@ -71,7 +71,6 @@ function KeyPressCb(~, evnt) elseif strcmpi(evnt.Key, 'g') %toggle to next single-unit - iCluster = iCluster + 1; iCluster = goodUnit_idx(find(goodUnit_idx > iCluster, 1, 'first')); if ~isempty(iCluster) updateUnit(unitQualityGuiHandle, memMapData, ephysData, rawWaveforms, iCluster, qMetric, forGUI, param, ... @@ -80,7 +79,6 @@ function KeyPressCb(~, evnt) disp('Done cycling through good units.') end elseif strcmpi(evnt.Key, 'm') %toggle to next multi-unit - iCluster = iCluster + 1; iCluster = multiUnit_idx(find(multiUnit_idx > iCluster, 1, 'first')); if ~isempty(iCluster) updateUnit(unitQualityGuiHandle, memMapData, ephysData, rawWaveforms, iCluster, qMetric, forGUI, param, ... @@ -89,7 +87,6 @@ function KeyPressCb(~, evnt) disp('Done cycling through MUA units.') end elseif strcmpi(evnt.Key, 'n') %toggle to next noise unit - iCluster = iCluster + 1; iCluster = noiseUnit_idx(find(noiseUnit_idx > iCluster, 1, 'first')); if ~isempty(iCluster) updateUnit(unitQualityGuiHandle, memMapData, ephysData, rawWaveforms, iCluster, qMetric, forGUI, param, ... @@ -98,7 +95,6 @@ function KeyPressCb(~, evnt) disp('Done cycling through noise units.') end elseif strcmpi(evnt.Key, 'a') %toggle to next non-somatic unit - iCluster = iCluster + 1; iCluster = nonSomaUnit_idx(find(nonSomaUnit_idx > iCluster, 1, 'first')); if ~isempty(iCluster) updateUnit(unitQualityGuiHandle, memMapData, ephysData, rawWaveforms, iCluster, qMetric, forGUI, param, ... @@ -278,7 +274,7 @@ function initializePlot(unitQualityGuiHandle, ephysData, qMetric, unitType, uniq 'filled', 'MarkerEdgeColor', [0, 0, 0], 'LineWidth', 4); xlim([-0.1, 1.1]); ylim([min(ephysData.channel_positions(:, 2)) - 50, max(ephysData.channel_positions(:, 2)) + 50]); -ylabel('Depth (\mum)') +ylabel('Depth from tip of probe (\mum)') xlabel('Norm. log rate') %title('Location on probe') diff --git a/docs/images/bombcell_flowchart.svg b/docs/images/bombcell_flowchart.svg index bd74680..7438919 100644 --- a/docs/images/bombcell_flowchart.svg +++ b/docs/images/bombcell_flowchart.svg @@ -12,6 +12,9 @@ y="-4.0" sodipodi:docname="bombcell_flowchart.svg" inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)" + inkscape:export-filename="bombcell_flowchart.png" + inkscape:export-xdpi="700" + inkscape:export-ydpi="700" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" @@ -27,14 +30,19 @@ inkscape:deskcolor="#d1d1d1" inkscape:document-units="mm" inkscape:zoom="1.8954861" - inkscape:cx="127.67173" - inkscape:cy="379.84978" + inkscape:cx="422.58289" + inkscape:cy="252.70563" inkscape:window-width="1920" inkscape:window-height="968" inkscape:window-x="1080" inkscape:window-y="493" inkscape:window-maximized="1" - inkscape:current-layer="layer1" />A A ''repolarization peakrepolarization peak'-to-trough ratio'-to-trough ratio greater than greater than param.minTroughToPeakRatioparam.minTroughToPeakRatioMore More peakspeaks than than param.maxNPeaksparam.maxNPeaks or more or more troughstroughs than than param.maxNTroughsparam.maxNTroughs A peak-to-trough A peak-to-trough durationduration longer than longer than param.maxWvDurationparam.maxWvDuration or or more than more than param.minWvDurationparam.minWvDurationA A spatial decay slopespatial decay slope smaller than smaller than param.minSpatialDecaySlopeExp param.minSpatialDecaySlopeExp or larger thanor larger than param.maxSpatialDecaySlopeExp param.maxSpatialDecaySlopeExp A A waveform baselinewaveform baseline less flat than less flat than param.maxWvBaselineFraction param.maxWvBaselineFraction times the waveform's maximum absolute valuetimes the waveform's maximum absolute valueIf If param.extractRawparam.extractRaw is true, a mean is true, a mean raw waveform amplituderaw waveform amplitude smaller smaller than than param.minAmplitudeparam.minAmplitude If If param.computeDriftparam.computeDrift is true, a is true, a drift estimatedrift estimate smaller than smaller than param.maxDrift param.maxDrift If If param.extractRaw is true, a param.extractRaw is true, a signal-to-noise ratio below signal-to-noise ratio below param.minSNRparam.minSNRIf If param.computeDistanceMetrics is true, an param.computeDistanceMetrics is true, an isolation distance isolation distance smaller than smaller than param.isoDmin and an param.isoDmin and an L-ratio larger than L-ratio larger than param.lratioMaxparam.lratioMaxMore thanMore than param.maxPercSpikesMissing param.maxPercSpikesMissing percentage of percentage of spikes spikes missingmissing + id="tspan225"> Waveform has either: + id="tspan227"> Select Select 'good' time chunks'good' time chunks::: + id="tspan236"> - If - If param.computeTimeChunksparam.computeTimeChunks, compute the , compute the percentage of spikes missingpercentage of spikes missing and and refractory period refractory period violationsviolations in time chunks of size in time chunks of size param.deltaTimeChunkparam.deltaTimeChunk and select time chunks with less spikes and select time chunks with less spikes missing than missing than param.maxPercSpikesMissingparam.maxPercSpikesMissing and less refractory period violations than and less refractory period violations than param.maxRPVviolationsparam.maxRPVviolationsAn An ''first peakfirst peak'-to-''-to-'repolarization peakrepolarization peak' ratio' ratio greater than greater than param.firstPeakRatio param.firstPeakRatio A A ''main peakmain peak'-to-trough ratio'-to-trough ratio greater than greater than param.minTroughToPeakRatioparam.minTroughToPeakRatioWaveform has either: