From ae6eeadbb2a44ed9a122b4a2a647b81cd69a4e2c Mon Sep 17 00:00:00 2001 From: Hiyeri <48970646+Hiyeri@users.noreply.github.com> Date: Tue, 23 May 2023 17:10:19 +0200 Subject: [PATCH] extent PAC documentation --- pac_bispec.m | 2 +- pop_roi_connect.m | 2 +- roi_pac.m | 7 ++++--- test_pipes/test_pac.m | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pac_bispec.m b/pac_bispec.m index 63054dd..03c67b4 100644 --- a/pac_bispec.m +++ b/pac_bispec.m @@ -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); diff --git a/pop_roi_connect.m b/pop_roi_connect.m index 98018a5..9ab51c5 100644 --- a/pop_roi_connect.m +++ b/pop_roi_connect.m @@ -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 diff --git a/roi_pac.m b/roi_pac.m index 4b6c4de..e4c8b16 100644 --- a/roi_pac.m +++ b/roi_pac.m @@ -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 diff --git a/test_pipes/test_pac.m b/test_pipes/test_pac.m index d48b2d2..f3c109a 100644 --- a/test_pipes/test_pac.m +++ b/test_pipes/test_pac.m @@ -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;