Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Hiyeri/roiconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiyeri committed May 23, 2022
2 parents c3b910f + 438353d commit 659e321
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion libs/haufe/data2sctrgcmim.m
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
for iind = 1:ninds
if mod(iind,100) == 0
fprintf('%d', iind);
else
elseif mod(iind, 10) == 0
fprintf('.');
end
if ~isequal(inds{iind}{1}, inds{iind}{2})
Expand Down
39 changes: 22 additions & 17 deletions pop_roi_connect.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,24 @@

rowg = [0.1 0.6 1 0.2];
% uigeom = { 1 1 rowg rowg 1 rowg rowg [0.1 0.6 0.9 0.3] 1 rowg 1 [0.5 1 0.35 0.5] [0.5 1 0.35 0.5] [0.5 1 0.35 0.5] [1] [0.9 1.2 1] };
uigeom = { [1] [1] [1] [1] [1] [0.2 1 0.35] [0.2 1 0.35] };
uigeom = { [1] [1.2 1] [1.2 1] [1.2 1] [1.2 1] [1.2 1] [1.2 1] [1] [0.2 1 0.35 0.8] [0.2 1 0.35 0.8] };
uilist = { { 'style' 'text' 'string' 'Select connectivity measures' 'fontweight' 'bold' } ...
{ 'style' 'checkbox' 'string' 'Cross-spectrum' 'tag' 'cs' 'value' 1 } ...
{ 'style' 'checkbox' 'string' 'Cross-spectrum' 'tag' 'cs' 'value' 1 } {} ...
{ 'style' 'checkbox' 'string' 'Coherence' 'tag' 'coh' 'value' 0 } ...
{ 'style' 'checkbox' 'string' 'Granger Causality' 'tag' 'gc' 'value' 0 } ...
{ 'style' 'checkbox' 'string' 'Time-rev GC' 'tag' 'trgc' 'value' 0 } ...
{} { 'style' 'text' 'string' 'Autoregressive model order' } { 'style' 'edit' 'string' '20' 'tag' 'morder' } ...
{} { 'style' 'text' 'string' 'Bootstrap if any (n)' } { 'style' 'edit' 'string' '' 'tag' 'naccu2' } };
% { 'style' 'checkbox' 'string' 'weighted Phase Lag Index' 'tag' 'wpli' 'value' 0 } ...
% { 'style' 'checkbox' 'string' 'Partial Directed Coherence' 'tag' 'pdc' 'value' 0 } ...
% { 'style' 'checkbox' 'string' 'Time-rev PDC' 'tag' 'trpdc' 'value' 0 } ...
% { 'style' 'checkbox' 'string' 'Directed Transfer Entropy' 'tag' 'dtf' 'value' 0 } ...
% { 'style' 'checkbox' 'string' 'Time-rev DTF' 'tag' 'trdtf' 'value' 0 } ...
{ 'style' 'checkbox' 'string' 'Weighted Phase Lag Index' 'tag' 'wpli' 'value' 0 } ...
{ 'style' 'checkbox' 'string' 'Granger Causality (GC)' 'tag' 'gc' 'value' 0 } ...
{ 'style' 'checkbox' 'string' 'Time-reversed GC' 'tag' 'trgc' 'value' 0 } ...
{ 'style' 'checkbox' 'string' 'Partial Directed Coherence (PDC)' 'tag' 'pdc' 'value' 0 } ...
{ 'style' 'checkbox' 'string' 'Time-reversed PDC' 'tag' 'trpdc' 'value' 0 } ...
{ 'style' 'checkbox' 'string' 'Directed Transfer Entropy (DTF)' 'tag' 'dtf' 'value' 0 } ...
{ 'style' 'checkbox' 'string' 'Time-reversed DTF' 'tag' 'trdtf' 'value' 0 } ...
{ 'style' 'checkbox' 'string' 'Multivariate Interaction Measure' 'tag' 'mim' 'value' 0 } ...
{ 'style' 'checkbox' 'string' 'Maximized Imaginary Coherency' 'tag' 'mic' 'value' 0 } ...
{} ...
{} { 'style' 'text' 'string' 'Autoregressive model order' } { 'style' 'edit' 'string' '20' 'tag' 'morder' } {} ...
{} { 'style' 'text' 'string' 'Bootstrap if any (n)' } { 'style' 'edit' 'string' '' 'tag' 'naccu2' } {} };
...
[result,usrdat,~,out] = inputgui('geometry', uigeom, 'uilist', uilist, 'helpcom', 'pophelp(''pop_roi_connect'')', 'title', 'pop_roiconnect - connectivity');
[result,~,~,out] = inputgui('geometry', uigeom, 'uilist', uilist, 'helpcom', 'pophelp(''pop_roi_connect'')', 'title', 'pop_roiconnect - connectivity');
if isempty(result), return, end

% check we have the same naccu
Expand All @@ -102,11 +105,13 @@
if out.coh, methods = [ methods { 'COH' } ]; end
if out.gc , methods = [ methods { 'GC' } ]; end
if out.trgc, methods = [ methods { 'TRGC' } ]; end
% if out.wpli, methods = [ methods { 'wPLI' } ]; end
% if out.pdc , methods = [ methods { 'PDC' } ]; end
% if out.trpdc, methods = [ methods { 'TRPDC' } ]; end
% if out.dtf , methods = [ methods { 'DTF' } ]; end
% if out.trdtf, methods = [ methods { 'TRDTF' } ]; end
if out.wpli, methods = [ methods { 'wPLI' } ]; end
if out.pdc , methods = [ methods { 'PDC' } ]; end
if out.trpdc, methods = [ methods { 'TRPDC' } ]; end
if out.dtf , methods = [ methods { 'DTF' } ]; end
if out.trdtf, methods = [ methods { 'TRDTF' } ]; end
if out.mim , methods = [ methods { 'MIM' } ]; end
if out.mic, methods = [ methods { 'MIC' } ]; end
options = { ...
'morder' str2num(out.morder) ...
'naccu' str2num(out.naccu2) ...
Expand Down

0 comments on commit 659e321

Please sign in to comment.