find_intersections¶
-
metpy.calc.
find_intersections
(x, a, b, direction='all')[source]¶ Calculate the best estimate of intersection.
Calculates the best estimates of the intersection of two y-value data sets that share a common x-value set.
Parameters: - x (array-like) – 1-dimensional array of numeric x-values
- a (array-like) – 1-dimensional array of y-values for line 1
- b (array-like) – 1-dimensional array of y-values for line 2
- direction (string, optional) – specifies direction of crossing. ‘all’, ‘increasing’ (a becoming greater than b), or ‘decreasing’ (b becoming greater than a). Defaults to ‘all’.
Returns: - A tuple (x, y) of array-like with the x and y coordinates of the
- intersections of the lines.