[Mne_analysis] interactive issue on windows
Boris BURLE
boris.burle at univ-amu.fr
Wed Nov 8 08:31:51 EST 2017
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
More information about the Mne_analysis
mailing list