[Mne_analysis] interactive issue on windows
Brunner, Clemens (clemens.brunner@uni-graz.at)
clemens.brunner at uni-graz.at
Wed Nov 8 08:49:52 EST 2017
Hi Boris!
Have you tried enabling interactive matplotlib mode with
%matplotlib
?
Clemens
> On Nov 8, 2017, at 14:31, Boris BURLE <boris.burle at univ-amu.fr> wrote:
>
> Dear list,
>
>
> I have a code that works perfectly on Linux but creates issues on
> Windows©, where I loose interactivity.
>
> here is (the relevant part of) the incriminated code:
>
> [...]
>
> epochs_eog =
> mne.preprocessing.create_eog_epochs(raw,ch_name='EOGV',baseline=(-.5,-.2),reject=None)
>
> epochs_eog.plot()
> #print("Checking EOG detection...")
>
> if float(sys.version[0]) < 3:
> x = raw_input("press Enter to continue: ")
> else:
> x = input("press Enter to continue: ")
>
> print("Computing the EOG projector...")
> # estimating the eog projector on pure EOG
> projs = mne.compute_proj_epochs(epochs_eog, n_eeg=1, \
> n_grad=0, n_mag=0, desc_prefix=None)
>
> print("Plotting the EOG projector...")
> # plotting the eog projector
> # to get the EEG layout
> lt = mne.channels.find_layout(raw.info)
> mne.viz.plot_projs_topomap(projs,layout=lt)
> if float(sys.version[0]) < 3:
> x = raw_input("Accept? [Y/N]: ")
> else:
> x = input("Accept? [Y/N]: ")
> [...]
>
> Basically, it's estimating blinks artifact epochs and show them. Then
> the user can visualize the blinks and reject the epochs that are not
> blinks (or noisy ones etc...). Once this is finished, by closing the
> window that showed the epochs, the user is facing a prompt in Ipython
> (with a test of python version currently being ran), and after pressing
> "Enter", one computes the projector and shows its topography. The user
> can then decide to accept the projector or not and the scripts goes on.
>
> When running this script in Ipython, it runs smoothly on my linux
> machine. But on Windows© (tested on two different machine, and two
> different versions), the behavior is not the intended one: when the
> blink epochs are shown, the window is "not responding" and the user
> cannot interact with it (hence can not reject the non-blink epochs). The
> windows becomes interactive back once the "Enter" key is pressed at the
> ipython prompt. But then, obviously, the scripts keeps on running and
> computed the projector on all epochs, including the non cleaned ones...
>
> Has anyone experience a similar issue? Is it a Ipython issue? Is it
> blocking matplotlib figures from being interactive by default? Should we
> run with some specific options (and if so, how can this be done on
> Windows©?).
>
> Thanks a lot in advance for your help !!
>
> Boris
>
>
> _______________________________________________
> 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.
More information about the Mne_analysis
mailing list