Commit cd6156a3 authored by Julian Kosciessa's avatar Julian Kosciessa
Browse files

Add HPF changes to coarse-graining back in

parent 758633dc
...@@ -320,11 +320,17 @@ for s = 1:numel(timescales) % loop through timescales ...@@ -320,11 +320,17 @@ for s = 1:numel(timescales) % loop through timescales
nchan = size(data_sel.trial{1},1); nchan = size(data_sel.trial{1},1);
end end
% do point skipping % do point skipping for scales > 1, non-HP option
cg_data = {}; cg_data = {};
switch coarsegrainmethod switch coarsegrainmethod
case 'filtskip' case 'filtskip'
nloops = sc; if strcmp(filtmethod, 'hp')
nloops = 1; % keep original sampling rate
stepSize = 1;
else
nloops = sc;
stepSize = sc;
end
cg_data = cell(nloops,1); % make cell: cg_data{istart}{trials}(chan-by-time) cg_data = cell(nloops,1); % make cell: cg_data{istart}{trials}(chan-by-time)
resamp_x = data_sel.trial; resamp_x = data_sel.trial;
for is = 1:nloops % loop over starting points here! for is = 1:nloops % loop over starting points here!
...@@ -333,7 +339,7 @@ for s = 1:numel(timescales) % loop through timescales ...@@ -333,7 +339,7 @@ for s = 1:numel(timescales) % loop through timescales
clear resamp_x; clear resamp_x;
case 'pointavg' % original point averaging coarse graining, no loop over starting points case 'pointavg' % original point averaging coarse graining, no loop over starting points
nloops = 1; % no starting points loop for point avg nloops = 1; % no starting points loop for point avg
if sc == 1 % no coarse graining for native sampling rate if sc == 1 || strcmp(filtmethod, 'hp') % no coarse graining for native sampling rate or high-pass entropy
cg_data{1} = data_sel.trial; %only keep trial data cg_data{1} = data_sel.trial; %only keep trial data
else % coarse-grain time series at this time scale else % coarse-grain time series at this time scale
nchan = size(data_sel.trial{1},1); nchan = size(data_sel.trial{1},1);
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment