Happy New Year!
I've just released PDL::Algorithm::Center to CPAN [1]. It provides a
general framework for constructing iterative N-dimensional centering
routines for weighted and unweighted data. An implementation of a
sigma clipping algorithm is included.
The code imposes a limitation of a single weight per input datum,
regardless of the data's dimension. This is less than ideal for
including uncertainties which might differ for different coordinates.
As an example, for two dimensional dataset the "x" coordinate may have
a different uncertainty than the "y" coordinate. I plan on removing
that limitation at some point in the future.
Diab
[1]
https://metacpan.org/release/PDL-Algorithm-Center