desc.profiles.SplineProfile

class desc.profiles.SplineProfile(values=None, knots=None, method='cubic2', name='')Source

Profile represented by a piecewise cubic spline.

Parameters:
  • params (array-like) – Values of the function at knot locations.

  • 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 centripetal “tension” splines

  • name (str) – name of the profile

Methods

compute(grid[, params, dr, dt, dz])

Compute values of profile at specified nodes.

copy([deepcopy])

Return a (deep)copy of this object.

equiv(other)

Compare equivalence between DESC objects.

load(load_from[, file_format])

Initialize from file.

save(file_name[, file_format, file_mode])

Save the object.

to_fourierzernike([L, M, N, NFP, xs, w])

Convert this profile to a FourierZernikeProfile.

to_mtanh([order, xs, w, p0, pmax, pmin])

Convert this profile to modified hyperbolic tangent + poly form.

to_powerseries([order, xs, sym, rcond, w])

Convert this profile to a PowerSeriesProfile.

to_spline([knots, method])

Convert this profile to a SplineProfile.

Attributes

knots

Knot locations.

name

Name of the profile.

params

Parameters for computation.