Skip to content

Commit ae5e1d7

Browse files
committed
Finalized working on an unedited version of UMS toolbox
1 parent 1cd4654 commit ae5e1d7

File tree

3 files changed

+39
-6
lines changed

3 files changed

+39
-6
lines changed

@SplitMerge/cutNow.m

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,28 @@ function cutNow(app,~)
1414
disp([9 'Removing ' num2str(length(find(z > val))) ' of ' num2str(length(z)) ' spikes from unit ' num2str(id)]);
1515
end
1616

17+
% My version uses column vectors, original UMS2k uses row vectors,
18+
% transpose if there's a discrepancy in this file between outliers and
19+
% main vectors:
20+
time_transposed = false;
21+
unwrapped_transposed = false;
22+
if iscolumn(app.Data.spikes.spiketimes) && isrow(app.Data.spikes.info.outliers.spiketimes)
23+
app.Data.spikes.spiketimes = app.Data.spikes.spiketimes';
24+
time_transposed = true;
25+
end
26+
if iscolumn(app.Data.spikes.unwrapped_times) && isrow(app.Data.spikes.info.outliers.unwrapped_times)
27+
app.Data.spikes.unwrapped_times = app.Data.spikes.unwrapped_times';
28+
unwrapped_transposed = true;
29+
end
1730
% dependent on remove_outliers from original UMS
1831
app.Data.spikes = remove_outliers(app.Data.spikes, drop);
32+
% Put them back if they were transposed:
33+
if time_transposed
34+
app.Data.spikes.spiketimes = app.Data.spikes.spiketimes';
35+
end
36+
if unwrapped_transposed
37+
app.Data.spikes.unwrapped_times = app.Data.spikes.unwrapped_times';
38+
end
1939

2040
app.Data.modified = ones(1,length(app.Data.modified));
2141
app.Data.modifyList = [app.Data.modifyList app.Data.outlierID]; % why oh why doesn't matlab have .push()?

@SplitMerge/plotUnits.m

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,22 @@ function plotUnits(app)
132132
end
133133
end
134134
%{
135-
if app.Settings.Colorful
136-
for u = 1:length(unq)
137-
app.SpikePanels{unq(u)}.Children(1).Color = app.Data.colors(u,:);
135+
% This is a bit slow, so I've temporarily disabled it ? colors can
136+
be manually updated by toggling "Show colors" off and on again.
137+
138+
% The color's will have become out of sync beyond the lowest
139+
% modified unit, so update all plots with unit IDs above that one:
140+
lowest = min(app.Data.modifyList);
141+
if ~isempty(lowest)
142+
updateFrom = find(unq == lowest);
143+
if app.Settings.Colorful
144+
for u = updateFrom:length(unq)
145+
app.SpikePanels{unq(u)}.Children(1).Color = app.Data.colors(u,:);
146+
end
138147
else
139-
app.SpikePanels{unq(u)}.Children(1).Color = [0 0.4470 0.7410];
148+
for u = updateFrom:length(unq)
149+
app.SpikePanels{unq(u)}.Children(1).Color = [0 0.4470 0.7410];
150+
end
140151
end
141152
end
142153
%}

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ To speed up interactivity, I'm making use of the new UIFigure and UIAxes objects
99

1010
It is designed to work on directories containing UMS result structs for each channel in many files, speeding up processing of large numbers of channels, such as in the Utah array.
1111

12-
__N.B.__ This is a work in progress... Importantly, I have made _minor_ alterations to the original toolbox, which _may_ be required for full functionality. These requirements will be removed/documented shortly (see todos below).
12+
It is now fully functional with an original, unmodified copy of UMS :)
13+
14+
~~__N.B.__ This is a work in progress... Importantly, I have made _minor_ alterations to the original toolbox, which _may_ be required for full functionality. These requirements will be removed/documented shortly (see todos below).~~
1315

1416
_BTW_ this uses Matlab's class structure (using @ClassName directory and separate methods files within). This structure must be maintained in order for the methods to work correctly.
1517

@@ -32,7 +34,7 @@ __Noise removal tab:__
3234
![Screenshot of SplitMerge in Noise Removal mode](Screenshots/Noise.png?raw=true "Noise removal tab")
3335

3436
### Todos:
35-
- [ ] Remove or document all necessary alterations to the base UMS toolbox
37+
- [x] Remove or document all necessary alterations to the base UMS toolbox
3638
- [ ] Write the help documentation!
3739
- [x] Add app.Data.modifylist array for future use (minimizing replots)
3840
- [x] Update the replotting of the Inspect/merge panel to make use of app.Data.modifylist data and avoid full re-plot

0 commit comments

Comments
 (0)