keplersplinev2 fits normalization splines to Kepler light curves. It splits light curves at data gaps, iteratively fits B-splines while rejecting outliers, and can evaluate multiple breakpoint spacings to choose the best spline using the Bayesian Information Criterion. The code returns fitted splines and metadata, including masks of points used in the fit, selected breakpoint spacing, and fit statistics, to support light-curve normalization and trend removal.
https://scixplorer.org/abs/2018AJ....155...94S , https://scixplorer.org/abs/2014PASP..126..948V