From 2f62cf9d2e9ad06f9139e8cbf66a1256f964bdab Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Wed, 11 Mar 2015 00:41:50 +1100 Subject: [PATCH 1/2] Clarify 'low-contrast' in docstring --- skimage/exposure/exposure.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/skimage/exposure/exposure.py b/skimage/exposure/exposure.py index dc2faebd..a0787294 100644 --- a/skimage/exposure/exposure.py +++ b/skimage/exposure/exposure.py @@ -475,7 +475,9 @@ def is_low_contrast(image, fraction_threshold=0.05, lower_percentile=1, image : array-like The image under test. fraction_threshold : float, optional - The low contrast fraction threshold. + The low contrast fraction threshold. An image is considered low- + contrast when its range of brightness spans less than this + fraction of its data type's full range. [1]_ lower_bound : float, optional Disregard values below this percentile when computing image contrast. upper_bound : float, optional @@ -499,6 +501,10 @@ def is_low_contrast(image, fraction_threshold=0.05, lower_percentile=1, True >>> is_low_contrast(image, upper_percentile=100) False + + See Also + -------- + .. [1] http://scikit-image.org/docs/dev/user_guide/data_types.html """ image = np.asanyarray(image) if image.ndim == 3 and image.shape[2] in [3, 4]: From 0d3d5f13198bad704d763bdf07b09f6f8aa11419 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Wed, 11 Mar 2015 09:33:17 +1100 Subject: [PATCH 2/2] Update See Also to References "See Also" is apparently reserved by sphinx-numpydoc for pointers to other code functions, rather than documentation. --- skimage/exposure/exposure.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skimage/exposure/exposure.py b/skimage/exposure/exposure.py index a0787294..0cad7bbe 100644 --- a/skimage/exposure/exposure.py +++ b/skimage/exposure/exposure.py @@ -491,6 +491,10 @@ def is_low_contrast(image, fraction_threshold=0.05, lower_percentile=1, out : bool True when the image is determined to be low contrast. + References + ---------- + .. [1] http://scikit-image.org/docs/dev/user_guide/data_types.html + Examples -------- >>> image = np.linspace(0, 0.04, 100) @@ -501,10 +505,6 @@ def is_low_contrast(image, fraction_threshold=0.05, lower_percentile=1, True >>> is_low_contrast(image, upper_percentile=100) False - - See Also - -------- - .. [1] http://scikit-image.org/docs/dev/user_guide/data_types.html """ image = np.asanyarray(image) if image.ndim == 3 and image.shape[2] in [3, 4]: