Bifurcation2D#

class brainpy.analysis.Bifurcation2D(model, target_pars, target_vars, fixed_vars=None, pars_update=None, resolutions=None, options=None)[source]#

Bifurcation analysis of 2D system.

Using this class, we can make co-dimension1 or co-dimension2 bifurcation analysis.

plot_bifurcation(with_plot=True, show=False, with_return=False, tol_aux=1e-08, tol_unique=0.01, tol_opt_candidate=None, num_par_segments=1, num_fp_segment=1, nullcline_aux_filter=1.0, select_candidates='aux_rank', num_rank=100)[source]#

Make the bifurcation analysis.

Parameters:
  • with_plot (bool) – Whether plot the bifurcation figure.

  • show (bool) – Whether show the figure.

  • with_return (bool) – Whether return the computed bifurcation results.

  • tol_aux (float) – The loss tolerance of auxiliary function \(f_{aux}\) to confirm the fixed point. Default is 1e-7. Once \(f_{aux}(x_1) < \mathrm{tol\_aux}\), \(x_1\) will be a fixed point.

  • tol_unique (float) – The tolerance of distance between candidate fixed points to confirm they are the same. Default is 1e-2. If \(|x_1 - x_2| > \mathrm{tol\_unique}\), then \(x_1\) and \(x_2\) are unique fixed points. Otherwise, \(x_1\) and \(x_2\) will be treated as a same fixed point.

  • tol_opt_candidate (float, optional) – The tolerance of auxiliary function \(f_{aux}\) to select candidate initial points for fixed point optimization.

  • num_par_segments (int, sequence of int) – How to segment parameters.

  • num_fp_segment (int) – How to segment fixed points.

  • nullcline_aux_filter (float) – The

  • select_candidates (str) –

    The method to select candidate fixed points. It can be:

    • fx-nullcline: use the points of fx-nullcline.

    • fy-nullcline: use the points of fy-nullcline.

    • nullclines: use the points in both of fx-nullcline and fy-nullcline.

    • aux_rank: use the minimal value of points for the auxiliary function.

  • num_rank (int) – The number of candidates to be used to optimize the fixed points. rank to use.

Returns:

results – Return a tuple of analyzed results:

  • fixed points: a 2D matrix with the shape of (num_point, num_var)

  • parameters: a 2D matrix with the shape of (num_point, num_par)

  • jacobians: a 3D tensors with the shape of (num_point, 2, 2)

Return type:

tuple