Skip to content

Commit aee437d

Browse files
committed
catch error in requested downsample levels early
1 parent c845ffe commit aee437d

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

functions/I2MC/I2MCfunc.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
nSampInWin = round(par.windowtime/(1/par.freq));
9999
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')
100100
end
101+
assert(~any(mod(par.freq,par.downsamples)),'I2MCfunc: Some of your downsample levels are not divisors of your sampling frequency. Change the option ''downsamples''')
101102

102103
% setup visual angle conversion
103104
pixpercm = mean([par.xres par.yres]./par.scrSz(:).');

functions/I2MC/twoClusterWeighting.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434

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

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

0 commit comments

Comments
 (0)