Open keewis opened 4 months ago
as pointed out by @jmdelouis, it looks like for some cells there is multiple nearest neighbours, so we'd have to compute the average of those neighbours.
Instead, we have a couple of other modes: mean
, mode
, max
, min
(simple aggregation of the neighbourhood – group neighbours
by the padded cell to implement this), and a different mode (mostly mean
, but could also be median
/ max
, min
) that includes more data the further the padded cell is away from any data cells to capture larger-scale features.
As part of #18, we need to pad the input array. #23 added the basic infrastructure and the
constant
mode.Planned modes:
constant
: fill padded cells with a constant valueedge
: fill padded cells with the closest edge cell ("nearest neighbour interpolation")linear_ramp
: linear interpolation from the closest edge cell to a constant valuesymmetric
: reflect the values along the edge of the domainmean
,mode
,max
,min
mean
,mode
,max
,min
(this refers to the second mode from https://github.com/IAOCEA/healpix-convolution/issues/25#issuecomment-2214375365, I just can't find a better name for this)The remaining cells all need a way to find the nearest neighbour from the list of computed neighbours. In addition to that,
linear_ramp
needs the distance in rings, andsymmetric
needs to work with vector geometry to find the right cells.