Initialize 'min peaks' from configuration (if required) in convfilt/flatfilt
authorW. Trevor King <wking@drexel.edu>
Wed, 19 May 2010 09:52:25 +0000 (05:52 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 19 May 2010 09:52:25 +0000 (05:52 -0400)
hooke/plugin/convfilt.py
hooke/plugin/flatfilt.py

index b85348a6feae57a679a2e41de7980a45b6f2e290..7ca9861191f9ffc3acd3910fb4aa37cee82d9a23 100644 (file)
@@ -216,4 +216,6 @@ class ConvolutionFilterCommand (FilterCommand):
         ret = outq.get()
         if not isinstance(ret, Success):
             raise ret
+        if params['min peaks'] == None: # Use configured default value.
+            params['min peaks'] = self.plugin.config['min peaks']
         return len(peaks) >= params['min peaks']
index ca9b1b89e8cc5ef761a6476b05877486f6999e0e..6637eb81f7ec37d8e3a81cf0b0e8786d97d6fc40 100644 (file)
@@ -208,4 +208,6 @@ class FlatFilterCommand (FilterCommand):
         ret = outq.get()
         if not isinstance(ret, Success):
             raise ret
+        if params['min peaks'] == None: # Use configured default value.
+            params['min peaks'] = self.plugin.config['min peaks']
         return len(peaks) >= int(params['min peaks'])