[Mne_analysis] plot sensors connectivity error

Martin Luessi mluessi at nmr.mgh.harvard.edu
Fri Apr 19 09:19:52 EDT 2013
Search archives:

Hi Junpeng,

This was a bug, it has been fixed in the meanwhile, see

https://github.com/mne-tools/mne-python/pull/552

Updating your MNE-Python installation to the latest master from github 
will fix it.

Best,

Martin

On 04/19/13 09:09, Junpeng.zhang at gmail.com wrote:
> Hi MNEers,
>
> When I tried to run plot_sensors_connectivity.py
> I got the following error,
>
>
> Computes the Phase Lag Index (PLI) between all gradiometers and shows the
> connectivity in 3D using the helmet geometry. The left visual
> stimulation data
> are used which produces strong connectvitiy in the right occipital sensors.
>
> Opening raw data file
> F:\TDDOWNLOAD\MNE_sample_data\MNE-sample-data-processed\MN
> E-sample-data-python/MEG/sample/sample_audvis_filt-0-40_raw.fif...
>      Read a total of 4 projection items:
>          PCA-v1 (1 x 102)  idle
>          PCA-v2 (1 x 102)  idle
>          PCA-v3 (1 x 102)  idle
>          Average EEG reference (1 x 60)  idle
>      Range : 6450 ... 48149 =     42.956 ...   320.665 secs
> Ready.
> 4 projection items activated
> 73 matching events found
> Connectivity computation...
> Reading 606 ... 711  =      4.036 ...     4.735 secs...
> [done]
> Applying baseline correction ... (mode: mean)
> Reading 1026 ... 1131  =      6.833 ...     7.532 secs...
> [done]
> Applying baseline correction ... (mode: mean)
> Traceback (most recent call last):
>    File "plot_sensor_connectivity.py", line 56, in <module>
>      mt_adaptive=False, n_jobs=2)
>    File
> "D:\Python\lib\site-packages\mne-0.6.git-py2.7.egg\mne\utils.py", line 27
> 9, in dec
>      return function(*args, **kwargs)
>    File
> "D:\Python\lib\site-packages\mne-0.6.git-py2.7.egg\mne\connectivity\spect
> ral.py", line 694, in spectral_connectivity
>      tmax_idx = n_times_in
> UnboundLocalError: local variable 'n_times_in' referenced before assignment
>
>
> Anyone ever encounter the similar error info?
> How to solve it ?
> Thank you in advance.
>
> Best wishes,
> Junpeng
>
>
>
>
> ------------------ Original ------------------
> *From: * "Alexandre Gramfort"<gramfort at nmr.mgh.harvard.edu>;
> *Date: * Thu, Apr 11, 2013 03:33 AM
> *To: * "Vincent Rupp Jr."<vincentruppjr at gmail.com>;
> *Cc: * "mne_analysis"<mne_analysis at nmr.mgh.harvard.edu>;
> *Subject: * Re: [Mne_analysis] saving apply_inverse_epochs returns
>
> hi vincent,
>
>  > Thanks for the response. Does this mean that if I load a left hemisphere
>  > label and save the output of apply_inverse_epochs then the right
> hemisphere
>  > stc will be empty of meaningful data, or will it actually be a right
>  > hemisphere stc for that label?
>
> yes the right stc should be empty of data.
>
> HTH
> Alex
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> 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
> 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
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>


-- 
Martin Luessi, Ph.D.

Research Fellow

Department of Radiology
Athinoula A. Martinos Center for Biomedical Imaging
Massachusetts General Hospital
Harvard Medical School
149 13th Street
Charlestown, MA 02129

Fax: +1 617 726-7422



More information about the Mne_analysis mailing list