[Mne_analysis] Mne_analysis Digest, Vol 121, Issue 36

Stout, Jeffrey jstout at mcw.edu
Thu Feb 22 10:46:13 EST 2018
Search archives:

Yes, it does look like the issue is the combination of the gradiometers.  I tried the analysis with the ch_types='planar1' and it does show a negative Z value.

Thank you both for your help.  


Jeff

-----Original Message-----
From: mne_analysis-bounces at nmr.mgh.harvard.edu [mailto:mne_analysis-bounces at nmr.mgh.harvard.edu] On Behalf Of mne_analysis-request at nmr.mgh.harvard.edu
Sent: Thursday, February 22, 2018 1:49 AM
To: mne_analysis at nmr.mgh.harvard.edu
Subject: Mne_analysis Digest, Vol 121, Issue 36

ATTENTION: This email originated from a sender outside of MCW. Use caution when clicking on links or opening attachments.
________________________________

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://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harvard.edu_mailman_listinfo_mne-5Fanalysis&d=DwICAg&c=aFamLAsxMIDYjNglYHTMV0iqFn3z4pVFYPQkjgspw4Y&r=-re9rx1mJRcK9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ5mQI3zmNoIKK2RSPoRA7K6XG2byQ&s=tyUL5wxXR4_LzYHZ17KFgq2D4cFF17SsGBBMDetYUvU&e=
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: Topoplot (JR KING)
   2. Re: Topoplot (Alexandre Gramfort)


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

Message: 1
Date: Wed, 21 Feb 2018 16:06:02 -0500
From: JR KING <jeanremi.king at gmail.com>
Subject: Re: [Mne_analysis] Topoplot
To: Discussion and support forum for the users of MNE Software
        <mne_analysis at nmr.mgh.harvard.edu>
Message-ID:
        <CAOcgdciqXQxrqAP5mtJRfjLKyaxAZSL9V-JtaJ3MB6JLo5X_PA at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Jeff,

Could it be that your topos are combined gradiometers (and are thus squared and positive), whereas the time freqs are all sensors?

(By the way, cmap='jet' is not recommended:
https://urldefense.proofpoint.com/v2/url?u=https-3A__jakevdp.github.io_blog_2014_10_16_how-2Dbad-2Dis-2Dyour-2Dcolormap_&d=DwICAg&c=aFamLAsxMIDYjNglYHTMV0iqFn3z4pVFYPQkjgspw4Y&r=-re9rx1mJRcK9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ5mQI3zmNoIKK2RSPoRA7K6XG2byQ&s=NhJvbBAe9Z8p8CPyJqsYky69zPPRFdvSqCzAPdpxbBc&e=)

JR

On 21 February 2018 at 11:32, Stout, Jeffrey <jstout at mcw.edu> wrote:

> MNE group,
>
>
>
> When I plot the time frequency display, I predominantly get beta 
> desynchrony with a strong negative z-score (using power.plot_topo).  
> When I plot that same data using the topomap (power.plot_topomap) and 
> selecting the appropriate frequencies and time latencies the data 
> appears as a positive Z-score.  Is there a sign flip during the 
> topomap plotting and is there a flag to set to prevent the flip?
>
>
>
> Attached are the outputs of the code below.  The data frequencies are 
> 20-25Hz to highlight the difference in plots.  Data is from a Neuromag 
> system  - using the gradiometers only.
>
>
>
> Some code:
>
> freqs = np.logspace(*np.log10([20, 25]), num=20)
>
> n_cycles = freqs / 2.  # different number of cycle per frequency
>
> power_3, itc = tfr_morlet(epochs['3'], freqs=freqs, n_cycles=n_cycles, 
> use_fft=True,
>
>                         return_itc=True, decim=3, n_jobs=-1)
>
> power_2, itc = tfr_morlet(epochs['2'], freqs=freqs, n_cycles=n_cycles, 
> use_fft=True,
>
>                         return_itc=True, decim=3, n_jobs=-1)
>
>
>
> power_minus=copy.copy(power_3)
>
> power_minus._data=power_3._data - power_2._data
>
> ##### TOPOPLOT#######
>
> tf_plot=power_minus.plot_topo(baseline=(-0.5, 0), mode='zscore', 
> title='Average power', vmin=-10, vmax=10, tmin=-.1, tmax=.9, 
> cmap='jet')
>
>
>
> timepoints=[-.1,.1,.3,.5,.7,]
>
> fig, axis = plt.subplots(1, len(timepoints), figsize=(20,3))
>
> for i,laten in enumerate(timepoints):
>
> ####TOPOPLOT MAP######
>
>     power_minus.plot_topomap(ch_type='grad', tmin=laten, 
> tmax=laten+.1, fmin=20, fmax=25,
>
>                        baseline=(-0.5, 0), mode='zscore', 
> axes=axis[i],
>
>                        vmin=-10, vmax=10, show=False, cmap='jet',
> title=str(laten))
>
> mne.viz.tight_layout()
>
> plt.show()
>
>
>
>
>
> Thanks,
>
> Jeff Stout
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harv
> ard.edu_mailman_listinfo_mne-5Fanalysis&d=DwICAg&c=aFamLAsxMIDYjNglYHT
> MV0iqFn3z4pVFYPQkjgspw4Y&r=-re9rx1mJRcK9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ5mQ
> I3zmNoIKK2RSPoRA7K6XG2byQ&s=tyUL5wxXR4_LzYHZ17KFgq2D4cFF17SsGBBMDetYUv
> U&e=
>
>
> 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 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.partners.org_c
> omplianceline&d=DwICAg&c=aFamLAsxMIDYjNglYHTMV0iqFn3z4pVFYPQkjgspw4Y&r
> =-re9rx1mJRcK9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ5mQI3zmNoIKK2RSPoRA7K6XG2byQ&
> s=Oxic2QjVP4RE7ym9AAj-vEKbv-JFuS4Ph8EBapa5XkY&e= . 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: https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.nmr.mgh.harvard.edu_pipermail_mne-5Fanalysis_attachments_20180221_ad12616f_attachment-2D0001.html&d=DwICAg&c=aFamLAsxMIDYjNglYHTMV0iqFn3z4pVFYPQkjgspw4Y&r=-re9rx1mJRcK9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ5mQI3zmNoIKK2RSPoRA7K6XG2byQ&s=fTLLfuuY5X0eDfAUjhNavFickC_bDyItlhIjahaC55g&e=

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

Message: 2
Date: Thu, 22 Feb 2018 08:48:49 +0100
From: Alexandre Gramfort <alexandre.gramfort at inria.fr>
Subject: Re: [Mne_analysis] Topoplot
To: Discussion and support forum for the users of MNE Software
        <mne_analysis at nmr.mgh.harvard.edu>
Message-ID:
        <CADeotZo5UFuE7wP99Z-Ld4gAUza=k+G7KBr9u80S_25TkMKcYw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

yes by taking the RMS of the gradiometers you loose the sign.

I don't know what could be a better way here.

You could display just the planar1 or planar2 setting eg ch_type='planar1'
in plot_topomap

HTH
Alex

On Wed, Feb 21, 2018 at 10:06 PM, JR KING <jeanremi.king at gmail.com> wrote:

> Hi Jeff,
>
> Could it be that your topos are combined gradiometers (and are thus 
> squared and positive), whereas the time freqs are all sensors?
>
> (By the way, cmap='jet' is not recommended: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__jakevdp.github.io
> _&d=DwICAg&c=aFamLAsxMIDYjNglYHTMV0iqFn3z4pVFYPQkjgspw4Y&r=-re9rx1mJRc
> K9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ5mQI3zmNoIKK2RSPoRA7K6XG2byQ&s=GLOITI04ZY
> oxMlVfgIB_e42T_dmDHhPMGRRNoRDSiJo&e=
> blog/2014/10/16/how-bad-is-your-colormap/)
>
> JR
>
> On 21 February 2018 at 11:32, Stout, Jeffrey <jstout at mcw.edu> wrote:
>
>> MNE group,
>>
>>
>>
>> When I plot the time frequency display, I predominantly get beta 
>> desynchrony with a strong negative z-score (using power.plot_topo).  
>> When I plot that same data using the topomap (power.plot_topomap) and 
>> selecting the appropriate frequencies and time latencies the data 
>> appears as a positive Z-score.  Is there a sign flip during the 
>> topomap plotting and is there a flag to set to prevent the flip?
>>
>>
>>
>> Attached are the outputs of the code below.  The data frequencies are 
>> 20-25Hz to highlight the difference in plots.  Data is from a 
>> Neuromag system  - using the gradiometers only.
>>
>>
>>
>> Some code:
>>
>> freqs = np.logspace(*np.log10([20, 25]), num=20)
>>
>> n_cycles = freqs / 2.  # different number of cycle per frequency
>>
>> power_3, itc = tfr_morlet(epochs['3'], freqs=freqs, 
>> n_cycles=n_cycles, use_fft=True,
>>
>>                         return_itc=True, decim=3, n_jobs=-1)
>>
>> power_2, itc = tfr_morlet(epochs['2'], freqs=freqs, 
>> n_cycles=n_cycles, use_fft=True,
>>
>>                         return_itc=True, decim=3, n_jobs=-1)
>>
>>
>>
>> power_minus=copy.copy(power_3)
>>
>> power_minus._data=power_3._data - power_2._data
>>
>> ##### TOPOPLOT#######
>>
>> tf_plot=power_minus.plot_topo(baseline=(-0.5, 0), mode='zscore', 
>> title='Average power', vmin=-10, vmax=10, tmin=-.1, tmax=.9, 
>> cmap='jet')
>>
>>
>>
>> timepoints=[-.1,.1,.3,.5,.7,]
>>
>> fig, axis = plt.subplots(1, len(timepoints), figsize=(20,3))
>>
>> for i,laten in enumerate(timepoints):
>>
>> ####TOPOPLOT MAP######
>>
>>     power_minus.plot_topomap(ch_type='grad', tmin=laten, 
>> tmax=laten+.1, fmin=20, fmax=25,
>>
>>                        baseline=(-0.5, 0), mode='zscore', 
>> axes=axis[i],
>>
>>                        vmin=-10, vmax=10, show=False, cmap='jet',
>> title=str(laten))
>>
>> mne.viz.tight_layout()
>>
>> plt.show()
>>
>>
>>
>>
>>
>> Thanks,
>>
>> Jeff Stout
>>
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.har
>> vard.edu_mailman_listinfo_mne-5Fanalysis&d=DwICAg&c=aFamLAsxMIDYjNglY
>> HTMV0iqFn3z4pVFYPQkjgspw4Y&r=-re9rx1mJRcK9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ
>> 5mQI3zmNoIKK2RSPoRA7K6XG2byQ&s=tyUL5wxXR4_LzYHZ17KFgq2D4cFF17SsGBBMDe
>> tYUvU&e=
>>
>>
>> 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 
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.partners.org_
>> complianceline&d=DwICAg&c=aFamLAsxMIDYjNglYHTMV0iqFn3z4pVFYPQkjgspw4Y
>> &r=-re9rx1mJRcK9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ5mQI3zmNoIKK2RSPoRA7K6XG2b
>> yQ&s=Oxic2QjVP4RE7ym9AAj-vEKbv-JFuS4Ph8EBapa5XkY&e= . 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
> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harv
> ard.edu_mailman_listinfo_mne-5Fanalysis&d=DwICAg&c=aFamLAsxMIDYjNglYHT
> MV0iqFn3z4pVFYPQkjgspw4Y&r=-re9rx1mJRcK9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ5mQ
> I3zmNoIKK2RSPoRA7K6XG2byQ&s=tyUL5wxXR4_LzYHZ17KFgq2D4cFF17SsGBBMDetYUv
> U&e=
>
>
> 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 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.partners.org_c
> omplianceline&d=DwICAg&c=aFamLAsxMIDYjNglYHTMV0iqFn3z4pVFYPQkjgspw4Y&r
> =-re9rx1mJRcK9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ5mQI3zmNoIKK2RSPoRA7K6XG2byQ&
> s=Oxic2QjVP4RE7ym9AAj-vEKbv-JFuS4Ph8EBapa5XkY&e= . 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: https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.nmr.mgh.harvard.edu_pipermail_mne-5Fanalysis_attachments_20180222_fa5d139c_attachment.html&d=DwICAg&c=aFamLAsxMIDYjNglYHTMV0iqFn3z4pVFYPQkjgspw4Y&r=-re9rx1mJRcK9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ5mQI3zmNoIKK2RSPoRA7K6XG2byQ&s=tHmow89msOTWjPpBcVBk62TVqT1mMtYUYTx1FwP26Co&e=

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

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harvard.edu_mailman_listinfo_mne-5Fanalysis&d=DwICAg&c=aFamLAsxMIDYjNglYHTMV0iqFn3z4pVFYPQkjgspw4Y&r=-re9rx1mJRcK9z2vjZt6NQ&m=jSyN4BQBmUCG8DZ5mQI3zmNoIKK2RSPoRA7K6XG2byQ&s=tyUL5wxXR4_LzYHZ17KFgq2D4cFF17SsGBBMDetYUvU&e=

End of Mne_analysis Digest, Vol 121, Issue 36
*********************************************



More information about the Mne_analysis mailing list