Nesting Freq value in PAC seems doubtful

Hi everyone,

I am trying to compute PAC on the extracted scouts (148) according to the Destrieux atlas on the source space for somatosensory task and resting state MEG data.
I have written the script myself following the tutorials on Brainstorm. A snippet of the code:

% Process: Phase-amplitude coupling
sFiles = bst_process('CallProcess', 'process_pac', sFiles, , ...
'timewindow', [0.01, 0.25], ...
'target_tf', '', ...
'nesting', [1, 12], ...
'nested', [30, 300], ...
'numfreqs', 0, ...
'parallel', 0, ...
'ismex', 1, ...
'max_block_size', 1, ...
'avgoutput', 0, ...
'savemax', 0);

The output structure for sPAC considers only the lower value of Nesting Freq which is 1 Hz in this case. If I change the value to 2 Hz, it considers 2 Hz as the Nesting Freq. So, I get an array of 148 x 1, where the lower value is repeated 148 times. On the other hand, the Nested Freq has various values.
I am not sure why this is the case. Any leads on this will be helpful.

Thanks in advance!

It seems there is a confusion in on the data is organized in the PAC file:

PAC tries all the combinations for the NestingFreq (LowFreqs) range and the NestedFreq (HighFreqs) for all the Channels (or Scouts). These PAC values are stored in the field sPAC.DirectPAC, thus this variable has a size of (nChannels, nTime, nLowFreqs, nHighFreqs).

The TF field has only the maximum (maxPAC) for each channel, so it has nChannels elements.

The LowFreq-HighFreq combination for the maxPAC values are stored in sPAC.NestingFreq and sPAC.NestedFreq, thus each of these fields have also nChannels elements

More information on the data structure for PAC here:
https://neuroimage.usc.edu/brainstorm/Tutorials/TutPac#File_contents