From 3bbc0a5698e41aeaf4cf46c76a2ea8227e0177b6 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 19 May 2010 05:52:25 -0400 Subject: [PATCH] Initialize 'min peaks' from configuration (if required) in convfilt/flatfilt --- hooke/plugin/convfilt.py | 2 ++ hooke/plugin/flatfilt.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hooke/plugin/convfilt.py b/hooke/plugin/convfilt.py index b85348a..7ca9861 100644 --- a/hooke/plugin/convfilt.py +++ b/hooke/plugin/convfilt.py @@ -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'] diff --git a/hooke/plugin/flatfilt.py b/hooke/plugin/flatfilt.py index ca9b1b8..6637eb8 100644 --- a/hooke/plugin/flatfilt.py +++ b/hooke/plugin/flatfilt.py @@ -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']) -- 2.26.2