desc.profiles.PowerSeriesProfile.to_mtanh

PowerSeriesProfile.to_mtanh(order=4, xs=100, w=None, p0=None, pmax=None, pmin=None, **kwargs)

Convert this profile to modified hyperbolic tangent + poly form.

Parameters:
  • order (int) – order of the core polynomial to fit

  • xs (int or array-like, shape(M,)) – coordinate locations to evaluate for fitting. If an integer, assumes that many linearly spaced ints in (0,1)

  • w (array-like, shape(M,)) – Weights to apply to the y-coordinates of the sample points. For gaussian uncertainties, use 1/sigma (not 1/sigma**2).

  • p0 (array-like, shape(5+order,)) – initial guess for parameter values

  • pmin (float or array-like, shape(5+order,)) – lower bounds for parameter values

  • pmax (float or array-like, shape(5+order,)) – upper bounds for parameter values

Returns:

profile (MTanhProfile) – profile in mtanh + polynomial form.