smooth_cube¶
-
mcalf.utils.
smooth_cube
(cube, mask, **kwargs)[source]¶ Apply Gaussian smoothing to velocities
Smooth the cube of velocities with a Gaussian kernel, applying weights at boundaries.
- Parameters
cube (ndarray, ndim=3) – Cube of velocities with dimensions [time, row, column].
mask (ndarray, ndim=2) – The mask to apply to the [row, column] at every time. Points that are 0 or false will be removed.
kwargs (optional) – Keyword arguments to pass to gaussian_kern_3d.
- Returns
cube_ – The smoothed cube.
- Return type
ndarray, shape cube