Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connectivity: Deprecation of older AEC processes, replaced with HENV
- Loading branch information
Showing
9 changed files
with
102 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
% Brainstorm | ||
% v. 3.220608 (08-Jun-2022) | ||
% v. 3.220609 (09-Jun-2022) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
176 changes: 88 additions & 88 deletions
176
toolbox/process/functions/process_aec2.m → toolbox/process/deprecated/process_aec2.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,88 @@ | ||
function varargout = process_aec2( varargin ) | ||
% PROCESS_AEC2: Compute amplitude envelope correlation between one signal in one file, and all the signals in another file. | ||
|
||
% @============================================================================= | ||
% This function is part of the Brainstorm software: | ||
% https://neuroimage.usc.edu/brainstorm | ||
% | ||
% Copyright (c) University of Southern California & McGill University | ||
% This software is distributed under the terms of the GNU General Public License | ||
% as published by the Free Software Foundation. Further details on the GPLv3 | ||
% license can be found at http://www.gnu.org/copyleft/gpl.html. | ||
% | ||
% FOR RESEARCH PURPOSES ONLY. THE SOFTWARE IS PROVIDED "AS IS," AND THE | ||
% UNIVERSITY OF SOUTHERN CALIFORNIA AND ITS COLLABORATORS DO NOT MAKE ANY | ||
% WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF | ||
% MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, NOR DO THEY ASSUME ANY | ||
% LIABILITY OR RESPONSIBILITY FOR THE USE OF THIS SOFTWARE. | ||
% | ||
% For more information type "brainstorm license" at command prompt. | ||
% =============================================================================@ | ||
% | ||
% Authors: Francois Tadel, 2012-2014 | ||
% Peter Donhauser, 2017 | ||
|
||
eval(macro_method); | ||
end | ||
|
||
|
||
%% ===== GET DESCRIPTION ===== | ||
function sProcess = GetDescription() %#ok<DEFNU> | ||
% Description the process | ||
sProcess.Comment = 'Amplitude Envelope Correlation AxB'; | ||
sProcess.Category = 'Custom'; | ||
sProcess.SubGroup = 'Connectivity'; | ||
sProcess.Index = 657; | ||
sProcess.Description = 'https://neuroimage.usc.edu/brainstorm/Tutorials/Connectivity'; | ||
% Definition of the input accepted by this process | ||
sProcess.InputTypes = {'data', 'results', 'matrix'}; | ||
sProcess.OutputTypes = {'timefreq', 'timefreq', 'timefreq'}; | ||
sProcess.nInputs = 2; | ||
sProcess.nMinFiles = 1; | ||
sProcess.isPaired = 1; | ||
|
||
% === CONNECT INPUT | ||
sProcess = process_corr2('DefineConnectOptions', sProcess); | ||
% === FREQ BANDS | ||
sProcess.options.freqbands.Comment = 'Frequency bands for the Hilbert transform:'; | ||
sProcess.options.freqbands.Type = 'groupbands'; | ||
sProcess.options.freqbands.Value = bst_get('DefaultFreqBands'); | ||
% === Orthogonalize pairs of signals | ||
sProcess.options.isorth.Comment = 'Orthogonalize signal pairs before envelope computation'; | ||
sProcess.options.isorth.Type = 'checkbox'; | ||
sProcess.options.isorth.Value = 0; | ||
% === OUTPUT MODE | ||
sProcess.options.outputmode.Comment = {'Save individual results (one file per input file)', 'Concatenate input files before processing (one file)', 'Save average connectivity matrix (one file)'}; | ||
sProcess.options.outputmode.Type = 'radio'; | ||
sProcess.options.outputmode.Value = 1; | ||
sProcess.options.outputmode.Group = 'output'; | ||
end | ||
|
||
|
||
%% ===== FORMAT COMMENT ===== | ||
function Comment = FormatComment(sProcess) %#ok<DEFNU> | ||
Comment = sProcess.Comment; | ||
end | ||
|
||
|
||
%% ===== RUN ===== | ||
function OutputFiles = Run(sProcess, sInputA, sInputB) %#ok<DEFNU> | ||
% Input options | ||
OPTIONS = process_corr2('GetConnectOptions', sProcess, sInputA, sInputB); | ||
if isempty(OPTIONS) | ||
OutputFiles = {}; | ||
return | ||
end | ||
|
||
OPTIONS.Method = 'aec'; | ||
% Hilbert and frequency bands options | ||
OPTIONS.Freqs = sProcess.options.freqbands.Value; | ||
OPTIONS.isOrth = sProcess.options.isorth.Value; | ||
|
||
% Compute metric | ||
OutputFiles = bst_connectivity({sInputA.FileName}, {sInputB.FileName}, OPTIONS); | ||
end | ||
|
||
|
||
|
||
|
||
function varargout = process_aec2( varargin ) | ||
% PROCESS_AEC2: Compute amplitude envelope correlation between one signal in one file, and all the signals in another file. | ||
|
||
% @============================================================================= | ||
% This function is part of the Brainstorm software: | ||
% https://neuroimage.usc.edu/brainstorm | ||
% | ||
% Copyright (c) University of Southern California & McGill University | ||
% This software is distributed under the terms of the GNU General Public License | ||
% as published by the Free Software Foundation. Further details on the GPLv3 | ||
% license can be found at http://www.gnu.org/copyleft/gpl.html. | ||
% | ||
% FOR RESEARCH PURPOSES ONLY. THE SOFTWARE IS PROVIDED "AS IS," AND THE | ||
% UNIVERSITY OF SOUTHERN CALIFORNIA AND ITS COLLABORATORS DO NOT MAKE ANY | ||
% WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF | ||
% MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, NOR DO THEY ASSUME ANY | ||
% LIABILITY OR RESPONSIBILITY FOR THE USE OF THIS SOFTWARE. | ||
% | ||
% For more information type "brainstorm license" at command prompt. | ||
% =============================================================================@ | ||
% | ||
% Authors: Francois Tadel, 2012-2014 | ||
% Peter Donhauser, 2017 | ||
|
||
eval(macro_method); | ||
end | ||
|
||
|
||
%% ===== GET DESCRIPTION ===== | ||
function sProcess = GetDescription() %#ok<DEFNU> | ||
% Description the process | ||
sProcess.Comment = 'Amplitude Envelope Correlation AxB'; | ||
sProcess.Category = 'Custom'; | ||
sProcess.SubGroup = 'Connectivity'; | ||
sProcess.Index = 657; | ||
sProcess.Description = 'https://neuroimage.usc.edu/brainstorm/Tutorials/Connectivity'; | ||
% Definition of the input accepted by this process | ||
sProcess.InputTypes = {'data', 'results', 'matrix'}; | ||
sProcess.OutputTypes = {'timefreq', 'timefreq', 'timefreq'}; | ||
sProcess.nInputs = 2; | ||
sProcess.nMinFiles = 1; | ||
sProcess.isPaired = 1; | ||
|
||
% === CONNECT INPUT | ||
sProcess = process_corr2('DefineConnectOptions', sProcess); | ||
% === FREQ BANDS | ||
sProcess.options.freqbands.Comment = 'Frequency bands for the Hilbert transform:'; | ||
sProcess.options.freqbands.Type = 'groupbands'; | ||
sProcess.options.freqbands.Value = bst_get('DefaultFreqBands'); | ||
% === Orthogonalize pairs of signals | ||
sProcess.options.isorth.Comment = 'Orthogonalize signal pairs before envelope computation'; | ||
sProcess.options.isorth.Type = 'checkbox'; | ||
sProcess.options.isorth.Value = 0; | ||
% === OUTPUT MODE | ||
sProcess.options.outputmode.Comment = {'Save individual results (one file per input file)', 'Concatenate input files before processing (one file)', 'Save average connectivity matrix (one file)'}; | ||
sProcess.options.outputmode.Type = 'radio'; | ||
sProcess.options.outputmode.Value = 1; | ||
sProcess.options.outputmode.Group = 'output'; | ||
end | ||
|
||
|
||
%% ===== FORMAT COMMENT ===== | ||
function Comment = FormatComment(sProcess) %#ok<DEFNU> | ||
Comment = sProcess.Comment; | ||
end | ||
|
||
|
||
%% ===== RUN ===== | ||
function OutputFiles = Run(sProcess, sInputA, sInputB) %#ok<DEFNU> | ||
% Input options | ||
OPTIONS = process_corr2('GetConnectOptions', sProcess, sInputA, sInputB); | ||
if isempty(OPTIONS) | ||
OutputFiles = {}; | ||
return | ||
end | ||
|
||
OPTIONS.Method = 'aec'; | ||
% Hilbert and frequency bands options | ||
OPTIONS.Freqs = sProcess.options.freqbands.Value; | ||
OPTIONS.isOrth = sProcess.options.isorth.Value; | ||
|
||
% Compute metric | ||
OutputFiles = bst_connectivity({sInputA.FileName}, {sInputB.FileName}, OPTIONS); | ||
end | ||
|
||
|
||
|
||
|