Skip to content

Commit

Permalink
Merge pull request #41 from nguyen-td/feature
Browse files Browse the repository at this point in the history
extent PAC documentation
  • Loading branch information
nguyen-td authored May 23, 2023
2 parents 6caf009 + ae6eead commit eed487d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pac_bispec.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
[m, n] = ndgrid(frqs_low, frqs_high);
frqs_combs = [m(:),n(:)];
n_combs = size(frqs_combs, 1);
if n_combs > 50
if n_combs > 20
% according to our test simulations, the computation time scales linearly with the number of frequency pairs times 2, assuming no other ongoing CPU-heavy processes
time_est = 2 * n_combs;
warning('PAC is going to be estimated on %d frequency pair(s). Estimated time: %d seconds', n_combs, time_est);
Expand Down
2 changes: 1 addition & 1 deletion pop_roi_connect.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
% 'fcomb' - [struct] Frequency combination for which PAC is computed (in Hz). Must have fields 'low' and
% 'high' with fcomb.low < fcomb.high. For example, fcomb.low = 10 and fcomb.high = 50 if single
% frequencies are used. fcomb.low = [4 8] and fcomb.high = [48 50] if frequency bands are used
% (might take a long time to compute, so use with caution). Default is {} (this will cause an error).
% (might take a long time to compute so use with caution). Default is {} (this will cause an error).
% 'bs_outopts' - [integer] Option which bispectral tensors should be stored in EEG.roi.PAC. Default is 1.
% 1 - store all tensors: b_orig, b_anti, b_orig_norm, b_anti_norm
% 2 - only store: b_orig, b_anti
Expand Down
7 changes: 4 additions & 3 deletions roi_pac.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
%
% Inputs:
% EEG - EEGLAB dataset with ROI activity computed.
% fcomb - [struct] Frequency combination for which PAC is computed. Must have fields
% 'low' and 'high' with fcomb.low < fcomb.high. For example, fcomb.low =
% 10 (Hz), fcomb.high = 50 (Hz).
% 'fcomb' - [struct] Frequency combination for which PAC is computed (in Hz). Must have fields 'low' and
% 'high' with fcomb.low < fcomb.high. For example, fcomb.low = 10 and fcomb.high = 50 if single
% frequencies are used. fcomb.low = [4 8] and fcomb.high = [48 50] if frequency bands are used
% (might take a long time to compute, so use with caution). Default is {} (this will cause an error).
% bs_outopts - [integer] Option which bispectral tensors should be stored in EEG.roi.PAC. Default is 1.
% 1 - store all tensors: b_orig, b_anti, b_orig_norm, b_anti_norm
% 2 - only store: b_orig, b_anti
Expand Down
2 changes: 1 addition & 1 deletion test_pipes/test_pac.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

%% Test bispectrum for frequency band inputs
low = [4 8];
high = [9 10];
high = [48 50];

fcomb.low = low;
fcomb.high = high;
Expand Down

0 comments on commit eed487d

Please sign in to comment.