You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lazily generate a multiscale representation of an array
20
+
Generate a lazy, coordinate-aware multiscale representation of an array.
23
21
24
22
Parameters
25
23
----------
26
-
array: ndarray to be downscaled.
24
+
array : numpy array, dask array, or xarray DataArray
25
+
The array to be downscaled
26
+
27
+
reduction : callable
28
+
A function that aggregates chunks of data over windows. See the documentation of `dask.array.coarsen` for the expected
29
+
signature of this callable.
27
30
28
-
reduction: a function that aggregates data over windows.
31
+
scale_factors : iterable of ints
32
+
The desired downscaling factors, one for each axis.
29
33
30
-
scale_factors: an iterable of integers that specifies how much to downscale each axis of the array.
34
+
pad_mode : string or None, default=None
35
+
How arrays should be padded prior to downscaling in order to ensure that each array dimension
36
+
is evenly divisible by the respective scale factor. When set to `None` (default), the input will be sliced before downscaling
37
+
if its dimensions are not divisible by `scale_factors`.
31
38
32
-
pad_mode: How (or if) the input should be padded. When set to `None` the input will be trimmed as needed.
39
+
preserve_dtype : bool, default=True
40
+
Determines whether the multiresolution arrays are all cast to the same dtype as the input.
33
41
34
-
preserve_dtype: boolean, defaults to True, determines whether lower levels of the pyramid are coerced to the same dtype as the input. This assumes that
35
-
the reduction function accepts a "dtype" kwarg, e.g. numpy.mean(x, dtype='int').
42
+
chunks : sequence or dict of ints, or None, default=None.
43
+
If `chunks` is supplied, all output arrays are returned with this chunking. If not None, this
44
+
argument is passed directly to the `xarray.DataArray.chunk` method of each output array.
36
45
37
-
chunks: Sequence or Dict of ints, defaults to None. If `chunks` is supplied, all DataArrays are rechunked with these chunks before being returned.
46
+
chained : bool, default=True
47
+
If True (default), the nth downscaled array is generated by applying the reduction function on the n-1th
48
+
downscaled array with the user-supplied `scale_factors`. This means that the nth downscaled array directly depends on the n-1th
49
+
downscaled array. Note that nonlinear reductions like the windowed mode may give inaccurate results with `chained` set to True.
38
50
39
-
recursive: boolean, defaults to False. ToDo
51
+
If False, the nth downscaled array is generated by applying the reduction function on the 0th downscaled array
52
+
(i.e., the input array) with the `scale_factors` raised to the nth power. This means that the nth downscaled array directly
53
+
depends on the input array.
40
54
41
-
Returns a list of DataArrays, one per level of downscaling. These DataArrays have `coords` properties that track the changing offset (if any)
42
-
induced by the downsampling operation. Additionally, the scale factors are stored each DataArray's attrs propery under the key `scale_factors`
55
+
Returns
43
56
-------
57
+
result : list of DataArrays
58
+
The `coords` attribute of these DataArrays properties that track the changing offset (if any)
59
+
induced by the downsampling operation. Additionally, the scale factors are stored each DataArray's attrs propery under the key `scale_factors`
0 commit comments