desc.coils.MixedCoilSet.from_makegrid_coilfile

classmethod MixedCoilSet.from_makegrid_coilfile(coil_file, method='cubic')Source

Create a CoilSet of SplineXYZCoils from a MAKEGRID-formatted coil txtfile.

Parameters:
  • coil_file (str or path-like) – path to coil file in txt format

  • 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

    • 'cardinal': C1 cubic general tension splines. If used, default tension of c = 0 will be used

    • 'monotonic': C1 cubic splines that attempt to preserve monotonicity in the data, and will not introduce new extrema in the interpolated points

    • 'monotonic-0': same as ‘monotonic’ but with 0 first derivatives at both endpoints