desc.profiles.PowerSeriesProfile

class desc.profiles.PowerSeriesProfile(params=None, modes=None, sym='auto', name='')Source

Profile represented by a monic power series.

f(x) = a[0] + a[1]*x + a[2]*x**2 + …

Parameters:
  • params (array-like) – Coefficients of the series. Assumed to be zero if not specified. If modes is not supplied, assumed to be in ascending order with no missing values. If modes is given, coefficients can be in any order or indexing.

  • modes (array-like) – Mode numbers for the associated coefficients. eg a[modes[i]] = params[i]

  • sym (bool) – Whether the basis should only contain even powers (True) or all powers (False).

  • name (str) – Name of the profile.

Methods

change_resolution(L[, M, N])

Set a new maximum mode number.

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.

from_values(x, y[, order, rcond, w, sym, name])

Fit a PowerSeriesProfile from point data.

get_params(l)

Get power series coefficients for given mode number(s).

load(load_from[, file_format])

Initialize from file.

save(file_name[, file_format, file_mode])

Save the object.

set_params(l[, a])

Set specific power series coefficients.

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

basis

Spectral basis for power series.

name

Name of the profile.

params

Parameter values.

sym

Symmetry type of the power series.