ess.reduce.uncertainty.broadcast_with_upper_bound_variances#

ess.reduce.uncertainty.broadcast_with_upper_bound_variances(data, /, *, prototype)[source]#

Compute an upper bound for the variances of the broadcasted data.

The variances of the broadcasted data are computed by scaling the variances of the input data by the volume of the new subspace. The volume of the new subspace is computed as the product of the sizes of the new dimensions. In the case of an event-data prototype the events are counted.

Parameters:
  • data (Variable | DataArray) – The data to broadcast.

  • prototype (DataArray | Variable) – Defines the new sizes (dims and shape). If present, masks are used to exclude masked values from the variance computation.

Returns:

Variable | DataArray – The data with the variances scaled by the volume of the new subspace.