fig = ica.plot_scores(scores, exclude=eog_inds)
file_end= 'scores.png'
filename = directory+subjects[s]+sessions[x]+file_end
plt.savefig(filename)
print 1
plt.close(fig)
print 2
fig=ica.plot_sources(epochs_bp,eog_inds)
file_end = 'sources.png'
filename = directory+subjects[s]+sessions[x]+file_end
plt.savefig(filename)
print 3
plt.close(fig)
print 4
#del fig
fig=ica.plot_components(eog_inds, colorbar=True)
file_end = 'components.png'
filename = directory+subjects[s]+sessions[x]+file_end
plt.savefig(filename)
print 5
plt.close(fig)
print 6
#del fig
ica.exclude += eog_inds[:1]
eog_evoked = eog_epochs.average()
fig=ica.plot_sources(eog_evoked)
file_end='reconstructed_latent_sources.png'
filename = directory+subjects[s]+sessions[x]+file_end
plt.savefig(filename)
print 7
plt.close(fig)
print 8
#del fig
fig=ica.plot_overlay(eog_evoked)
file_end='signal_before_and_after_ica.png'
filename = directory+subjects[s]+sessions[x]+file_end
plt.savefig(filename)
print 9
plt.close(fig)
print 10
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140816/092c0c63/attachment.html