[Mne_analysis] interactive issue on windows

Boris BURLE boris.burle at univ-amu.fr
Wed Nov 8 08:31:51 EST 2017
Search archives:

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 = 

     #print("Checking EOG detection...")

     if float(sys.version[0]) < 3:
         x = raw_input("press Enter to continue: ")
         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)
     if float(sys.version[0]) < 3:
         x = raw_input("Accept? [Y/N]: ")
         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 

     Thanks a lot in advance for your help !!


More information about the Mne_analysis mailing list