From: W. Trevor King Date: Wed, 19 May 2010 09:52:25 +0000 (-0400) Subject: Initialize 'min peaks' from configuration (if required) in convfilt/flatfilt X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3bbc0a5698e41aeaf4cf46c76a2ea8227e0177b6;p=hooke.git Initialize 'min peaks' from configuration (if required) in convfilt/flatfilt --- 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'])