desc.coils.SplineXYZCoil.from_values

classmethod SplineXYZCoil.from_values(current, coords, knots=None, method='cubic', name='', basis='xyz')Source

Create SplineXYZCoil from coordinate values.

Parameters:
  • current (float) – Current through the coil, in Amps.

  • coords (ndarray) – Points for X, Y, Z describing the curve. If the endpoint is included (ie, X[0] == X[-1]), then the final point will be dropped.

  • knots (ndarray) – arbitrary curve parameter values to use for spline knots, should be an 1D ndarray of same length as the input. (input length in this case is determined by grid argument, since the input coordinates come from Curve.compute(“x”,grid=grid)) If None, defaults to using an equal-arclength angle as the knots If supplied, will be rescaled to lie in [0,2pi]

  • 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 for this curve

  • basis ({"rpz", "xyz"}) – basis for input coordinates. Defaults to “xyz”

Returns:

coil (SplineXYZCoil) – New representation of the coil parameterized by splines in X,Y,Z.