def recompose_cascade(combined_cascade, combined_mean, combined_sigma):
    """Recompose the cascades into a transformed rain rate field.


    Parameters
    ----------
    combined_cascade : array-like
      An array of shape [scale_level, y, x]
      containing per scale level (cascade) the weighted combination of
      cascades from multiple components (NWP, nowcasts and noise) to be used
      in STEPS blending.
    combined_mean : array-like
      An array of shape [scale_level, ...]
      similar to combined_cascade, but containing the normalization parameter
      mean.
    combined_sigma : array-like
      An array of shape [scale_level, ...]
      similar to combined_cascade, but containing the normalization parameter
      standard deviation.

    Returns
    -------
    out: array-like
        A two-dimensional array containing the recomposed cascade.

    """
    # Renormalize with the blended sigma and mean values
    renorm = (
        combined_cascade * combined_sigma.reshape(combined_cascade.shape[0], 1, 1)
    ) + combined_mean.reshape(combined_mean.shape[0], 1, 1)
    # print(renorm.shape)
    out = np.sum(renorm, axis=0)
    # print(out.shape)
    return out
Recompose the cascades into a transformed rain rate field.


Parameters
----------
combined_cascade : array-like
An array of shape [scale_level, y, x]
containing per scale level (cascade) the weighted combination of
cascades from multiple components (NWP, nowcasts and noise) to be used
in STEPS blending.
combined_mean : array-like
An array of shape [scale_level, ...]
similar to combined_cascade, but containing the normalization parameter
mean.
combined_sigma : array-like
An array of shape [scale_level, ...]
similar to combined_cascade, but containing the normalization parameter
standard deviation.

Returns
-------
out: array-like
A two-dimensional array containing the recomposed cascade.
pysteps/blending/utils.py