temporal_compositeΒΆ

temporal_composite(arr, weights, skip_na=True)[source]

Compute a temporal composite of a 4D array using a weighted median.

Parameters:
  • arr (numpy.ndarray) – 4D array with shape (time, bands, y, x).

  • weights (numpy.ndarray) – 1D array of weights with the same length as the time dimension of arr.

  • skip_na (bool, default True) – If True, NaNs are excluded.

Returns:

Composited 3D array with shape (bands, y, x).

Return type:

numpy.ndarray