<div dir="ltr">Thank you, yes this was very helpful! You are correct, I am not planning any source reconstruction. <div><br></div><div>Best wishes,</div><div>Felicitas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 2, 2022 at 2:07 AM Schoffelen, J.M. (Jan Mathijs) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="overflow-wrap: break-word;">
Hi Felicitas,
<div>
<div><br>
<blockquote type="cite">
<div>
<div dir="ltr">I am currently examining peak alpha frequency. To do so, I am analyzing EEG data collected during a period of 6 minutes of rest.<br>
<br>
Prior to running frequency analysis, I am using PCA to remove non-brain artifacts.
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I assume that you mean ICA, rather than PCA, given the cfg details you pasted below in your original e-mail.</div>
<br>
<blockquote type="cite">
<div>
<div dir="ltr">While the algorithm seems to work, I am getting the following warning:<br>
<br>
“<b>Warning: copying input chantype to montage.”</b><br>
 <br>
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:<br>
 <br>
        cfg = [];<br>
        cfg.dataset = 'epoched_closed.set'; %this is the dataset<br>
        ft_data1 = ft_preprocessing(cfg);<br>
        cfg.length=5;<br>
        cfg.overlap=0;<br>
        data=ft_redefinetrial(cfg,ft_data1);<br>
        cfg.method       = 'runica';<br>
        cfg.runica.pca=15;<br>
       <b> X=ft_componentanalysis(cfg,data); </b>%%this is the line that gives me the warning<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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). </div>
<div><br>
</div>
<div>I hope this clarifies things.</div>
<div><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<br>
<blockquote type="cite">
<div>
<div dir="ltr"><br>
The cfg and data I use are as follows:<br>
<br>
cfg =<br>
    dataset: 'epoched_closed.set'<br>
     length: 5<br>
    overlap: 0<br>
     method: 'runica'<br>
     runica: [1×1 struct]
<div><br>
data =<br>
         label: {31×1 cell}<br>
       fsample: 500<br>
          elec: [1×1 struct]<br>
           cfg: [1×1 struct]<br>
           hdr: [1×1 struct]<br>
         trial: {1×36 cell}<br>
          time: {1×36 cell}<br>
    sampleinfo: [36×2 double]<br>
<br>
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).<br>
<br>
Thank you,<br>
Felicitas<br>
<br>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!8g-CuxoZMze_QrAXgZwKnmLE5UwNBmNxUN1aoKBsS1LPEkIZUoSR6TyF1V2HgqisgAEA5k6SO3wh8vne3BVKDITsq5D5TrLGJ8AVHw$" target="_blank">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!8g-CuxoZMze_QrAXgZwKnmLE5UwNBmNxUN1aoKBsS1LPEkIZUoSR6TyF1V2HgqisgAEA5k6SO3wh8vne3BVKDITsq5D5TrLGJ8AVHw$</a>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</div>

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><strong>Felicitas A. Huber, M.A.</strong></div><div>Doctoral Student, Clinical Psychology</div><div>Research Assistant, Psychophysiology Laboratory of Affective Neuroscience</div><div>The University of Tulsa</div><div><a href="https://artsandsciences.utulsa.edu/psychophys/" target="_blank">https://artsandsciences.utulsa.edu/psychophys/</a><br></div><div><u>918-631-3565</u>; <u>918-631-2175</u></div><div><a href="mailto:feh9986@utulsa.edu" target="_blank">feh9986@utulsa.edu</a></div></div></div></div></div>