# Noise covariance matrix

**URL:** <https://mne.discourse.group/t/noise-covariance-matrix/2122>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [March 26, 2020, 3:11pm UTC](https://mne.discourse.group/t/noise-covariance-matrix/2122 "2020-03-26T15:11:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 26, 2020, 3:11pm UTC](https://mne.discourse.group/t/noise-covariance-matrix/2122/1 "2020-03-26T15:11:39Z")

</div>

External Email - Use Caution

Hi Denis,  
Thank you very much for your reply.  
I did maxfiltering and ICA for the raw data, so these steps are applied for  
both types of epochs, evoked responses and NCM. But I did not use any  
band-pass filters before averaging. I filtered only averaged ERPs just  
before source reconstruction. So, if I filter NCM epochs, it will not be  
the same. My question is: when should I apply a band-pass filter for the  
NCM? I tried to apply it to the NCM-epochs file, but the result was  
distorted: instead of sources around auditory cortex I've got several  
sources in unpredictable locations. But when I tried to use NCM calculated  
for unfiltered NCM-epochs, the sources were around auditory cortex and had  
much stronger amplitude.  
Looking forward for your answer,  
Thank you very much for helping me,  
Laura.  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200326/a4fa1201/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200326/a4fa1201/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 26, 2020, 3:18pm UTC](https://mne.discourse.group/t/noise-covariance-matrix/2122/2 "2020-03-26T15:18:46Z")

</div>

External Email - Use Caution

Hi Laura,

To me the safest thing is bandpass filtering at raw stage, e.g., prior to ICA.  
Then you keep processing identical for data and noise covariance and just use the baseline segments from the otherwise identically processed epochs.  
Have you tried that?

Denis

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 26, 2020, 3:43pm UTC](https://mne.discourse.group/t/noise-covariance-matrix/2122/3 "2020-03-26T15:43:26Z")

</div>

External Email - Use Caution

Hi Denis,  
1. If the raw data is filtered before the ICA, should one filter averaged  
responses again before source modelling?  
2. In case of the situation I described above, is it possible to use NCM  
calculated for unfiltered NCM-epochs, or it is totally wrong?  
Thank you again!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 26, 2020, 5:09pm UTC](https://mne.discourse.group/t/noise-covariance-matrix/2122/4 "2020-03-26T17:09:09Z")

</div>

External Email - Use Caution

Hi Laura,

Regarding 1) I would see no a priori reason for filtering once more, also filtering is more accurate on the long raw time series. Filtering at later stages may be helpful for exploring ideas but if you can avoid that?s better.  
Regarding 2) It depends if you at least apply maxfiler & ICA to the data. If you don?t temporally filter, your noise-covariance will be more strongly influence by low frequencies, e.g., environmental noise, if you filter, it may help suppressing spatial patterns due to background brain activity e.g. alpha band, hence, yield enhance SNR for your activity of interest.  
If you don?t filter, it will give a solution that looks more like one that is based on the noise covariance from empty room. But applying the same preprocessing in terms of SSP/SSS/ICA is important in any case.  
If it helps, think that the noise covariance defines a noise model for MNE/dSPM.  
The inverse solution will be relative to that model.  
If you have a doubt about the content of your covariance, see the plotting trick in this tutorial [https://mne.tools/dev/auto\_examples/inverse/plot\_mne\_cov\_power.html?highlight=apply%20inverse%20cov](https://mne.tools/dev/auto_examples/inverse/plot_mne_cov_power.html?highlight=apply%20inverse%20cov) to visualize the diagonal of the covariance as topomap. It can give you a feeling for whether you capture brain sources in your covariance.

Hope that helps,  
Denis

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 26, 2020, 7:21pm UTC](https://mne.discourse.group/t/noise-covariance-matrix/2122/5 "2020-03-26T19:21:42Z")

</div>

External Email - Use Caution

Hi Denis,  
Thank you very much for your answer,  
The last question: is it \*acceptable\* to use the NCM from unfiltered epochs  
(after the maxfiltering and ICA) for modelling ERPs which were filtered  
after averaging, or it would be totally wrong?  
Best,  
Laura

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 26, 2020, 9:27pm UTC](https://mne.discourse.group/t/noise-covariance-matrix/2122/6 "2020-03-26T21:27:18Z")

</div>

External Email - Use Caution

Hi Laura,

I?m not sure ?totally wrong? is the right category.  
I would rather ask why you need to filter your evokeds at the evoked stage and  
why you want to avoid filtering at the raw level.  
Do you have scientific reasons to do this, related to the phenomenon of investigation?  
If not, I would stick with a more standard pipeline.  
It is likely that your problem will dissolve when just filtering at the the raw-stage.  
If not, there may be something to understand about your data.  
Btw., note that by performing Maxfilter, depending on whether you have used tSSS, you may have already substantially filtered your data in terms of frequency content.  
So using the unfiltered covariance is not entirely implausible.  
But perhaps you can do better.

Hope that helps,  
Denis

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 27, 2020, 12:19am UTC](https://mne.discourse.group/t/noise-covariance-matrix/2122/7 "2020-03-27T00:19:26Z")

</div>

External Email - Use Caution

Thank you very much for your help!
