Error in Phase amplitude coupling

Dear Francois,

I was trying to run tPAC on the data. And m getting the following error.

** Error: [process_pac_dynamic] Frequency > Time-resolved Phase-Amplitude Coupling > tPAC
** Line 672: Undefined function 'hilbert' for input arguments of type 'double'.
**
** Call stack:
** >process_pac_dynamic.m>Compute at 672
** >process_pac_dynamic.m>Run at 331
** >process_pac_dynamic.m at 84
** >bst_process.m>Run at 229
** >bst_process.m at 36
** >panel_process1.m>RunProcess at 151
** >panel_process1.m at 26
** >gui_brainstorm.m>CreateWindow/ProcessRun_Callback at 772
** >bst_call.m at 28
** >gui_brainstorm.m>@(h,ev)bst_call(@ProcessRun_Callback) at 296

**

Is this happening due to memory issues? Could you please guide me on this!

This problem was addressed here:

thank you

Dear Francois

I tried with signal processing toolbox and tPAC could be calculated.
Then from tPAC i tried extracting comudulogram . But then I got the following error

  • Error: [process_pac_comod] Frequency > Time-resolved Phase-Amplitude Coupling > Extracting comodulogram from tPAC maps
    ** Line 228: griddedInterpolant
    ** Interpolation requires at least two sample points in each dimension.
    **
    ** Call stack:
    ** >interp2.m>makegriddedinterp at 228
    ** >interp2.m at 128
    ** >process_pac_comod.m>Compute at 474
    ** >process_pac_comod.m>Run at 204
    ** >process_pac_comod.m at 39
    ** >bst_process.m>Run at 229
    ** >bst_process.m at 36
    ** >panel_process_select.m>ShowPanel at 2903
    ** >panel_process_select.m at 30
    ** >bst_report.m>Recall at 1227
    ** >bst_report.m at 58
    ** >bst_call.m at 28

** >gui_brainstorm.m>@(h,ev)bst_call(@bst_report,'Recall','current') at 298

without interpolation also I tried. Then the following error occured

Error: [process_pac_comod] Frequency > Time-resolved Phase-Amplitude Coupling > Extracting comodulogram from tPAC maps
** Line 486: Undefined function or variable 'InterpPhase'.
**
** Call stack:
** >process_pac_comod.m>Compute at 486
** >process_pac_comod.m>Run at 204
** >process_pac_comod.m at 39
** >bst_process.m>Run at 229
** >bst_process.m at 36
** >panel_process_select.m>ShowPanel at 2903
** >panel_process_select.m at 30
** >bst_report.m>Recall at 1227
** >bst_report.m at 58
** >bst_call.m at 28
** >gui_brainstorm.m>@(h,ev)bst_call(@bst_report,'Recall','current') at 298

What does it mean- "Interpolation requires at least two sample points in each dimension"
Could you please guide me in this..
Thank you

** Line 228: griddedInterpolant
** Interpolation requires at least two sample points in each dimension.

Maybe a problem in the way you computed the tPAC file, or you configured the process "Extracting comodulogram from tPAC maps"...

Have you started by following the PAC tutorial?
https://neuroimage.usc.edu/brainstorm/Tutorials/TutPac
Please start by reproducing the examples on this page before processing your own data.

Then if you didn't figure out any obvious mistake you could have made, please post screen captures illustrating your data: database tree showing all the files, process options of the tPAC and comodulagram processes, figure you get when you double-click on the tPAC file.

** Line 486: Undefined function or variable 'InterpPhase'.

This variable InterpPhase is set only when doInterpolation=true, indeed. There is an obvious bug here.
brainstorm3/toolbox/process/functions/process_pac_comod.m at master · brainstorm-tools/brainstorm3 · GitHub

@Samiee We would need you help here, please :slight_smile:

tPAC.pdf (357.4 KB)

Dear Francois,

I have done it according to the pipeline mentioned in the tutorial (page 2) and comodulogram can be generated. However, I was wondering why the tPAC comodulogram cannot be generated with the settings (low freq. 4-8; high freq. 30-90) shown in page 1. Here I would like to specifically see theta gamma coupling for my data.
What is the rationale behind choosing those broader frequency ranges (low freq. 3-15Hz; high freq 20-200Hz)?

Thanking you
Ashika

@Samiee @Sylvain @MartinC?

Dear Niko,

You may got that error because you marked the "single band" option for frequency for amplitude, when you computed tPAC originally. Is it the case?

If you estimate tPAC from one single band of interest for fA you cannot compute comodulogram from it. There will be only one point for fA in comod (fP-fA map).

There is no need to select that frequency band (20-200), it works for any band of interest. As I mentioned in my previous message, most probably you checked the single band option, and it is reasonable to not be able to project this single band representation on fp-fa map.

Thank you all. It worked when I deselected single band.

sincerely
Ashika

Dear Francois et. al.,
I have tried performing tPAC with more than one central frequencies and then extracted comodulograms for individual subjects. Now while running between-group parametric statistics on the comodulograms the error was "PAC files are not supported yet".

Which between group analysis you recommend?
One way to test against surrogate tPAC as a baseline using Z-statistics. However, the option of surrogate tPAC is also not available in the current version (17 Aug 20)

Please suggest the needful
Sincerely
Ashika

@Samiee @Sylvain?

Unfortunately, PAC is not yet supported for any general statistical test available in brainstorm. It would be great if @MartinC or @Francois work on integrating it in the future.
However, some simple statistical tests are coded particularly for PAC. For example, some basic analysis like z-scoring can be done here: Frequency > Time-resolved PAC > Basic analysis of tPAC maps. For single band tPAC, you can also normalize your estimated value with the distribution of tPAC from surrogate data: https://neuroimage.usc.edu/brainstorm/Tutorials/TutPac#Further_analysis_of_PAC_files

Dear Francois and Samiee

We tried the link shared by you to generate the surrogate data for statistical analysis. However the surrogate option is greyed out in the brainstorm ie it's not allowed in the current version of brainstorm. How to rectify this issue as I have multiple subjectwise tPAC maps & comodulogram for between-group statistics.

Dear Francois

Can surrogate data be generated using Brainstorm?can you please update me regarding this.

Ashika

I'm sorry, I am not working on this topic.

@Samiee @Sylvain @MartinC?

No automatic tool for generating PAC surrogates in Brainstorm so far. I recommend you look into the following paper for general recommendations to do this properly:

https://pubmed.ncbi.nlm.nih.gov/29713271/

Best,

Sylvain.

Thank you