espdev / csaps

Cubic spline approximation (smoothing)
https://csaps.readthedocs.io
MIT License
161 stars 27 forks source link

Roughness weights #77

Open michalkvasnicka opened 5 months ago

michalkvasnicka commented 5 months ago

Any plans to implement roughness weights, which are still not implemented but this is extremely important feature!!! (see https://github.com/espdev/csaps/issues/59#issuecomment-1200123897 )?

espdev commented 5 months ago

@michalkvasnicka,

I agree that this functionality would be useful to have for more precise smoothing control.

I'm not sure I'll be able to get on it anytime soon. Could you implement this functionality and make a PR? I don't think it should be too difficult. You can see how it is done in csaps.m in MATLAB and port the m-code in Python. Unfortunately, I don't have access to MATLAB right now.

Unlike MATLAB, we can add a new parameter roughness to the classes and csaps function. I don't like MATLAB approach to add this to p (smooth) parameter as a vector of weights on the interval x(i-1),x(i).