numbacs.extraction.hyperbolic

Module Contents

numbacs.extraction.hyperbolic.rk4_tensorlines(eigval_max, eigvec_min, xvals, yvals, ic_ind, h, steps, U0, lf)[source]

Compute tensorlines in eigvec_min field originially defined over xvals,yvals.

Parameters:
  • eigval_max (jit-callable) – interpolant function of maximum eigenvalue.

  • eigvec_min (np.ndarray, shape = (nx,ny,2)) – array of maximum eigenvectors.

  • xvals (np.ndarray, shape = (nx,)) – array containing x-values.

  • yvals (np.ndarray, shape = (ny,)) – array containing y-values.

  • ic_ind (np.ndarray, shape = (2,)) – array containing xind,yind corresponding to initial condition.

  • h (float) – step size used in the rk4 solver.

  • steps (int) – maximum number of steps allowed for rk4 solver.

  • U0 (np.ndarray, shape = (nx,ny)) – array defining region used by _in_region which satisfies LCS criteria.

  • lf (float) – maximum failure distance of LCS criteria allowed.

Returns:

tensorline – array containing tensorline representing candidate LCS.

Return type:

np.ndarray, shape = (len(d1lcs) + len(d2lcs),2)

numbacs.extraction.hyperbolic.rk4_tensorlines_oecs(eigval_max, eigvec_min, xvals, yvals, ic_ind, h, steps, maxlen, minval)[source]

Compute tensorlines in eigvec_min field originially defined over xvals,yvals.

Parameters:
  • eigval_max (jit-callable) – interpolant function of maximum eigenvalue.

  • eigvec_min (np.ndarray, shape = (nx,ny,2)) – array of maximum eigenvectors.

  • xvals (np.ndarray, shape = (nx,)) – array containing x-values.

  • yvals (np.ndarray, shape = (ny,)) – array containing y-values.

  • ic_ind (np.ndarray, shape = (2,)) – array containing xind,yind corresponding to initial condition.

  • h (float) – step size used in the rk4 solver.

  • steps (int) – maximum number of steps allowed for rk4 solver.

  • maxlen (int) – maximum length allowed for OECS curves

Returns:

tensorline – array containing tensorline representing candidate OECS.

Return type:

np.ndarray, shape = (len(d1lcs) + len(d2lcs),2)

numbacs.extraction.hyperbolic.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)[source]

Wrapper for _compute_lcs which also performs comparison of close enough LCS and returns most attracting/repelling LCS in a list.

Parameters:
  • eigval_max (np.ndarray, shape = (nx,ny)) – array containing maximum eigenvalues.

  • eigvecs (np.ndarray, shape = (nx,ny,2,2)) – array containing eigenvectors.

  • x (np.ndarray, shape = (nx,)) – array containing x-values.

  • y (np.ndarray, shape = (ny,)) – array containing y-values.

  • h (float) – step size used in Runge-Kutta solver.

  • steps (int) – maximum number of steps for Runge-Kutta solver.

  • lf (float) – maximum failure distance of LCS criteria allowed.

  • lmin (float) – minumum allowed length for LCS.

  • r (float) – radius in which points will be discared after a maximum is found at the center.

  • nmax (int) – number of maxima, i.e. initial conditions for tensorlines.

  • dist_tol (float) – distance tolerance used when comparing candidate LCS. If dist_tol = 0.0, no comparison will be made and all candidate LCS will be returned.

  • nlines (int) – 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.

  • lambda_avg_min (int) – minimum allowed value for lambda_avg for curve to be considered for lcs. The default is 0.

  • percentile (int, optional) – percentile of eigval_max used for min allowed value. The default is 0.

  • ep_dist_tol (float, optional) – 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.

  • arclen_flag (bool, optional) – 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.

Returns:

lcs – collection of most attracting/repelling LCS.

Return type:

list

numbacs.extraction.hyperbolic.hyperbolic_oecs(eigval_max, eigvecs, x, y, r, h, steps, maxlen, minval, n=-1)[source]

Wrapper for _hyperbolic_oecs that returns list of oecs saddles.

Parameters:
  • eigval_max (np.ndarray, shape = (nx,ny)) – array containing values of max eigenvalue of S.

  • eigvecs (np.ndarray, shape = (nx,ny,2,2)) – array containing both minimum and maximum eigenvectors of S.

  • x (np.ndarray, shape = (nx,)) – array containing x-values.

  • y (np.ndarray, shape = (ny,)) – array containing x-values.

  • r (float) – radius used to find local maxima.

  • h (float) – step size used in Runge-Kutta solver.

  • steps (int) – maximum number of steps for Runge-Kutta solver.

  • maxlen (float) – maximum allowed length for oecs curve.

  • minval (float) – minimum value allowed for eigval_max.

  • n (int, optional) – number of local maxima to look for, if n = -1, all are used. The default is -1.

Returns:

oecs_saddles – list containing oecs saddles defined by oecs forward and oecs backward curves.

Return type:

list