PhasePlane2D#

class brainpy.analysis.PhasePlane2D(model, target_vars, fixed_vars=None, target_pars=None, pars_update=None, resolutions=None, **kwargs)[source]#

Phase plane analyzer for 2D dynamical system.

Parameters:
  • model (Any) – A model of the population, the integrator function, or a list/tuple of integrator functions.

  • target_vars (dict) – The target/dynamical variables.

  • fixed_vars (dict) – The fixed variables.

  • target_pars (dict, optional) – The parameters which can be dynamical varied.

  • pars_update (dict, optional) – The parameters to update.

  • resolutions (float, dict) –

plot_fixed_point(with_plot=True, with_return=False, show=False, tol_unique=0.01, tol_aux=1e-08, tol_opt_screen=None, select_candidates='fx-nullcline', num_rank=100)[source]#

Plot the fixed point and analyze its stability.

plot_limit_cycle_by_sim(initials, duration, tol=0.01, show=False, dt=None)[source]#

Plot trajectories according to the settings.

Parameters:
  • initials (list, tuple) –

    The initial value setting of the targets.

    • It can be a tuple/list of floats to specify each value of dynamical variables (for example, (a, b)).

    • It can also be a tuple/list of tuple to specify multiple initial values (for example, [(a1, b1), (a2, b2)]).

  • duration (int, float, tuple, list) –

    The running duration. Same with the duration in NeuGroup.run().

    • It can be a int/float (t_end) to specify the same running end time,

    • Or it can be a tuple/list of int/float ((t_start, t_end)) to specify the start and end simulation time.

    • Or, it can be a list of tuple ([(t1_start, t1_end), (t2_start, t2_end)]) to specify the specific start and end simulation time for each initial value.

  • show (bool) – Whether show or not.

plot_nullcline(with_plot=True, with_return=False, y_style=None, x_style=None, show=False, coords=None, tol_nullcline=1e-07)[source]#

Plot the nullcline.

plot_trajectory(initials, duration, plot_durations=None, axes='v-v', dt=None, show=False, with_plot=True, with_return=False, **kwargs)[source]#

Plot trajectories according to the settings.

Parameters:
  • initials (list, tuple, dict) – The initial value setting of the targets. It can be a tuple/list of floats to specify each value of dynamical variables (for example, (a, b)). It can also be a tuple/list of tuple to specify multiple initial values (for example, [(a1, b1), (a2, b2)]).

  • duration (int, float, tuple, list) –

    The running duration. Same with the duration in NeuGroup.run().

    • It can be a int/float (t_end) to specify the same running end time,

    • Or it can be a tuple/list of int/float ((t_start, t_end)) to specify the start and end simulation time.

    • Or, it can be a list of tuple ([(t1_start, t1_end), (t2_start, t2_end)]) to specify the specific start and end simulation time for each initial value.

  • plot_durations (tuple, list, optional) – The duration to plot. It can be a tuple with (start, end). It can also be a list of tuple [(start1, end1), (start2, end2)] to specify the plot duration for each initial value running.

  • axes (str) –

    The axes to plot. It can be:

    • ’v-v’: Plot the trajectory in the ‘x_var’-‘y_var’ axis.

    • ’t-v’: Plot the trajectory in the ‘time’-‘var’ axis.

  • show (bool) – Whether show or not.

plot_vector_field(with_plot=True, with_return=False, plot_method='streamplot', plot_style=None, show=False)[source]#

Plot the vector field.

Parameters: