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 (ndarray) – x (cartesian) coordinates of the points for which to look for the gradients.

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

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

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

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

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

  • atol (Optional[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[ndarray], List[ndarray]]