Hey @Marc.Lalancette, this is the new thread that @Raymundo.Cassani requested about the connectivity computation.
Below is the code that I used to test to run lagged coh, unconstrained sources, with PCA. Please let me know if you'd like more info. Thanks again for the help.
%process CCC with the intended settings
sFiles = bst_process('CallProcess', 'process_cohere1n', sFiles, [], ...
'timewindow', [a, b], ...
'scouts', {'scouts', {'Premotor_L', 'Premotor_R', 'S1_L', 'S1_R', 'M1_L', 'M1_R', 'SMA_L', 'SMA_R'}}, ...
'flatten', 0, ...
'scouttime', 'after', ... % after connectivity metric
'scoutfunc', 'mean', ... % Mean
'scoutfuncaft', 'mean', ... % Mean
'pcaedit', struct(...
'Method', 'pcaa', ...
'Baseline', [-2, 0], ...
'DataTimeWindow', [-5, 5], ...
'RemoveDcOffset', 'file'), ...
'removeevoked', 0, ...
'cohmeasure', 'lcohere2019', ... % Lagged coherence / Corrected imaginary coherence: LC = |imag(C)|/sqrt(1-real(C)^2)
'tfmeasure', 'morlet', ... % Morlet wavelets
'tfedit', struct(...
'Comment', 'Complex,1-60Hz', ...
'TimeBands', [], ...
'Freqs', [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], ...
'MorletFc', 1, ...
'MorletFwhmTc', 3, ...
'ClusterFuncTime', 'none', ...
'Measure', 'none', ...
'Output', 'all', ...
'RemoveEvoked', 0, ...
'SaveKernel', 0), ...
'timeres', 'none', ... % Full (requires epochs)
'avgwinlength', 1, ...
'avgwinoverlap', 50, ...
'outputmode', 'input'); % separately for each file