jrckln / Bendyourspline

2 stars 0 forks source link

Problematic input in natural splines #26

Closed matherealize closed 3 years ago

matherealize commented 3 years ago

There are some problematic inputs in the natural spline tabs which lead to NA/NaNs and errors in the output. I think this should be addressed in some way, since I think many users like to put sliders to the extreme values to see what happens :)

Steps to reproduce (example):

Solution: I'd suggest to set the extreme values of the slider range to a tiny value below the actual boundaries OR to modify the value passed into the computations by a little bit. This way the slider range is untouched, and the user won't notice a difference. If we want to leave it as is, to show that not all values make sense, then I'd suggest to show the error message more gracefully and notify the user why this is not a good value.

jrckln commented 3 years ago

I've added/subtracted 0.1 of the min/max value of the boundary sliders. So for your first example (all coefficients to 1 and right boundary knot to the lowest possible value according to the position of the last internal knot) it is not possible anymore to set the position of the boundary knot to the same value as the last internal knot but to <position of last internal knot + 0.1>