0001 function [K, str] = pr_get_filter(RT, row)
0002
0003
0004
0005
0006
0007
0008
0009 if nargin < 2
0010 error('Need TR, row / Sess matrix');
0011 end
0012
0013
0014 nsess = length(row);
0015
0016
0017 if isfield(row(1), 'row')
0018 Sess = row;
0019 row = {};
0020 for s = 1:nsess
0021 row{s} = Sess(s).row;
0022 end
0023 else
0024 Sess = [];
0025 end
0026
0027 switch spm_input('High-pass filter?','+1','b','none|specify');
0028
0029 case 'specify'
0030
0031
0032 HParam = 128*ones(1,nsess);
0033 p_str = 'cutoff period (secs)';
0034 HParam = spm_input(p_str,'+1','e',HParam,[1 nsess]);
0035 str = sprintf('Cutoff: %d {s}', HParam);
0036
0037 case 'none'
0038
0039
0040 HParam = Inf*ones(1,nsess);
0041 str = 'none';
0042 end
0043
0044
0045
0046 for i = 1:nsess
0047 K(i) = struct( 'HParam', HParam(i),...
0048 'row', row{i},...
0049 'RT', RT);
0050 end
0051 K = pr_spm_filter(K);