Nearest-neighbor averaging involves repeatedly replacing each point by the average of its N nearest-neighbors; this is the type of smoothing that is done if nothing is specified. Despiking consists of replacing the most extreme of N nearest neighbors with the average of the same points; the most extreme point is the one with the largest mean absolute difference from the other points.