예제 #1
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

#eegpy-modules
try:
    import eegpy
    from eegpy.misc import FATALERROR
    from eegpy.filter.freqfilt import filtfilt, butter
    from eegpy.ui.widgets.iowidgets import VarChooser
    from eegpy.ui.icon import image_from_eegpy_stock, eegpy_logo
    from eegpy.ui.widgets.dialogwidgets import show_info_dialog
except ImportError:
    raise FATALERROR(
        'Your installation of EegPy seems to be incomplete.\nMaybe you need to set the PYTHONPATH environment-variable adequatly.'
    )

try:
    import pygtk
    pygtk.require('2.0')
    import gobject
    import gtk
except ImportError:
    raise FATALERROR('GTK cannot be imported.')

try:
    from matplotlib.axes import Subplot
    # uncomment to select /GTK/GTKAgg/GTKCairo
    from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
    from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as NavigationToolbar
    import matplotlib
    #from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg, NavigationToolbar
예제 #2
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""This module is supposed to provide sophisticated possibilites to use distributed computing 
for the analysis of large eeg-files like in epilepsy-research. 
It's meant to work in a decentralized way, every user can start jobs and use the power of the cluster"""

import eegpy
from eegpy.misc import FATALERROR, debug
import eegpy.analysis.phases
from eegpy.formats.open_eeg import open_eeg

try:
    import numpy as n
except ImportError:
    raise FATALERROR('SciPy or NumPy not found!\nPlease visit www.scipy.org or numeric.scipy.org for more information.')

from SimpleXMLRPCServer import SimpleXMLRPCServer
import xmlrpclib
import pickle
import socket
from sys import stdout

import Pyro.core
import Pyro.errors

#import BaseHTTPServer
#import httpserver
#from pyftpdlib import ftpserver
from threading import Thread, Lock 
import os, os.path, time
예제 #3
0
# -*- coding: utf-8 -*-

#################
# Module-Import #
#################

#eegpy-modules
try:
    import eegpy
    from eegpy.events import EventTable
    from eegpy.misc import FATALERROR
    from eegpy.ui.widgets.windowwidgets import EegpyBaseWin
    from eegpy.ui.icon import image_from_eegpy_stock, eegpy_logo
except ImportError:
    raise FATALERROR(
        'Your installation of EegPy seems to be incomplete.\nMaybe you need to set the PYTHONPATH environment-variable adequatly.'
    )

#from eegpy.filter.filt_misc import filterRecursively

#Third-party
try:
    import numpy
    from scipy.signal import lfilter, butter
except ImportError:
    raise FATALERROR(
        'SciPy or NumPy not found!\nPlease visit www.scipy.org or numeric.scipy.org for more information.'
    )

try:
    import pygtk
예제 #4
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

#eegpy-modules
try:
    import eegpy
    from eegpy.misc import FATALERROR
    from eegpy.filter.freqfilt import filtfilt, butter
    from eegpy.ui.widgets.iowidgets import VarChooser
    from eegpy.ui.icon import eegpy_logo
except ImportError:
    raise FATALERROR(
        'Your installation of EegPy seems to be incomplete.\nMaybe you need to set the PYTHONPATH environment-variable adequatly.'
    )

try:
    import pygtk
    pygtk.require('2.0')
    import gobject
    import gtk
except ImportError:
    raise FATALERROR('GTK cannot be imported.')

import sys


class EegpyInfoDialog(gtk.Dialog):
    """A dialog to show some short infos"""
    def __init__(self, title="eegpy - information", text=""):
        gtk.Dialog.__init__(self, title, None,
                            gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
예제 #5
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import eegpy
from eegpy.misc import FATALERROR

#Third-party
try:
    import numpy
except ImportError:
    raise FATALERROR('SciPy or NumPy not found!\nPlease visit www.scipy.org or numeric.scipy.org for more information.')

try:
    import pygtk
    pygtk.require('2.0')
    import gobject
    import gtk
except ImportError:
    raise FATALERROR('GTK cannot be imported.')

try:
    from matplotlib.axes import Subplot
    # uncomment to select /GTK/GTKAgg/GTKCairo
    from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
    from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as NavigationToolbar
    import matplotlib
    #from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg, NavigationToolbar
    from matplotlib.figure import Figure, SubplotParams
    from matplotlib.axis import Axis
    import matplotlib.cm
except ImportError:
예제 #6
0
__docformat__ = "restructuredtext en"

#################
# Module-Import #
#################

#eegpy-modules
import eegpy
from eegpy.misc import FATALERROR, debug

#Third-party
try:
    import numpy as N
    from scipy.signal import detrend
except ImportError:
    raise FATALERROR('SciPy or NumPy not found!\nPlease visit www.scipy.org or numeric.scipy.org for more information.')

try:
    import pylab as P
except ImportError:
    raise FATALERROR('Pylab not found.\nPlease visit matplotlib.sf.net for further information')

def plot_eeg_segment(data,channel_names,xs=None,offset=100,do_detrend=False,ax=P,*args,**kwargs):
    """Plots single segment of eeg data
    """
    if do_detrend:
        data = detrend(data,axis=0,type="constant")
    plotdata = N.zeros(data.shape,"d")
    for d in range(data.shape[1]):
        plotdata[:,d] = data[:,d]-d*offset 
    if xs==None:
예제 #7
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import eegpy
from eegpy.misc import FATALERROR
#from eegpy.filter.filt_misc import filterRecursively

#################
# Module-Import #
#################

try:
    import numpy as n
except ImportError:
    raise FATALERROR(
        'SciPy or NumPy not found!\nPlease visit www.scipy.org or numeric.scipy.org for more information.'
    )

try:
    import mdp
except ImportError:
    raise FATALERROR(
        'Modular Toolkit for Dataprocessing in Python not found!\nPlease visit mdp.sf.net for more information.'
    )

########################
# Function definitions #
########################


class ICAnalyzer():