[FieldTrip] Using ft_crossfrequencyanalysis

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Thu Jun 17 07:50:52 CEST 2021


Thanks for your message. But unfortunately, things have not been clarified.

What we do know now, is that you get a warning, not an error.

Then my question is still: What function, and what line in the function is throwing the  warning?

I suspect that the version of the function you are using has a call to ft_checkconfig(cfg, ‘forbidden’, {‘chanlow’ ‘chanhigh’})

My (i.e. today’s) version of the function does not have this line. From the revision history I can see that the last change predates the date of the version that you mention (20210413), and even without this change the potential culprit function call was not there. I therefore suspect that you are using an older version, which could contain a bug.

Please ensure that you are using a sufficiently recent version of the code (this might be even already achieved by cleaning your matlab path) and try again.

Best wishes,


On 16 Jun 2021, at 21:32, Vivekananda, Umesh <u.vivekananda at ucl.ac.uk<mailto:u.vivekananda at ucl.ac.uk>> wrote:

Hi Jan-Mathijs

Apologies Ill explain a bit more. Im trying to look at hippocampal - prefrontal coupling. I am using intracranial EEG data. The exact error in yellow is this 'Warning: The field cfg.chanlow is forbidden, it will be removed from your configuration
The field cfg.chanhigh is forbidden, it will be removed from your configuration'

It is thrown when i perform the CFC command (in red)
cfg.method      = 'plv';
            cfg.keeptrials  = keepTrials;
            cfg.chanlow    = cueHPCPower.label; %an individual hippocampal channel
            cfg.chanhigh   = cuePFCPower.label; %an individual prefrontal channel
            cfg.freqlow      = phaseBand;
            cfg.freqhigh    = ampBand;
            CFC                = ft_crossfrequencyanalysis(cfg,cueHPCPower,cuePFCPower);

​As a result the output of the CFC command does not ascribe a channel, and the crsspctrm is not calculated looking a bit like
label  0x1 cell
crsspctrm []

Im currently using fieldtrip-20210413 (which I downloaded for the excellent course Donders did!)

I hope that makes more sense

Many thanks


From: fieldtrip <fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>> on behalf of Schoffelen, J.M. (Jan Mathijs) via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Sent: 16 June 2021 19:24
To: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Cc: Schoffelen, J.M. (Jan Mathijs) <janmathijs.schoffelen at donders.ru.nl<mailto:janmathijs.schoffelen at donders.ru.nl>>
Subject: Re: [FieldTrip] Using ft_crossfrequencyanalysis

Hi Umesh,

What was the error? 'cfg.chanlow and cfg.chanhigh were forbidden variables’?

Please paste the complete error as you get it on the screen, as well as the stack (i.e. the line at which the error is thrown).
Also, what is the version of FieldTrip you have been using?

We need a little bit more information to be able to think along.

Good luck,

On 16 Jun 2021, at 17:38, Vivekananda, Umesh via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Dear team

I have used this function in the past successfully when considering within channel analysis. However when I used the function again but across channels like so
cfg.method      = 'plv';
cfg.keeptrials  = keepTrials;
cfg.chanlow     = cueHPCPower.label;
cfg.chanhigh    = cuePFCPower.label;
cfg.freqlow     = phaseBand;
cfg.freqhigh    = ampBand;
CFC             = ft_crossfrequencyanalysis(cfg,cueHPCPower,cuePFCPower);

​I got an error stating cfg.chanlow and cfg.chanhigh were forbidden variables. I had derived a fourier spectrum for HPC and PFC channel separately in order to compute individual channel CFC before averaging. Any help would be much appreciated



fieldtrip mailing list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210617/67f13d69/attachment.htm>

More information about the fieldtrip mailing list