# How to get noise covariances if data is Maxfiltered

**URL:** <https://mne.discourse.group/t/how-to-get-noise-covariances-if-data-is-maxfiltered/807>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [August 26, 2014, 3:46pm UTC](https://mne.discourse.group/t/how-to-get-noise-covariances-if-data-is-maxfiltered/807 "2014-08-26T15:46:00Z")\
**Posts on this page:** 3\
**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:** [August 26, 2014, 3:46pm UTC](https://mne.discourse.group/t/how-to-get-noise-covariances-if-data-is-maxfiltered/807/1 "2014-08-26T15:46:00Z")

</div>

Hi all,

I have maxfiltered MEG data with the following arguments:

/neuro/bin/util/maxfilter -force -v -f "$subject"\_"$file"\_raw.fif -o  
"$subject"\_"$file"\_raw\_tsss.fif -frame head -origin 0 0 50 \ -autobad 10000  
-badlimit 7 -site biomag -st 16 -corr 0.95 \> "$subject"\_"$file"\_maxfout

However, in Maxfilter manual it is said:

"Maxwell filtering however modifies the sensor noise properties, and the  
baseline noises may become correlated. Therefore, statistical parameters  
such as confidence intervals and volumes are incorrect if analysis software  
uses sensor noises estimated from the baselines.

Note: Correlations of the sensor noises must be taken into account if the  
Maxwell-filtered sensor noises are applied in source modelling."

I have calculated noise covariance matrixes from the baselines of  
Maxfiltered data using mne.compute\_covariance.

Can these covariance matrixes be used in source modelling or how the noise  
covariances should be calculated if the data is Maxfiltered?

Any advice is welcome!

Regards,  
Maria  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20140826/9c05cf67/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140826/9c05cf67/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:** [August 26, 2014, 3:52pm UTC](https://mne.discourse.group/t/how-to-get-noise-covariances-if-data-is-maxfiltered/807/2 "2014-08-26T15:52:17Z")

</div>

HI Maria,

the noise covariance is usually computed to take into account the  
correlation structure of the sensors, for example when computing an inverse  
solution.  
As I understand the section you quoted it means that you cannot rely on  
naive SNR / or global field power measures computed from maxfilterered data  
since those are normalzied against the number of real number channels  
instead of the true rank of the data. The noiseocvariance however will  
reflect the rank of the max filtered rank data.

as an excercise you can compute the noise cov after maxfiltering the data  
and plot its eigenvalue spectra as demonstrated here:  
[http://martinos.org/mne/stable/auto\_examples/plot\_estimate\_covariance\_matrix\_baseline.html](http://martinos.org/mne/stable/auto_examples/plot_estimate_covariance_matrix_baseline.html)

the kink in the plot should match the number of components estimated to be  
inside the head by maxfilter.

HTH,  
Denis

2014-08-26 17:46 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:

> Hi all,
> 
> I have maxfiltered MEG data with the following arguments:
> 
> /neuro/bin/util/maxfilter -force -v -f "$subject"\_"$file"\_raw.fif -o  
> "$subject"\_"$file"\_raw\_tsss.fif -frame head -origin 0 0 50 \ -autobad 10000  
> -badlimit 7 -site biomag -st 16 -corr 0.95 \> "$subject"\_"$file"\_maxfout
> 
> However, in Maxfilter manual it is said:
> 
> "Maxwell filtering however modifies the sensor noise properties, and the  
> baseline noises may become correlated. Therefore, statistical parameters  
> such as confidence intervals and volumes are incorrect if analysis software  
> uses sensor noises estimated from the baselines.
> 
> Note: Correlations of the sensor noises must be taken into account if the  
> Maxwell-filtered sensor noises are applied in source modelling."
> 
> I have calculated noise covariance matrixes from the baselines of  
> Maxfiltered data using mne.compute\_covariance.
> 
> Can these covariance matrixes be used in source modelling or how the noise  
> covariances should be calculated if the data is Maxfiltered?
> 
> Any advice is welcome!
> 
> Regards,  
> Maria
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> The information in this e-mail is intended only for the person to whom it  
> is  
> addressed. If you believe this e-mail was sent to you in error and the  
> e-mail  
> contains patient information, please contact the Partners Compliance  
> HelpLine at  
> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you in  
> error  
> but does not contain patient information, please contact the sender and  
> properly  
> dispose of the e-mail.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20140826/2abf9e08/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140826/2abf9e08/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:** [August 26, 2014, 3:59pm UTC](https://mne.discourse.group/t/how-to-get-noise-covariances-if-data-is-maxfiltered/807/3 "2014-08-26T15:59:03Z")

</div>

Many thanks Denis!  
I will try this example.

-Maria

2014-08-26 18:52 GMT+03:00 Denis-Alexander Engemann \<  
denis.engemann at gmail.com\>:

> HI Maria,
> 
> the noise covariance is usually computed to take into account the  
> correlation structure of the sensors, for example when computing an inverse  
> solution.  
> As I understand the section you quoted it means that you cannot rely on  
> naive SNR / or global field power measures computed from maxfilterered data  
> since those are normalzied against the number of real number channels  
> instead of the true rank of the data. The noiseocvariance however will  
> reflect the rank of the max filtered rank data.
> 
> as an excercise you can compute the noise cov after maxfiltering the data  
> and plot its eigenvalue spectra as demonstrated here:  
> [http://martinos.org/mne/stable/auto\_examples/plot\_estimate\_covariance\_matrix\_baseline.html](http://martinos.org/mne/stable/auto_examples/plot_estimate_covariance_matrix_baseline.html)
> 
> the kink in the plot should match the number of components estimated to be  
> inside the head by maxfilter.
> 
> HTH,  
> Denis
> 
> 2014-08-26 17:46 GMT+02:00 Maria Hakonen \<maria.hakonen at gmail.com\>:
> 
> > Hi all,
> > 
> > I have maxfiltered MEG data with the following arguments:
> > 
> > /neuro/bin/util/maxfilter -force -v -f "$subject"\_"$file"\_raw.fif -o  
> > "$subject"\_"$file"\_raw\_tsss.fif -frame head -origin 0 0 50 \ -autobad 10000  
> > -badlimit 7 -site biomag -st 16 -corr 0.95 \> "$subject"\_"$file"\_maxfout
> > 
> > However, in Maxfilter manual it is said:
> > 
> > "Maxwell filtering however modifies the sensor noise properties, and the  
> > baseline noises may become correlated. Therefore, statistical parameters  
> > such as confidence intervals and volumes are incorrect if analysis  
> > software  
> > uses sensor noises estimated from the baselines.
> > 
> > Note: Correlations of the sensor noises must be taken into account if the  
> > Maxwell-filtered sensor noises are applied in source modelling."
> > 
> > I have calculated noise covariance matrixes from the baselines of  
> > Maxfiltered data using mne.compute\_covariance.
> > 
> > Can these covariance matrixes be used in source modelling or how the  
> > noise covariances should be calculated if the data is Maxfiltered?
> > 
> > Any advice is welcome!
> > 
> > Regards,  
> > Maria
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mne\_analysis mailing list  
> > Mne\_analysis at nmr.mgh.harvard.edu  
> > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > 
> > The information in this e-mail is intended only for the person to whom it  
> > is  
> > addressed. If you believe this e-mail was sent to you in error and the  
> > e-mail  
> > contains patient information, please contact the Partners Compliance  
> > HelpLine at  
> > [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> > in error  
> > but does not contain patient information, please contact the sender and  
> > properly  
> > dispose of the e-mail.
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> The information in this e-mail is intended only for the person to whom it  
> is  
> addressed. If you believe this e-mail was sent to you in error and the  
> e-mail  
> contains patient information, please contact the Partners Compliance  
> HelpLine at  
> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you in  
> error  
> but does not contain patient information, please contact the sender and  
> properly  
> dispose of the e-mail.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20140826/db4aeb2f/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140826/db4aeb2f/attachment.html)
