From: W. Trevor King Date: Mon, 14 Jun 2010 15:37:32 +0000 (-0400) Subject: Bring hooke.config and hooke.util.peak doctests up to speed X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=baa5de84ffcae67995736310847e06cd2219709b;p=hooke.git Bring hooke.config and hooke.util.peak doctests up to speed --- diff --git a/hooke/config.py b/hooke/config.py index 5f9e919..6d9cceb 100644 --- a/hooke/config.py +++ b/hooke/config.py @@ -131,10 +131,18 @@ class HookeConfigParser (configparser.SafeConfigParser): >>> c = HookeConfigParser(paths=DEFAULT_PATHS, ... default_settings=DEFAULT_SETTINGS) >>> c.write(sys.stdout) # doctest: +ELLIPSIS - # Control display appearance: colour, ???, etc. - [display] - colour_ext = None - colour_ret = None + # Default environmental conditions in case they are not specified in + # the force curve data. + [conditions] + # Temperature in Kelvin + temperature = 301 + + # Configure loggers, see + # http://docs.python.org/library/logging.html#configuration-file-format + [loggers] + # Hooke only uses the hooke logger, but other included modules may + # also use logging and you can configure their loggers here as well. + keys = root, hooke ... """ def __init__(self, paths=None, default_settings=None, defaults=None, diff --git a/hooke/util/peak.py b/hooke/util/peak.py index 185f04d..137763b 100644 --- a/hooke/util/peak.py +++ b/hooke/util/peak.py @@ -323,12 +323,12 @@ def above_noise(data, side='both', min_deviations=5.0, mean=None, std=None): -------- >>> data = numpy.arange(-3, 4) - >>> above_noise(data, side='both', min_deviations=1.0, mean=0, std=1.0) - array([ True, False, False, False, False, False, True], dtype=bool) - >>> above_noise(data, side='positive', min_deviations=1.0, mean=0, std=1.0) - array([False, False, False, False, False, False, True], dtype=bool) - >>> above_noise(data, side='negative', min_deviations=1.0, mean=0, std=1.0) - array([ True, False, False, False, False, False, False], dtype=bool) + >>> above_noise(data, side='both', min_deviations=1.1, mean=0, std=1.0) + array([ True, True, False, False, False, True, True], dtype=bool) + >>> above_noise(data, side='positive', min_deviations=1.1, mean=0, std=1.0) + array([False, False, False, False, False, True, True], dtype=bool) + >>> above_noise(data, side='negative', min_deviations=1.1, mean=0, std=1.0) + array([ True, True, False, False, False, False, False], dtype=bool) """ if mean == None: mean = data.mean()