desc.compat.rescale

desc.compat.rescale(eq, L=('R0', None), B=('B0', None), scale_pressure=True, copy=False, verbose=0)Source

Rescale an Equilibrium in size L and magnetic field strength B.

Parameters:
  • eq (Equilibrium or iterable of Equilibrium) – Equilibria to rescale.

  • L (tuple, (str, float)) – First element is a string denoting the length to scale. One of: {“R0”, “a”, “V”} for major radius, minor radius, or volume. Second element is a float denoting the desired size. Default is no scaling.

  • B (tuple, (str, float)) – First element is a string denoting the magnetic field strength to scale. One of: {“B0”, “<B>”, “B_max”} for B on axis, volume averaged, or maximum on the LCFS. Second element is a float denoting the desired field. Default is no scaling.

  • scale_pressure (bool, optional) – Whether or not to scale the pressure profile to maintain force balance.

  • copy (bool, optional) – Whether to rescale the original equilibrium (default) or a copy.

  • verbose (int) – Level of output.

Returns:

eq (Equilibrium or iterable of Equilibrium) – Same as input, but rescaled to the desired size and magnetic field strength.