Skip to content

Commit

Permalink
catch error in requested downsample levels early
Browse files Browse the repository at this point in the history
  • Loading branch information
dcnieho committed Sep 14, 2018
1 parent c845ffe commit aee437d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions functions/I2MC/I2MCfunc.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
nSampInWin = round(par.windowtime/(1/par.freq));
assert(nSampInWin>=nSampRequired,'I2MCfunc: Filter parameters requested with the setting ''chebyOrder'' will not work for the sampling frequency of your data. Please lower ''chebyOrder'', or set the setting ''downsampFilter'' to 0')
end
assert(~any(mod(par.freq,par.downsamples)),'I2MCfunc: Some of your downsample levels are not divisors of your sampling frequency. Change the option ''downsamples''')

% setup visual angle conversion
pixpercm = mean([par.xres par.yres]./par.scrSz(:).');
Expand Down
1 change: 0 additions & 1 deletion functions/I2MC/twoClusterWeighting.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

% check downsample levels
nd = length(downsamples);
assert(~any(mod(freq,downsamples)),'Some of your downsample levels are not divisors of your sampling frequency')

if downsampFilter
% filter signal. Follow the lead of decimate(), which first runs a
Expand Down

0 comments on commit aee437d

Please sign in to comment.