@@ -354,8 +354,17 @@ def plot_bifurcation(self, with_plot=True, show=False, with_return=False,
354354 if with_return :
355355 return final_fps , final_pars , jacobians
356356
357- def plot_limit_cycle_by_sim (self , duration = 100 , with_plot = True , with_return = False ,
358- plot_style = None , tol = 0.001 , show = False , dt = None , offset = 1. ):
357+ def plot_limit_cycle_by_sim (
358+ self ,
359+ duration = 100 ,
360+ with_plot : bool = True ,
361+ with_return : bool = False ,
362+ plot_style : dict = None ,
363+ tol : float = 0.001 ,
364+ show : bool = False ,
365+ dt : float = None ,
366+ offset : float = 1.
367+ ):
359368 global pyplot
360369 if pyplot is None : from matplotlib import pyplot
361370 utils .output ('I am plotting the limit cycle ...' )
@@ -400,10 +409,16 @@ def plot_limit_cycle_by_sim(self, duration=100, with_plot=True, with_return=Fals
400409 if len (ps_limit_cycle [0 ]):
401410 for i , var in enumerate (self .target_var_names ):
402411 pyplot .figure (var )
403- pyplot .plot (ps_limit_cycle [0 ], ps_limit_cycle [1 ], vs_limit_cycle [i ]['max' ],
404- ** plot_style , label = 'limit cycle (max)' )
405- pyplot .plot (ps_limit_cycle [0 ], ps_limit_cycle [1 ], vs_limit_cycle [i ]['min' ],
406- ** plot_style , label = 'limit cycle (min)' )
412+ pyplot .plot (ps_limit_cycle [0 ],
413+ ps_limit_cycle [1 ],
414+ vs_limit_cycle [i ]['max' ],
415+ ** plot_style ,
416+ label = 'limit cycle (max)' )
417+ pyplot .plot (ps_limit_cycle [0 ],
418+ ps_limit_cycle [1 ],
419+ vs_limit_cycle [i ]['min' ],
420+ ** plot_style ,
421+ label = 'limit cycle (min)' )
407422 pyplot .legend ()
408423
409424 elif len (self .target_par_names ) == 1 :
@@ -427,8 +442,16 @@ def plot_limit_cycle_by_sim(self, duration=100, with_plot=True, with_return=Fals
427442
428443
429444class FastSlow1D (Bifurcation1D ):
430- def __init__ (self , model , fast_vars , slow_vars , fixed_vars = None ,
431- pars_update = None , resolutions = None , options = None ):
445+ def __init__ (
446+ self ,
447+ model ,
448+ fast_vars : dict ,
449+ slow_vars : dict ,
450+ fixed_vars : dict = None ,
451+ pars_update : dict = None ,
452+ resolutions = None ,
453+ options : dict = None
454+ ):
432455 super (FastSlow1D , self ).__init__ (model = model ,
433456 target_pars = slow_vars ,
434457 target_vars = fast_vars ,
@@ -510,8 +533,16 @@ def plot_trajectory(self, initials, duration, plot_durations=None,
510533
511534
512535class FastSlow2D (Bifurcation2D ):
513- def __init__ (self , model , fast_vars , slow_vars , fixed_vars = None ,
514- pars_update = None , resolutions = 0.1 , options = None ):
536+ def __init__ (
537+ self ,
538+ model ,
539+ fast_vars : dict ,
540+ slow_vars : dict ,
541+ fixed_vars : dict = None ,
542+ pars_update : dict = None ,
543+ resolutions = 0.1 ,
544+ options : dict = None
545+ ):
515546 super (FastSlow2D , self ).__init__ (model = model ,
516547 target_pars = slow_vars ,
517548 target_vars = fast_vars ,
0 commit comments