Skip to content

Commit acd7bfd

Browse files
committed
Format docstrings
1 parent dbf015a commit acd7bfd

File tree

1 file changed

+51
-35
lines changed

1 file changed

+51
-35
lines changed

pysteps/motion/lucaskanade.py

Lines changed: 51 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,68 +19,84 @@ def dense_lucaskanade(R, **kwargs):
1919
2020
Parameters
2121
----------
22-
R : array-like, shape (t,m,n)
23-
array containing the input precipitation fields, no missing values are
24-
accepted
22+
R : ndarray_ or MaskedArray, shape (t,m,n)
23+
Input images, sequence of 2D arrays, or 3D arrays.
24+
The first dimension represents the images time dimension.
2525
2626
Other Parameters
2727
----------------
2828
max_corners_ST : int
29-
maximum number of corners to return. If there are more corners than are
30-
found, the strongest of them is returned
29+
Maximum number of corners to return. If there are more corners than are
30+
found, the strongest of them is returned.
31+
3132
quality_level_ST : float
32-
parameter characterizing the minimal accepted quality of image corners.
33-
See original documentation for more details (https://docs.opencv.org)
33+
Parameter characterizing the minimal accepted quality of image corners.
34+
See original documentation for more details (https://docs.opencv.org).
35+
3436
min_distance_ST : int
35-
minimum possible Euclidean distance between the returned corners [px]
37+
minimum possible Euclidean distance between the returned corners [px].
38+
3639
block_size_ST : int
37-
size of an average block for computing a derivative covariation matrix
38-
over each pixel neighborhood
40+
Size of an average block for computing a derivative covariation matrix
41+
over each pixel neighborhood.
42+
3943
winsize_LK : int
40-
size of the search window at each pyramid level.
41-
Small windows (e.g. 10) lead to unrealistic motion
44+
Size of the search window at each pyramid level.
45+
Small windows (e.g. 10) lead to unrealistic motion.
46+
4247
nr_levels_LK : int
4348
0-based maximal pyramid level number.
44-
Not very sensitive parameter
49+
Not very sensitive parameter.
50+
4551
nr_IQR_outlier : int
46-
nr of IQR above median to consider the velocity vector as outlier and discard it
52+
Nr of IQR above median to consider the velocity vector as outlier and
53+
discard it.
54+
4755
size_opening : int
48-
the structuring element size for the filtering of isolated pixels [px]
56+
The structuring element size for the filtering of isolated pixels [px].
57+
4958
decl_grid : int
50-
size of the declustering grid [px]
59+
Size of the declustering grid [px].
60+
5161
min_nr_samples : int
52-
the minimum number of samples for computing the median within given declustering cell
62+
The minimum number of samples for computing the median within given
63+
declustering cell.
64+
5365
function : string
54-
the radial basis function, based on the Euclidian norm d, used in the
66+
The radial basis function, based on the Euclidian norm d, used in the
5567
interpolation of the sparse vectors.
56-
default : inverse
57-
available : nearest, inverse, gaussian
68+
Default : inverse
69+
Available : nearest, inverse, gaussian
70+
5871
k : int or "all"
59-
the number of nearest neighbors used to speed-up the interpolation
60-
If set equal to "all", it employs all the sparse vectors
72+
The number of nearest neighbors used to speed-up the interpolation.
73+
If set equal to "all", it employs all the sparse vectors.
6174
default : 20
75+
6276
epsilon : float
63-
adjustable constant for gaussian or inverse functions
64-
default : median distance between sparse vectors
77+
Adjustable constant for gaussian or inverse functions.
78+
Default : median distance between sparse vectors.
79+
6580
nchunks : int
66-
split the grid points in n chunks to limit the memory usage during the
67-
interpolation
81+
Split the grid points in n chunks to limit the memory usage during the
82+
interpolation.
6883
default : 5
69-
extra_vectors : array-like
70-
additional sparse motion vectors as 2d array (columns: x,y,u,v; rows:
71-
nbr. of vectors) to be integrated with the sparse vectors from the Lucas-Kanade
72-
local tracking.
84+
85+
extra_vectors : ndarray_
86+
Additional sparse motion vectors as 2d array (columns: x,y,u,v; rows:
87+
nbr. of vectors) to be integrated with the sparse vectors from the
88+
Lucas-Kanade local tracking.
7389
x and y must be in pixel coordinates, with (0,0) being the upper-left
74-
corner of the field R. u and v must be in pixel units
90+
corner of the field R. u and v must be in pixel units.
91+
7592
verbose : bool
7693
if set to True, it prints information about the program
7794
7895
Returns
7996
-------
80-
out : ndarray, shape (2,m,n)
81-
three-dimensional array containing the dense x- and y-components of the
82-
motion field. Return an empty UV array when any sparse vectors is left to
83-
be interpolated.
97+
out : ndarray_, shape (2,m,n)
98+
Three-dimensional array containing the dense x- and y-components of the
99+
motion field. Return an empty array when no motion vectors are found.
84100
85101
"""
86102

0 commit comments

Comments
 (0)