desc.profiles.PowerSeriesProfile
- class desc.profiles.PowerSeriesProfile(params=[0], modes=None, grid=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. 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]
grid (Grid) – Default grid to use for computing values using transform method.
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
([params, grid, dr, dt, dz])Compute values of profile at specified nodes.
copy
([deepcopy])Return a (deep)copy of this object.
eq
(other)Compare equivalence between DESC objects.
from_values
(x, y[, order, rcond, w, grid, ...])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
Spectral basis for power series.
Nodes for computation.
Name of the profile.
Parameter values.
Symmetry type of the power series.