B spline fitting notebook