Skip to content

Commit

Permalink
feat(qc): update imosTimeSeriesSpikeQC
Browse files Browse the repository at this point in the history
This completely modifies the previous imosTimeSeriesSpikeQC
functionality.

1. Before we spawn one window per variable for spikeQC
selection. Now we spawn a single window that allows
multi variable/test selection.
This removes the requirement for globals previously
used, at the expense of leaking a particular condition in qcFilterMain.

2. The new UI window is handle by a class - spikeWindow.

3. The new class, spikeWindow, provides a preview window class to
play and interact with the select tests and their parameters.

The other functions are utilities that were updated included
for the above windows to work properly. The numericInputButton
was updated to allow a properly defined callbacks (LaterCallback).
  • Loading branch information
ocehugo committed Jul 7, 2020
1 parent 948132d commit 0dccfb6
Show file tree
Hide file tree
Showing 10 changed files with 1,464 additions and 368 deletions.
352 changes: 195 additions & 157 deletions AutomaticQC/imosTimeSeriesSpikeQC.m

Large diffs are not rendered by default.

25 changes: 19 additions & 6 deletions AutomaticQC/qcFilterMain.m
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,24 @@

% user cancelled
if ~isempty(cancel) && getappdata(cancel, 'cancel'), return; end

% log entries and any data changes that the routine generates
% are currently discarded; only the flags are retained.
[~, f, l] = filter(sam, data, k, type{m}, auto);
clear data

if contains(filterName,'SpikeQC')
varname = sam.(type{m}){k}.name;
if ~exist('varflags','var')
[varflags, varlogs] = filter(sam, auto);
end
processed_vars = fieldnames(varflags);
if inCell(processed_vars,varname)
f = varflags.(varname);
l = varlogs.(varname);
else
continue;
end
else
% log entries and any data changes that the routine generates
% are currently discarded; only the flags are retained.
[~, f, l] = filter(sam, data, k, type{m}, auto);
end

if isempty(f), continue; end

Expand Down Expand Up @@ -255,4 +268,4 @@
end
end
end
end
end
Loading

0 comments on commit 0dccfb6

Please sign in to comment.