Spline with constraints at border

后端 未结 3 1908
执笔经年
执笔经年 2020-12-31 02:58

I have measured data on a three dimensional grid, e.g. f(x, y, t). I want to interpolate and smooth this data in the direction of t with splines. C

3条回答
  •  情话喂你
    2020-12-31 03:49

    Your example does not work ( on python 2.7.9), so I only sketch my idea:

    1. calculate sp
    2. take the derivative via sp.derivative and evaluate it at the relevant times (probably the same times at which you measured your data)
    3. Set the relevant points to zero (e.g. the value at t=0)
    4. Calculate another spline from the derivative values.
    5. Integrate your spline function. I guess you will have to do this numerically, but that should not be a problem. Do not forget to add a constant, to get your original function.

提交回复
热议问题