numbacs.extraction.hyperbolic ============================= .. py:module:: numbacs.extraction.hyperbolic Module Contents --------------- .. py:function:: rk4_tensorlines(eigval_max, eigvec_min, xvals, yvals, ic_ind, h, steps, U0, lf) Compute tensorlines in eigvec_min field originially defined over xvals,yvals. :param eigval_max: interpolant function of maximum eigenvalue. :type eigval_max: jit-callable :param eigvec_min: array of maximum eigenvectors. :type eigvec_min: np.ndarray, shape = (nx,ny,2) :param xvals: array containing x-values. :type xvals: np.ndarray, shape = (nx,) :param yvals: array containing y-values. :type yvals: np.ndarray, shape = (ny,) :param ic_ind: array containing xind,yind corresponding to initial condition. :type ic_ind: np.ndarray, shape = (2,) :param h: step size used in the rk4 solver. :type h: float :param steps: maximum number of steps allowed for rk4 solver. :type steps: int :param U0: array defining region used by _in_region which satisfies LCS criteria. :type U0: np.ndarray, shape = (nx,ny) :param lf: maximum failure distance of LCS criteria allowed. :type lf: float :returns: **tensorline** -- array containing tensorline representing candidate LCS. :rtype: np.ndarray, shape = (len(d1lcs) + len(d2lcs),2) .. py:function:: rk4_tensorlines_oecs(eigval_max, eigvec_min, xvals, yvals, ic_ind, h, steps, maxlen, minval) Compute tensorlines in eigvec_min field originially defined over xvals,yvals. :param eigval_max: interpolant function of maximum eigenvalue. :type eigval_max: jit-callable :param eigvec_min: array of maximum eigenvectors. :type eigvec_min: np.ndarray, shape = (nx,ny,2) :param xvals: array containing x-values. :type xvals: np.ndarray, shape = (nx,) :param yvals: array containing y-values. :type yvals: np.ndarray, shape = (ny,) :param ic_ind: array containing xind,yind corresponding to initial condition. :type ic_ind: np.ndarray, shape = (2,) :param h: step size used in the rk4 solver. :type h: float :param steps: maximum number of steps allowed for rk4 solver. :type steps: int :param maxlen: maximum length allowed for OECS curves :type maxlen: int :returns: **tensorline** -- array containing tensorline representing candidate OECS. :rtype: np.ndarray, shape = (len(d1lcs) + len(d2lcs),2) .. py:function:: hyperbolic_lcs(eigval_max, eigvecs, x, y, h, steps, lf, lmin, r, nmax, dist_tol, nlines, lambda_avg_min=0, percentile=0, ep_dist_tol=0.0, arclen_flag=False) Wrapper for _compute_lcs which also performs comparison of close enough LCS and returns most attracting/repelling LCS in a list. :param eigval_max: array containing maximum eigenvalues. :type eigval_max: np.ndarray, shape = (nx,ny) :param eigvecs: array containing eigenvectors. :type eigvecs: np.ndarray, shape = (nx,ny,2,2) :param x: array containing x-values. :type x: np.ndarray, shape = (nx,) :param y: array containing y-values. :type y: np.ndarray, shape = (ny,) :param h: step size used in Runge-Kutta solver. :type h: float :param steps: maximum number of steps for Runge-Kutta solver. :type steps: int :param lf: maximum failure distance of LCS criteria allowed. :type lf: float :param lmin: minumum allowed length for LCS. :type lmin: float :param r: radius in which points will be discared after a maximum is found at the center. :type r: float :param nmax: number of maxima, i.e. initial conditions for tensorlines. :type nmax: int :param dist_tol: distance tolerance used when comparing candidate LCS. If dist_tol = 0.0, no comparison will be made and all candidate LCS will be returned. :type dist_tol: float :param nlines: number of lines in dimension with largest length used when comparing candidate LCS, number of lines in other dimension will be scaled by the ratio of the dimensions lengths. Only used if dist_tol > 0. :type nlines: int :param lambda_avg_min: minimum allowed value for lambda_avg for curve to be considered for lcs. The default is 0. :type lambda_avg_min: int :param percentile: percentile of eigval_max used for min allowed value. The default is 0. :type percentile: int, optional :param ep_dist_tol: value used to compare starting/ending points of curves, if endpoints are within this value, all curves with smaller lambda_avg values are discarded. If ep_dist_tol <= 0.0, this step is skipped and endpoints are not compared. The default is 0.0. :type ep_dist_tol: float, optional :param arclen_flag: flag to determine if the average attraction/repulsion rate along curve is used or if the total attraction/repulsion rate for a curve is used for comparison. The default is False. :type arclen_flag: bool, optional :returns: **lcs** -- collection of most attracting/repelling LCS. :rtype: list .. py:function:: hyperbolic_oecs(eigval_max, eigvecs, x, y, r, h, steps, maxlen, minval, n=-1) Wrapper for _hyperbolic_oecs that returns list of oecs saddles. :param eigval_max: array containing values of max eigenvalue of S. :type eigval_max: np.ndarray, shape = (nx,ny) :param eigvecs: array containing both minimum and maximum eigenvectors of S. :type eigvecs: np.ndarray, shape = (nx,ny,2,2) :param x: array containing x-values. :type x: np.ndarray, shape = (nx,) :param y: array containing x-values. :type y: np.ndarray, shape = (ny,) :param r: radius used to find local maxima. :type r: float :param h: step size used in Runge-Kutta solver. :type h: float :param steps: maximum number of steps for Runge-Kutta solver. :type steps: int :param maxlen: maximum allowed length for oecs curve. :type maxlen: float :param minval: minimum value allowed for eigval_max. :type minval: float :param n: number of local maxima to look for, if n = -1, all are used. The default is -1. :type n: int, optional :returns: **oecs_saddles** -- list containing oecs saddles defined by oecs forward and oecs backward curves. :rtype: list