For gaps longer than about 4 knots (e.g. due to bad column), the cubic spline looses the support and the design matrix contains rows having only zeros. Similar, poorly sampled data (e.g. little barycentric RV spread, single transit nights) can lead to ill posed matrices (overfitting).
You may use the -ofac option to adjust the knot spacing. Or the -pspline option; even a tiny regularisation (e.g. 0.00001) may overcome the problem. Both create smoother templates, which often gives more robust RVs. Also just more data may solve the problem.
Please check the template creation with the -lookt option.
Here is an illustration of the problem.
On the left side there is support from one only spectrum (with ofac=1). The fit seems to go through each data point, but shows large ringing (overfitting). On the right side a second spectrum helps to mitigate the ringing.
If the data contains gaps or poorly sampled egdes,
cspline.py
can raise a warning in https://github.com/mzechmeister/serval/blob/ebe7190c96de86eae0b8f74017772e17565cd009/src/cspline.py#L611-L613For gaps longer than about 4 knots (e.g. due to bad column), the cubic spline looses the support and the design matrix contains rows having only zeros. Similar, poorly sampled data (e.g. little barycentric RV spread, single transit nights) can lead to ill posed matrices (overfitting).
You may use the
-ofac
option to adjust the knot spacing. Or the-pspline
option; even a tiny regularisation (e.g. 0.00001) may overcome the problem. Both create smoother templates, which often gives more robust RVs. Also just more data may solve the problem. Please check the template creation with the-lookt
option.Here is an illustration of the problem. On the left side there is support from one only spectrum (with
ofac=1
). The fit seems to go through each data point, but shows large ringing (overfitting). On the right side a second spectrum helps to mitigate the ringing.