Ran update-copyright.py
[hooke.git] / hooke / plugin / convfilt.py
index ff9e68c6307add81ad6b914581551b0d22da621a..2146d26702ccb00d02fdeb07003ee9f5b05a5af5 100644 (file)
@@ -1,25 +1,21 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2008-2010 Alberto Gomez-Casado
-#                         Fabrizio Benedetti
-#                         Massimo Sandal <devicerandom@gmail.com>
-#                         W. Trevor King <wking@drexel.edu>
+# Copyright (C) 2010-2012 W. Trevor King <wking@tremily.us>
 #
 # This file is part of Hooke.
 #
-# Hooke is free software: you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
+# Hooke is free software: you can redistribute it and/or modify it under the
+# terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
 #
-# Hooke is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
-# Public License for more details.
+# Hooke is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
+# details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with Hooke.  If not, see
-# <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public License
+# along with Hooke.  If not, see <http://www.gnu.org/licenses/>.
 
 """The ``convfilt`` module provides :class:`ConvFiltPlugin` and
 for convolution-based filtering of :mod:`hooke.curve.Curve`\s.
@@ -40,7 +36,6 @@ import numpy
 
 from ..command import Command, Argument, Success, Failure
 from ..config import Setting
-from ..experiment import VelocityClamp
 from ..util.fit import PoorFit
 from ..util.peak import find_peaks, find_peaks_arguments, Peak, _kwargs
 from . import Plugin, argument_to_setting
@@ -149,9 +144,6 @@ class ConvolutionPeaksCommand (Command):
         deflection arrays.
         """
         curve = params['curve']
-        if curve.info['experiment'] != VelocityClamp:
-            raise Failure('%s operates on VelocityClamp experiments, not %s'
-                          % (self.name, curve.info['experiment']))
         data = None
         for block in curve.data:
             if block.info['name'].startswith('retract'):
@@ -204,8 +196,7 @@ class ConvolutionFilterCommand (FilterCommand):
         params['curve'] = curve
         inq = Queue()
         outq = Queue()
-        conv_command = [c for c in self.hooke.commands
-                        if c.name=='convolution peaks'][0]
+        conv_command = self.hooke.command_by_name['convolution peaks']
         conv_command.run(hooke, inq, outq, **params)
         peaks = outq.get()
         if isinstance(peaks, UncaughtException) \