Skip to contents

Returns a custom reducer for reduce_over() computing, per pixel, the observed band-vector nearest the geomedian(): a composite whose every pixel is a real spectrum from a real date, following the medoid construction of the Open Data Cube's hdstats package. Use it when downstream analysis must not see synthetic spectra at all.

Usage

medoid(iters = 12L, eps = 1e-07)

Arguments

iters

Weiszfeld iterations (fixed, unrolled).

eps

Distance regulariser (guards the weight at zero distance).

Value

A reducer fn(x, dims) for reduce_over().

Details

Ties (several dates equally near) average; timesteps with any NaN band are never selected; pixels with no valid timestep return NaN. Input layout as geomedian(): a (band, t, y, x) cube reduced over "t".

See also

geomedian(), reduce_over(); band_project() and mlp_project() for projections over the surviving band axis.