[Mne_analysis] Mne_analysis Digest, Vol 142, Issue 20

Jeff Hanna jeff.hanna at gmail.com
Fri Nov 8 08:24:05 EST 2019
Search archives:

        External Email - Use Caution        

Hello Marijn,

Thank you; that was helpful. One quick follow-up: In reference [5],
weight_norm is set to None, but before the beamformer filters are
calculated, the leadfield matrix column vectors are normalised to unity. If
I understand correctly, this is equivalent to array-gain weight
normalisation (which is as far as I know not directly implemented in
MNE-Python beamformer approaches). Is that correct?

Best,
Jeff

On Fri, 8 Nov 2019 at 12:14, <mne_analysis-request at nmr.mgh.harvard.edu>
wrote:

> Send Mne_analysis mailing list submissions to
>         mne_analysis at nmr.mgh.harvard.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> or, via email, send a message with subject or body 'help' to
>         mne_analysis-request at nmr.mgh.harvard.edu
>
> You can reach the person managing the list at
>         mne_analysis-owner at nmr.mgh.harvard.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Mne_analysis digest..."
>
>
> Today's Topics:
>
>    1. Re: differing weight_norm defaults for make_lcmv and
>       make_dics (Marijn van Vliet)
>    2. Re: [FORUM] Re: How to edit time attribute in a raw       object
>       (Fabrice DUPRAT)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 7 Nov 2019 23:46:58 +0200
> From: Marijn van Vliet <w.m.vanvliet at gmail.com>
> Subject: Re: [Mne_analysis] differing weight_norm defaults for
>         make_lcmv and make_dics
> To: Discussion and support Software <mne_analysis at nmr.mgh.harvard.edu>
> Message-ID: <C30CB78B-6660-4682-9E85-CBAAE8A6EB8B at gmail.com>
> Content-Type: text/plain; charset="us-ascii"
>
>         External Email - Use Caution
>
> Hello Jeff,
>
> there is currently no consensus for the best choice of parameters for
> beamformers. It seems that every work of literature on the topic has its
> own way of doing things, hence the enormous number of parameters. The LCMV
> beamformer is developed by Britta Westner and reflects the practices of the
> Center of Functionally Integrative Neuroscience, Aarhus University. The
> DICS beamformer is developed by me and reflects the practices of the
> Imaging Language Group, Aalto University. We are together with Christian
> Kiefer in the process of performing an extensive comparison study to map
> out the effects of all the parameters in practise.
>
> Here is what the docstring of make_dics has to say about it:
>
> The DICS beamformer is very similar to the LCMV (make_lcmv()) beamformer
> and many of the parameters are shared. However, make_dics() and make_lcmv()
> currently have different defaults for these parameters, which were settled
> on separately through extensive practical use case testing (but not
> necessarily exhaustive parameter space searching), and it remains to be
> seen how functionally interchangeable they could be.
>
> The default setting reproduce the DICS beamformer as described in [5]:
>
> inversion='single', weight_norm=None, normalize_fwd=True
> To use the make_lcmv() defaults, use:
>
> inversion='matrix', weight_norm='unit-gain', normalize_fwd=False
>
> References:
> [5] van Vliet, et al. (2018) Analysis of functional connectivity and
> oscillatory power using DICS: from raw MEG data to group-level statistics
> in Python. bioRxiv, 245530. https://doi.org/10.1101/245530
>
> best,
> Marijn.
>
> --
> Marijn van Vliet
> Postdoctoral Researcher
> Department of Neuroscience and Biomedical Engineering
> Aalto University
>
> > On 7 Nov 2019, at 16:55, Jeff Hanna <jeff.hanna at gmail.com> wrote:
> >
> >         External Email - Use Caution
> >
> >
> > Hello,
> >
> > The default value for weight_norm in mne.beamformer.make_lcmv is
> "unit-noise-gain," but is None in .make_dics. Is there a reason behind
> this, i.e. are there potential issues with the use of unit-noise-gain in
> DICS that aren't a problem with LCMV?
> >
> > Best,
> > Jeff Hanna
> > _______________________________________________
> > Mne_analysis mailing list
> > Mne_analysis at nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 8 Nov 2019 12:13:33 +0100
> From: "Fabrice DUPRAT" <duprat at ipmc.cnrs.fr>
> Subject: Re: [Mne_analysis] [FORUM] Re: How to edit time attribute in
>         a raw   object
> To: "'Discussion and support forum for the users of MNE Software'"
>         <mne_analysis at nmr.mgh.harvard.edu>
> Message-ID: <00ae01d59625$8f5f4700$ae1dd500$@ipmc.cnrs.fr>
> Content-Type: text/plain; charset="utf-8"
>
>         External Email - Use Caution
>
> Eric
>
>
>
> Can we directly modify the ` <http://raw.info> raw.info['meas_date']`
> value  without creating an annotation ?
>
>
>
> How ?
>
>
>
> Thank you in advance
>
>
>
>
>
>
>
> De : mne_analysis-bounces at nmr.mgh.harvard.edu [mailto:
> mne_analysis-bounces at nmr.mgh.harvard.edu] De la part de Eric Larson
> Envoy? : lundi 4 novembre 2019 15:22
> ? : Discussion and support forum for the users of MNE Software <
> mne_analysis at nmr.mgh.harvard.edu>
> Objet : [FORUM] Re: [Mne_analysis] How to edit time attribute in a raw
> object
>
>
>
>         External Email - Use Caution
>
> If the time of recording start is properly encoded in the file and read by
> MNE (which is hopefully the case), then you should be able to use it. You
> can manually convert from relative (starting from zero) to absolute time by
> looking at `raw.info <http://raw.info> ['meas_date']` and
> `raw.first_samp`. But the eaiser thing to do would be to construct an
> Annotations <https://mne.tools/stable/generated/mne.Annotations.html>
> class with your behavioral/pupil events (in whatever starting time frame
> you prefer), then set `raw.annotations = my_annotations`, which should
> convert it to the raw object's time reference in `raw.info <
> http://raw.info> ['meas_date']`. Check out the Annotations tutorials --
> such as this one <
> https://mne.tools/dev/auto_tutorials/raw/plot_30_annotate_raw.html#creating-annotations-programmatically>
> -- and if it's not clear from them how to do it, we should improve the
> documentation.
>
>
>
> We do not allow modifying the `raw.times` attribute intentionally. A lot
> of downstream code (e.g., epoching) would break, loudly or (worse)
> silently, in unexpected and unpredictable if users could do this.
>
>
>
> Eric
>
>
>
>
>
> On Mon, Nov 4, 2019 at 6:03 AM vahid.bokharaie at tuebingen.mpg.de <mailto:
> vahid.bokharaie at tuebingen.mpg.de>  <vahid.bokharaie at tuebingen.mpg.de
> <mailto:vahid.bokharaie at tuebingen.mpg.de> > wrote:
>
>         External Email - Use Caution
>
> Hi Philip
> Thanks for your sharp response. It calarified the situation for me.
> And to answer to your question, for rat EEG, we record behavioural data in
> a go/no-go task, pupil diameters and EEG. I define Events based on
> behavioural and pupil size, and then should convert them into proper format
> to be read in mne. So it is important that time stamps match. Of course
> this is something that can be handled easily, but I could not believe such
> a simple feature is not incorporated into mne. Hence spent too much time
> trying to find the right function.
> Regards,
> Vahid
>
>
>
> -------- Original Message --------
> Subject: Re: [Mne_analysis] How to edit time attribute in a raw object
> From: Phillip Alday
> To: Discussion and support forum for the users of MNE Software ,Vahid
> Bokharaie
> CC:
>
>
>
>
> The time in the raw recordings (the Raw object) are assumed to be
> arbitrary and just a measure of time elapsed since the beginning of the
> recording, so there's not really a way to set or manipulate them. Why do
> you need absolute time here? Are you concatenating Raw objects?
>
> Best,
> Phillip
>
> On 4/11/19 10:55 am, Vahid Bokharaie wrote:
> >         External Email - Use Caution
> >
> > Hi all
> > I posted this question in stackoverflow but seems MNE community is not
> > active there, hence I searched for MNE mailing list and joined it.
> > I use MNE for analysis of both rat and human EEG recordings. The system
> > we have for rat EEG is from a company called NeuroNexus, and they have
> > their own Matlab script to convert the EEG recordings and the time
> > stamps into mat files. And then I import them in python and use MNE to
> > analyse and visualise them. This means I have to establish my EEG raw
> > objects from the scratch and save them to file, which I can do. But a
> > seemingly trivial thing that I have not managed to find out how to do is
> > to incorporate the time array into the EEG raw object. When I create and
> > save the EEG raw object, it automatically set the initial time to 0, but
> > my initial recording time is not 0 and I need to offset that. It is
> > important to correct this, because the time stamps of EEG and
> > behavioural data should match.
> > Simply typing |raw.times = new_array| leads to |AttributeError: can't
> > set attribute. ||This should be a very simple thing to do, but I have
> > not been able to find it although I have looked into the documentation.
> > So, I thought to ask it in here and if it is not really possible, then
> > dig into the source code to fix it myself. Thanks in advance.
> > Regards,
> > Vahid
> > |
> >
> > --
> >
> ---------------------------------------------------------------------------------------
> > Vahid S. Bokharaie, PhD
> > Senior Research Scientist
> > Max Planck Institute for Biological Cybernetics
> > Department of Physiology of Cognitive Processes
> > Max Planck Ring 8, 72076 Tuebingen, Germany
> > +49 (0)7071 - 601-1644
> > vahid.bokharaie at tuebingen.mpg.de <mailto:
> vahid.bokharaie at tuebingen.mpg.de>
> > https://www.kyb.tuebingen.mpg.de/person/59086/84548
> >
> --------------------------------------------------------------------------------------
> >
> >
> > _______________________________________________
> > Mne_analysis mailing list
> > Mne_analysis at nmr.mgh.harvard.edu <mailto:
> Mne_analysis at nmr.mgh.harvard.edu>
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> >
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu <mailto:Mne_analysis at nmr.mgh.harvard.edu>
>
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20191108/bd09f72f/attachment.html
>
> ------------------------------
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
> End of Mne_analysis Digest, Vol 142, Issue 20
> *********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20191108/7a4b14ef/attachment-0001.html 


More information about the Mne_analysis mailing list