[FieldTrip] Warning: copying input chantype to Montage in runica

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Wed Feb 2 09:04:31 CET 2022

Hi Felicitas,

I am currently examining peak alpha frequency. To do so, I am analyzing EEG data collected during a period of 6 minutes of rest.

Prior to running frequency analysis, I am using PCA to remove non-brain artifacts.

I assume that you mean ICA, rather than PCA, given the cfg details you pasted below in your original e-mail.

While the algorithm seems to work, I am getting the following warning:

“Warning: copying input chantype to montage.”

The script still runs, but I wanted to make sure I understand what fieldtrip is doing. I am importing the data from eeglab. Below my code:

        cfg = [];
        cfg.dataset = 'epoched_closed.set'; %this is the dataset
        ft_data1 = ft_preprocessing(cfg);
        cfg.method       = 'runica';
        X=ft_componentanalysis(cfg,data); %%this is the line that gives me the warning

As a recommendation, I suggest to start off with a ‘fresh’ cfg prior to calling ft_componentanalysis, to avoid unwanted side effects of defined options from a previous analysis step.

The warning can be ignored. Background: the component unmixing that is achieved by ft_componentanalysis reflects a linear projection of the original channel data. In order to keep the data object consistent with itself, i.e. to keep the ‘description’ of the electrodes consistent with what is in the time series, the same linear projection needs to be applied to the data object’s ‘elec’-field. Along with the linear projection, the specification of the channeltype changes from ‘eeg’ to something potentially ill-defined (to something that is not easily defined as something that reflects a physical detector). Why once upon a time this change in chantype was deemed sufficiently relevant in order for it to deserve a warning, I don’t know. By the way, Fieldtrip’s attempt to keep the electrode description consistent with the time series would be relevant in case you would consider source reconstruction at a later stage of the analysis. Given your research question, I assume that this is not im Frage (and even if it were, it wouldn’t be recommended given the low number of electrodes).

I hope this clarifies things.

Best wishes,

The cfg and data I use are as follows:

cfg =
    dataset: 'epoched_closed.set'
     length: 5
    overlap: 0
     method: 'runica'
     runica: [1×1 struct]

data =
         label: {31×1 cell}
       fsample: 500
          elec: [1×1 struct]
           cfg: [1×1 struct]
           hdr: [1×1 struct]
         trial: {1×36 cell}
          time: {1×36 cell}
    sampleinfo: [36×2 double]

I have looked into the warning and am assuming "chantype" lets fieldtrip know that it is handling eeg data, but would appreciate some more insight into what fieldtrip is doing behind the scenes (i.e., why the warning pops up).

Thank you,

fieldtrip mailing list

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

More information about the fieldtrip mailing list