import numpy
-from ..command import Command, Argument, Failure
+from ..command import Command, Argument, Success, Failure
from ..config import Setting
from ..experiment import VelocityClamp
from ..plugin import Plugin, argument_to_setting
if c.name=='convolution peaks'][0]
conv_command.run(hooke, inq, outq, **params)
peaks = outq.get()
- if not isinstance(peaks[0], Peak):
+ if not (isinstance(peaks, list) and (len(peaks) == 0
+ or isinstance(peaks[0], Peak))):
raise Failure('Expected a list of Peaks, not %s' % peaks)
ret = outq.get()
if not isinstance(ret, Success):
from numpy import diff
from scipy.signal.signaltools import medfilt
-from ..command import Command, Argument, Failure
+from ..command import Command, Argument, Success, Failure
from ..config import Setting
from ..experiment import VelocityClamp
from ..plugin import Plugin, argument_to_setting
if c.name=='flat filter peaks'][0]
conv_command.run(hooke, inq, outq, **params)
peaks = outq.get()
- if not isinstance(peaks[0], Peak):
+ if not (isinstance(peaks, list) and (len(peaks) == 0
+ or isinstance(peaks[0], Peak))):
raise Failure('Expected a list of Peaks, not %s' % peaks)
ret = outq.get()
if not isinstance(ret, Success):