[Mne_analysis] Mne_analysis Digest, Vol 136, Issue 13

Melvin Harsono melvin_harsono at yahoo.com
Mon May 13 00:53:28 EDT 2019
Search archives:

        External Email - Use Caution        

Thank you Mainak Jas,

I know that we can do it interactively (the topomap plot) and I did that. Well, I think this is the quick solution that I should apply. And I will try your suggestion for the averaging using numpy 😊

Best regards,
Melvin H.

From: mne_analysis-request at nmr.mgh.harvard.edu
Sent: Tuesday, May 7, 2019 3:05 PM
To: mne_analysis at nmr.mgh.harvard.edu
Subject: Mne_analysis Digest, Vol 136, Issue 13

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: maxfilter for head movement compensation only (Eric Larson)
   2. Re: Average evoked data in a certain time range (Mainak Jas)
   3. Re: maxfilter for head movement compensation only
      (Evgenii Kalenkovich)


----------------------------------------------------------------------

Message: 1
Date: Mon, 6 May 2019 13:33:17 -0400
From: Eric Larson <larson.eric.d at gmail.com>
Subject: Re: [Mne_analysis] maxfilter for head movement compensation
	only
To: Discussion and support forum for the users of MNE Software
	<mne_analysis at nmr.mgh.harvard.edu>
Message-ID:
	<CAGu2niXmCvL0HhRnyep8msB1JUqzoz7t=cDTW5Ezr+vyt3Hpag at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

        External Email - Use Caution        

>
>
>    1. Head position extraction using Electa's MaxFilter
>       1. Is this step sensitive to noisy/flat channels if I only need
>       head position?
>       2. Is it necessary/advised to use -cal and -ctc files for this
>       purpose?
>
> During recordings, the HPI coils emit sinusoids, and these are picked up
by the MEG channels. From this recording, the amplitudes on each channel
are estimated. From these amplitudes, coil locations are estimated. So if
there is some channel that is bad, it could (probably only slightly) bias
the position estimation step. So better to exclude bad channels even before
head position estimation if possible.

Regarding fine calibration and cross-talk, I'm not sure if MaxFilter makes
use of them in the computed magnetic dipole forward model or not. My guess
is that it does not. (I suppose you could check to see if the positions are
numerically identical with and without fine calibration and cross-talk to
check, if you want.) Even if it does use them, the difference will probably
be minimal.

>
>    1. Head movement compensation using mne-python's maxwell_filter
>    1. Is this step sensitive to noisy/flat channels if I only do movement
>       compensation?
>       2. Is it necessary/advised to use the fine calibration and
>       cross-talk cancellation files for this?
>       3. What parameters should I supply to maxwell_filter to limit it to
>       head movement compensation?
>
> Currently there is no way to do just movement compensation without also
maxwell filtering (reducing rank / denoising). In principle it should be
possible to do this without rank reduction (see this GitHub issue
<https://github.com/mne-tools/mne-python/issues/6085> if you want to track
our progress here) but it is not implemented yet, and there will probably
be a reduction in the resulting signal-to-noise ratio due to reconstruction
noise.

I remove bad channels/epochs at a later stage using the autoreject package.
>

One reproducible option would be to use autoreject or some other automated
routine to determine bad channels. MaxFilter even has an `autobad` option
you could try running before the head position estimation step to get a
list of bad channels. In principle you should be able to combine head
position estimation -headpos and automatic bad channel detection -autobad,
but in practice you can encounter bugs this way, so it's safer to separate
it into two steps.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190506/38ea9b9c/attachment-0001.html 

------------------------------

Message: 2
Date: Mon, 6 May 2019 20:37:48 -0400
From: Mainak Jas <mainakjas at gmail.com>
Subject: Re: [Mne_analysis] Average evoked data in a certain time
	range
To: Discussion and support forum for the users of MNE Software
	<mne_analysis at nmr.mgh.harvard.edu>
Message-ID:
	<CANzrpG06xs+fZsNRA4M6Mmus+xnRtY4ykTAc+FewCWD+OoeXaA at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

        External Email - Use Caution        

Hi Melvin,

I believe you can do this interactively in evoked.plot
<https://martinos.org/mne/dev/generated/mne.Evoked.html#mne.Evoked.plot>.
If you want to script this, the easiest solution might be to do the
averaging yourself by following these steps:

1. Crop the data to the desired time interval using evoked.crop
2. Average the resulting evoked.data using numpy
3. Use EvokedArray to create a new evoked instance from this average numpy
array
4. Use evoked.plot_topomap on this average.

Hope that helps,
Mainak

On Mon, May 6, 2019 at 9:18 AM Melvin Harsono <melvin_harsono at yahoo.com>
wrote:

>         External Email - Use Caution
>
> Dear MNE developers,
>
>
>
> I would like to ask if it is possible to average the evoked data in a
> certain time range? For example I would like to have a 2 seconds average
> (when t=1 to t=3) out of 4 seconds recording (t=0 to t=4) -> middle span
> averaging.
>
> My objective is to plot a topomap using evoked.plot_topomap in the 1-3
> seconds middle span average (the output is just a single topomap image as
> the result of averaging from the 1-3 seconds)
>
>
>
> Best regards,
>
> Melvin H.
> _______________________________________________
> Mne_analysis mailing list
> 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/20190506/663bcd48/attachment-0001.html 

------------------------------

Message: 3
Date: Tue, 7 May 2019 10:02:05 +0300
From: Evgenii Kalenkovich <e.kalenkovich at gmail.com>
Subject: Re: [Mne_analysis] maxfilter for head movement compensation
	only
To: Discussion and support forum for the users of MNE Software
	<mne_analysis at nmr.mgh.harvard.edu>
Message-ID:
	<CAJ2veP6pbfSRTGF867wDbQ=_Mzo0b3bZns=Lckou+Ouh3twaYw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

        External Email - Use Caution        

Hello, dear Eric. Thank you for your reply! It was very helpful.


>>    1. Head position extraction using Electa's MaxFilter
>>       1. Is this step sensitive to noisy/flat channels if I only need
>>       head position?
>>       2. Is it necessary/advised to use -cal and -ctc files for this
>>       purpose?
>>
>> During recordings, the HPI coils emit sinusoids, and these are picked up
> by the MEG channels. From this recording, the amplitudes on each channel
> are estimated. From these amplitudes, coil locations are estimated. So if
> there is some channel that is bad, it could (probably only slightly) bias
> the position estimation step. So better to exclude bad channels even before
> head position estimation if possible.
>
> Regarding fine calibration and cross-talk, I'm not sure if MaxFilter makes
> use of them in the computed magnetic dipole forward model or not. My guess
> is that it does not. (I suppose you could check to see if the positions are
> numerically identical with and without fine calibration and cross-talk to
> check, if you want.) Even if it does use them, the difference will probably
> be minimal.
>

I'll try to run -headpos with/without supplying a list of bad channels and
with/without -cal and -ctc files and see if it leads to differences in the
head position estimation.

>
>>    1. Head movement compensation using mne-python's maxwell_filter
>>    1. Is this step sensitive to noisy/flat channels if I only do
>>       movement compensation?
>>       2. Is it necessary/advised to use the fine calibration and
>>       cross-talk cancellation files for this?
>>       3. What parameters should I supply to maxwell_filter to limit it
>>       to head movement compensation?
>>
>> Currently there is no way to do just movement compensation without also
> maxwell filtering (reducing rank / denoising). In principle it should be
> possible to do this without rank reduction (see this GitHub issue
> <https://github.com/mne-tools/mne-python/issues/6085> if you want to
> track our progress here) but it is not implemented yet, and there will
> probably be a reduction in the resulting signal-to-noise ratio due to
> reconstruction noise.
>

I will skip the head movement compensation entirely for now then and
subscribe to the issue you've mentioned.


>
> I remove bad channels/epochs at a later stage using the autoreject package.
>>
>
> One reproducible option would be to use autoreject or some other automated
> routine to determine bad channels. MaxFilter even has an `autobad` option
> you could try running before the head position estimation step to get a
> list of bad channels. In principle you should be able to combine head
> position estimation -headpos and automatic bad channel detection -autobad,
> but in practice you can encounter bugs this way, so it's safer to separate
> it into two steps.
>

I did try running `autoreject` on the raw data cut into constant-width
segments. Unfortunately, it results in half-to-all the channels being
flagged as bad in most of the epochs. Also, the worst dozen or so channels
were different both from the manually selected bad channels and the
`autoreject`'s results with different settings (I've varied
pre-`autoreject` linear filtering cutoffs, decimation factor, and segment
length).

I haven't tried MaxFilter's `-autobad` yet. Every person telling me how to
use MaxFilter made sure to mention its unreliability so I've never
considered it an option :-) I'll try and see whether the results are far
from what manual inspection yields.


Again, really appreciated your answer.
Evgenii
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190507/1b26347f/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 136, Issue 13
*********************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190513/192e2573/attachment-0001.html 


More information about the Mne_analysis mailing list