DEP: signal.lombscargle: deprecate argument `precenter`

Hello all,

The precenter argument for lombscargle was made useless after #21277 was merged last year—and is less useful than the added floating_mean argument (as already detailed in the Notes, copied below for reference). #23476 would like to mark the argument precenter for deprecation.

Notes

The algorithm used will not automatically account for any unknown y offset, unless
floating_mean is True. Therefore, for most use cases, if there is a
possibility of a y offset, it is recommended to set floating_mean to True.
Furthermore, floating_mean accounts for sample weights, and will also correct for
any bias due to consistently missing observations at peaks and/or troughs.
The legacy concept of “pre-centering” entails removing the mean from parameter y
before processing, i.e., passing y - y.mean() instead of setting the parameter
floating_mean to True.

Specifically, the functionality of precenter can be substituted by passing y - y.mean() to y. Let me know if there are any questions or concerns over on #23476.

Thanks,
Adam

1 Like