From e7e3f6dcef57b69bae631e455c5f8b857b0589a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Wed, 12 Jun 2024 08:06:05 -0400 Subject: [PATCH 1/2] DOC: Remove optional parameter values from docstring Remove optional parameter values from docstring: reduce duplicates and maintenance burden: default values are already visible in the method signature. --- src/eddymotion/data/filtering.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/eddymotion/data/filtering.py b/src/eddymotion/data/filtering.py index 6b319cb6..9c9ee3ef 100644 --- a/src/eddymotion/data/filtering.py +++ b/src/eddymotion/data/filtering.py @@ -53,18 +53,18 @@ def advanced_clip( ---------- data : :obj:`~numpy.ndarray` The input n-dimensional data array. - p_min : :obj:`float`, optional (default=35) + p_min : :obj:`float`, optional The lower percentile threshold for clipping. Values below this percentile are set to the threshold value. - p_max : :obj:`float`, optional (default=99.98) + p_max : :obj:`float`, optional The upper percentile threshold for clipping. Values above this percentile are set to the threshold value. - nonnegative : :obj:`bool`, optional (default=``True``) + nonnegative : :obj:`bool`, optional If True, only consider non-negative values when calculating thresholds. dtype : :obj:`str` or :obj:`~numpy.dtype`, optional The desired data type for the output array. Supported types are "uint8" and "int16". - invert : :obj:`bool`, optional (default=``False``) + invert : :obj:`bool`, optional If True, inverts the intensity values after scaling (1.0 - data). Returns From a1957dca858cab7b87abfbc53704f615b6eeaabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Wed, 12 Jun 2024 08:09:22 -0400 Subject: [PATCH 2/2] DOC: Use highlighting syntax for parameters and values Use highlighting syntax for parameters and values in docstring. --- src/eddymotion/data/filtering.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eddymotion/data/filtering.py b/src/eddymotion/data/filtering.py index 9c9ee3ef..0f14604a 100644 --- a/src/eddymotion/data/filtering.py +++ b/src/eddymotion/data/filtering.py @@ -65,7 +65,7 @@ def advanced_clip( The desired data type for the output array. Supported types are "uint8" and "int16". invert : :obj:`bool`, optional - If True, inverts the intensity values after scaling (1.0 - data). + If ``True``, inverts the intensity values after scaling (1.0 - ``data``). Returns -------