desc.grid.find_most_rational_surfaces

class desc.grid.find_most_rational_surfaces(iota, n, atol=1e-14, itol=1e-14, eps=1e-12, **kwargs)Source

Find “most rational” surfaces for a give iota profile.

By most rational, we generally mean lowest order ie smallest continued fraction.

Note: May not work as expected for non-monotonic profiles with duplicate rational surfaces. (generally only 1 of each rational is found)

Parameters:
  • iota (Profile) – iota profile to search

  • n (integer) – number of rational surfaces to find

  • atol (float, optional) – stopping tolerance for root finding

  • itol (float, optional) – tolerance for rounding float to nearest int

  • eps (float, optional) – amount to displace points to avoid duplicates

Returns:

  • rho (ndarray) – sorted radial locations of rational surfaces

  • rationals (ndarray) – values of iota at rational surfaces