desc.profiles.MTanhProfile

class desc.profiles.MTanhProfile(params=[0, 0, 1, 1, 0], grid=None, name='')[source]

Profile represented by a modified hyperbolic tangent + polynomial.

Profile is parameterized by pedestal height (ped, \(p\)), SOL height (offset, \(o\)), pedestal symmetry point (sym, \(s\)), pedestal width (width, \(w\)), and a polynomial:

\[f = o + 1/2 (o - p) (\tanh(z) - 1) + 1/2 (o - p) g(y)\]

Where \(z=(x-s)/w\), \(y=e^z/(e^{2z}+1)\), and \(g\) is a polynomial with no constant term

Parameters:
  • params (array-like) – parameters for mtanh + poly. params = [ped, offset, sym, width, *core_poly] where core poly are the polynomial coefficients in ascending order, without a constant term

  • grid (Grid) – default grid to use for computing values using transform method

  • name (str) – name of the profile

Methods

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, w, p0, pmax, ...])

Fit a MTanhProfile from point data.

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

grid

Nodes for computation.

name

Name of the profile.

params

Parameter values.