pysteps.utils¶
Implementation of miscellaneous utility functions.
pysteps.utils.interface¶
Interface for the utils module.
get_method (name, \*\*kwargs) |
Return a callable function for the utility method corresponding to the given name. |
pysteps.utils.arrays¶
Utility methods for creating and processing arrays.
compute_centred_coord_array (M, N) |
Compute a 2D coordinate array, where the origin is at the center. |
pysteps.utils.cleansing¶
Data cleansing routines for pysteps.
decluster (coord, input_array, scale[, …]) |
Decluster a set of sparse data points by aggregating, that is, taking the median value of all values lying within a certain distance (i.e., a cluster). |
detect_outliers (input_array, thr[, coord, …]) |
Detect outliers in a (multivariate and georeferenced) dataset. |
pysteps.utils.conversion¶
Methods for converting physical units.
to_rainrate (R, metadata[, zr_a, zr_b]) |
Convert to rain rate [mm/h]. |
to_raindepth (R, metadata[, zr_a, zr_b]) |
Convert to rain depth [mm]. |
to_reflectivity (R, metadata[, zr_a, zr_b]) |
Convert to reflectivity [dBZ]. |
pysteps.utils.dimension¶
Functions to manipulate array dimensions.
aggregate_fields (data, window_size[, axis, …]) |
Aggregate fields along a given direction. |
aggregate_fields_time (R, metadata, …[, …]) |
Aggregate fields in time. |
aggregate_fields_space (R, metadata, space_window) |
Upscale fields in space. |
clip_domain (R, metadata[, extent]) |
Clip the field domain by geographical coordinates. |
square_domain (R, metadata[, method, inverse]) |
Either pad or crop a field to obtain a square domain. |
pysteps.utils.fft¶
Interface module for different FFT methods.
get_numpy (shape[, fftn_shape]) |
|
get_scipy (shape[, fftn_shape]) |
|
get_pyfftw (shape[, fftn_shape, n_threads]) |
pysteps.utils.images¶
Image processing routines for pysteps.
blob_detection (input_image[, method, …]) |
Interface to the `feature.blob_*`_ methods implemented in scikit-image. |
shitomasi_detection (input_image[, …]) |
Interface to the OpenCV Shi-Tomasi features detection method to detect corners in an image. |
morph_opening (input_image, thr, n) |
Filter out small scale noise on the image by applying a binary morphological opening, that is, erosion followed by dilation. |
pysteps.utils.interpolate¶
Interpolation routines for pysteps.
rbfinterp2d (coord, input_array, xgrid, ygrid) |
Fast 2-D grid interpolation of a sparse (multivariate) array using a radial basis function. |
pysteps.utils.spectral¶
Utility methods for processing and analyzing precipitation fields in the Fourier domain.
corrcoef (X, Y, shape[, use_full_fft]) |
Compute the correlation coefficient between two-dimensional arrays in the spectral domain. |
mean (X, shape) |
Compute the mean value of a two-dimensional array in the spectral domain. |
rapsd (Z[, fft_method, return_freq, d, normalize]) |
Compute radially averaged power spectral density (RAPSD) from the given 2D input field. |
remove_rain_norain_discontinuity (R) |
Function to remove the rain/no-rain discontinuity. |
std (X, shape[, use_full_fft]) |
Compute the standard deviation of a two-dimensional array in the spectral domain. |
pysteps.utils.tapering¶
Implementations of window functions for computing of the FFT.
compute_mask_window_function (mask, func, …) |
Compute window function for a two-dimensional area defined by a non-rectangular mask. |
compute_window_function (m, n, func, \*\*kwargs) |
Compute window function for a two-dimensional rectangular region. |
pysteps.utils.transformation¶
Methods for transforming data values.
boxcox_transform (R[, metadata, Lambda, …]) |
The one-parameter Box-Cox transformation. |
dB_transform (R[, metadata, threshold, …]) |
Methods to transform precipitation intensities to/from dB units. |
NQ_transform (R[, metadata, inverse]) |
The normal quantile transformation as in Bogner et al (2012). |
sqrt_transform (R[, metadata, inverse]) |
Square-root transform. |