# Path: apasvo/_version.py

# 
# Path: apasvo/_version.py

# 
# Path: apasvo/gui/models/eventcommands.py
# class AppendEvent(QtGui.QUndoCommand):
# class DeleteEvents(QtGui.QUndoCommand):
# class EditEvent(QtGui.QUndoCommand):
# class ClearEventList(QtGui.QUndoCommand):
# class SortEventList(QtGui.QUndoCommand):
# class DetectEvents(QtGui.QUndoCommand):
# class DetectStreamEvents(QtGui.QUndoCommand):
# class OpenStream(QtGui.QUndoCommand):
# class CloseTraces(QtGui.QUndoCommand):
#     def __init__(self, model, event):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, row_list):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, event, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, key, order):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, alg, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, trace_selector_widget, alg, trace_list=None, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, main_window, stream):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, main_window, trace_idx_list):
#     def undo(self):
#     def redo(self):
#     def id(self):


from PySide import QtCore
from apasvo._version import _application_name
from apasvo._version import _organization
from apasvo.gui.models import eventcommands as commands
import traceback
import sys
                               takanami_margin=takanami_margin)
        except Exception, e:
            self.error.emit(str(e), traceback.format_exc())
        finally:
            self.finished.emit()

    def abort(self):
        pass


class PickingStreamTask(QtCore.QObject):
    """A class to handle an event picking/detection task.

    PickingTask objects are meant to be passed to a QThread instance
    that controls their execution.

    """

    finished = QtCore.Signal()
    error = QtCore.Signal(str, str)

    def __init__(self, trace_selector_widget, alg, trace_list=None, threshold=None):
        super(PickingStreamTask, self).__init__()
        self.trace_selector = trace_selector_widget
        self.alg = alg
        self.trace_list = self.trace_selector.stream.traces if trace_list is None else trace_list
        self.threshold = threshold

    def run(self):
        try:

# Path: apasvo/_version.py

# 
# Path: apasvo/_version.py

# 
# Path: apasvo/gui/models/eventcommands.py
# class AppendEvent(QtGui.QUndoCommand):
# class DeleteEvents(QtGui.QUndoCommand):
# class EditEvent(QtGui.QUndoCommand):
# class ClearEventList(QtGui.QUndoCommand):
# class SortEventList(QtGui.QUndoCommand):
# class DetectEvents(QtGui.QUndoCommand):
# class DetectStreamEvents(QtGui.QUndoCommand):
# class OpenStream(QtGui.QUndoCommand):
# class CloseTraces(QtGui.QUndoCommand):
#     def __init__(self, model, event):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, row_list):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, event, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, key, order):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, model, alg, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, trace_selector_widget, alg, trace_list=None, **kwargs):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, main_window, stream):
#     def undo(self):
#     def redo(self):
#     def id(self):
#     def __init__(self, main_window, trace_idx_list):
#     def undo(self):
#     def redo(self):
#     def id(self):


# Path: apasvo/gui/models/pickingtask.py
from PySide import QtCore
from apasvo._version import _application_name
from apasvo._version import _organization
from apasvo.gui.models import eventcommands as commands
import traceback
import sys

                               takanami_margin=takanami_margin)
        except Exception, e:
            self.error.emit(str(e), traceback.format_exc())
        finally:
            self.finished.emit()

    def abort(self):
        pass


class PickingStreamTask(QtCore.QObject):
    """A class to handle an event picking/detection task.

    PickingTask objects are meant to be passed to a QThread instance
    that controls their execution.

    """

    finished = QtCore.Signal()
    error = QtCore.Signal(str, str)

    def __init__(self, trace_selector_widget, alg, trace_list=None, threshold=None):
        super(PickingStreamTask, self).__init__()
        self.trace_selector = trace_selector_widget
        self.alg = alg
        self.trace_list = self.trace_selector.stream.traces if trace_list is None else trace_list
        self.threshold = threshold

    def run(self):
        try:

            settings = QtCore.QSettings(_organization, _application_name)