Commit 53f10e6c authored by sstucker's avatar sstucker
Browse files

Changed the format of parameter tccaAux_inx to array of flags rather than list...

Changed the format of parameter tccaAux_inx to array of flags rather than list of indices to fix display issues. Issues remain for ss_ch_inx
parent 122729ea
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -24,7 +24,9 @@
%            2 - 2 step size [s]
%            3 - 3 ctr if <1  correlation threshold, if =>1 number of regressors.
%                   Redundant if flagICRegressors = 1;
% tCCAaux_inx -  Indices of the aux channels to be used to generate regressors
% tCCAaux_inx -  Indices of the aux channels to be used to generate
% regressors. 0 for the indices of unused aux channels, 1 for included
% aux channels.
% rhoSD_ssThresh - max distance for a short separation measurement. Set =0
%          if you do not want to regress the short separation measurements.
%          Follows the static estimate procedure described in Gagnon et al (2011).
@@ -49,7 +51,7 @@
% PARAMETERS:
% flagtCCA: 1
% tCCAparams: [3 0.08 0.3]
% tCCAaux_inx: [1 2 3 4 5 6 7 8]
% tCCAaux_inx: [1 1 1 1 0 0 0 0]
% rhoSD_ssThresh: 15.0
% ss_ch_inx: [1 2 3 4 5]
% runIdxResting: 1
@@ -63,6 +65,7 @@ function [Aaux, rcMap] = hmrR_tCCA(data, aux, probe, runIdx, subjIdx, flagtCCA,
%%

%% flags and tCCA settings
tCCAaux_inx = find(tCCAaux_inx); % Convert flags to list of indices
flags.pcaf =  [0 0]; % no pca of X or AUX
% flags.shrink = true; % perform shrinkage in the CCA
flags.shrink = false;  % JD: set to false because rtcca generate error, "Undefined function or variable 'cshrink'".
@@ -115,6 +118,9 @@ if flagtCCA
        end
        lstSS = lst(find(rhoSD<=rhoSD_ssThresh)); %#ok<*FNDSB>
        lstLS = lst(find(rhoSD>rhoSD_ssThresh));
        if length(lstSS) == 0
           errordlg('No short separation channels fall within rhoSD_ssThresh!');
        end
        
        if ss_ch_inx ~= 0
            lstSS = lstSS(ss_ch_inx);