egttools.plotting.helpers.calculate_stationary_points

calculate_stationary_points(x, y, corners, f, border=5, delta=1e-12, atol=1e-07)[source]

Finds the roots of f (the points where the gradient is 0), given a number of points.

Parameters
  • x (numpy.ndarray) – x (cartesian) coordinates of the points for which to look for the gradients.

  • y (numpy.ndarray) – y (cartesian) coordinates of the points for which to look for the gradients.

  • corners (numpy.ndarray) – A matrix containing the cartesian coordinates of the vertices of the triangle that forms the 2-simplex.

  • f (Callable[[numpy.ndarray], numpy.ndarray]) – A function that calculates the gradient at any point in the simplex.

  • border (int) – Indicates how close to the simplex borders should we look for the gradients. This allows to avoid boundary problems.

  • delta (float) – tolerance for considering points outside the simplex.

  • atol (float) – tolerance for considering that two roots are equal.

Returns

A list with the barycentric coordinates of all the roots that were found and another list with the cartesian coordinates.

Return type

Tuple[List[numpy.ndarray], List[numpy.ndarray]]