Skip to content

Commit

Permalink
feat(tests): filtering and rm randc function
Browse files Browse the repository at this point in the history
This commit implements filtering of tests that
generates plots and deprecated the
`randc` function.

The plotting generated by tests can now be triggered
by setting a global variable `plot_test_figures`.

The removal of `randc` turn the codebase
free of the robust control toolbox requirement.
  • Loading branch information
ocehugo committed Jun 10, 2021
1 parent 3806980 commit 13e094b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/AutomaticQC/test_SpikeClassifiers.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
classdef test_SpikeClassifiers < matlab.unittest.TestCase

properties (TestParameter)
plot_figure = {true}; %,false};
plot_figure = {ismember('plot_test_figures',who('global'))};
end

methods (Test)
Expand Down Expand Up @@ -208,7 +208,7 @@ function test_bursthampel(~,plot_figure)
burst_interval = 3600/86400;
bind = {[1,60], [61,120], [121,180],[181,240]};
time = [0:1:59, 3600:1:3659, 7200:1:7259, 10800:1:10859];
osig = [12+randc(1,60),12+randc(1,60),18+randc(1,60),18+randc(1,60)];
osig = [12+randomBetween(-.5,.5,60),12+randomBetween(-.5,.5,60),18+randomBetween(-.5,.5,60),18+randomBetween(-.5,.5,60)];
ssig = osig;
spikes = 121;
ssig(spikes) = 25;
Expand Down Expand Up @@ -239,7 +239,7 @@ function test_burststats(~,plot_figure)
burst_interval = 3600/86400;
bind = {[1,60], [61,120], [121,180],[181,240]};
time = [0:1:59, 3600:1:3659, 7200:1:7259, 10800:1:10859];
osig = [12+randc(1,60),12+randc(1,60),18+randc(1,60),18+randc(1,60)];
osig = [12+randomBetween(-.5,.5,60),12+randomBetween(-.5,.5,60),18+randomBetween(-.5,-.5,60),18+randomBetween(-.5,.5,60)];
ssig = osig;
spikes = 121;
ssig(spikes) = 25;
Expand Down

0 comments on commit 13e094b

Please sign in to comment.