From 37f36cd98b51a9b7776660e263f768643c1bae43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jostein=20B=C3=B8=20Fl=C3=B8ystad?= Date: Mon, 8 Jul 2013 12:55:02 +0200 Subject: [PATCH] unwrap: Add docstring. --- skimage/exposure/unwrap.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/skimage/exposure/unwrap.py b/skimage/exposure/unwrap.py index 8a0b8970..d208e0ce 100644 --- a/skimage/exposure/unwrap.py +++ b/skimage/exposure/unwrap.py @@ -10,12 +10,29 @@ def unwrap(image, wrap_around=False): Parameters ---------- - image : 2D or 3D ndarray, optionally a masked array + image : 2D or 3D ndarray of floats, optionally a masked array + The values should be in the range ``[-pi, pi)``. If a masked array is + provided, the masked entries will not be changed, and their values + will not be used to guide the unwrapping of neighboring, unmasked + values. wrap_around : bool or sequence of bool + When an element of the sequence is ``True``, the unwrapping process + will regard the edges along the corresponding axis of the image to be + connected and use this connectivity to guide the phase unwrapping + process. If only a single boolean is given, it will apply to all axes. Returns ------- - image_unwrapped : array_like + image_unwrapped : array_like, float32 + Unwrapped image of the same shape as the input. If the input ``image`` + was a masked array, the mask will be preserved. + + References + ---------- + - Miguel Arevallilo Herraez, David R. Burton, Michael J. Lalor, + and Munther A. Gdeisat, "Fast two-dimensional phase-unwrapping + algorithm based on sorting by reliability following a noncontinuous + path", Journal Applied Optics, Vol. 41, No. 35, pp. 7437, 2002 ''' image = np.require(image, np.float32, ['C']) if image.ndim not in (2, 3):