desc.profiles.MTanhProfile.to_spline

MTanhProfile.to_spline(knots=20, method='cubic2')

Convert this profile to a SplineProfile.

Parameters:
  • knots (int or ndarray) – x locations to use for spline. If an integer, uses that many points linearly spaced between 0,1

  • method (str) – method of interpolation - ‘nearest’: nearest neighbor interpolation - ‘linear’: linear interpolation - ‘cubic’: C1 cubic splines (aka local splines) - ‘cubic2’: C2 cubic splines (aka natural splines) - ‘catmull-rom’: C1 cubic centripedal “tension” splines

Returns:

profile (SplineProfile) – profile in spline form.