pysteps.utils.transformation.boxcox_transform

pysteps.utils.transformation.boxcox_transform(R, metadata=None, Lambda=None, threshold=None, zerovalue=None, inverse=False)

The one-parameter Box-Cox transformation. Default parameters will produce a log transform (i.e. Lambda=0).

Parameters:
R : array-like

Array of any shape to be transformed.

metadata : dict

Metadata dictionary containing the transform, zerovalue and threshold attributes as described in the documentation of pysteps.io.importers.

Lambda : float

Parameter lambda of the Box-Cox transformation. Default : 0

threshold : float

Optional value that is used for thresholding with the same units as R. If None, the threshold contained in metadata is used.

zerovalue : float

Optional value to be assigned to no rain pixels as defined by the threshold.

inverse : bool

Optional, if set to True, it performs the inverse transform

Returns:
R : array-like

Array of any shape containing the (back-)transformed units.

metadata : dict

The metadata with updated attributes.