Module Expr Str ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Num Num Assign AttributeStore NameLoad attr Dict Str Num Assign AttributeStore NameLoad attr Dict Str Str Str Str Str Str Str Str Str Str Str Str Assign AttributeStore NameLoad attr ListLoad Str Str Str Str Assign AttributeStore NameLoad attr Dict Str Str Str TupleLoad ListLoad Str Str TupleLoad ListLoad Str Str Str TupleLoad ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Num Dict Str Str Str Str Str Num NameLoad NameLoad keyword ListLoad Str Str keyword AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr ListLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad Num body If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Num BinOpMult Num NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr ListLoad Num Num Expr Call AttributeLoad NameLoad attr ListLoad Num Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr ListLoad Num Num Str keyword Str Index Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr ListLoad Num Num Str keyword Str Index Num Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str For TupleStore NameStore NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad Call NameLoad SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr TupleLoad Call NameLoad SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults kwarg body Assign NameStore Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Str keyword Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Str keyword Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Num Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareGt SubscriptLoad SubscriptLoad NameLoad Index Str Index Num SubscriptLoad AttributeLoad NameLoad attr Index Str body Print Str Return Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Print Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore BinOpSub BinOpMult BinOpMult UnaryOpUSub BinOpSub NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad BinOpMult BinOpMult BinOpAdd NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad If CompareLt NameLoad Num body Assign NameStore Str orelse Assign NameStore Str Print BinOpMod Str NameLoad NameLoad decorator_list Assign NameStore Dict Str Str Num Num Assign NameStore Dict Str Str Str Str Str Str Num Num Num Num Num Num Assign NameStore Call NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad keyword Num keyword Num Expr Call NameLoad NameLoad
N/A N/A 
Simple coupled phase oscillators
Eqs. 12.2 of Ch. 12.1
 __future__ division N/A time PyDSTool * PyDSTool.Toolbox.phaseplane * common_lib * make_model N/A N/A icdict pardict N/A N/A N/A DSargs N/A args N/A N/A DSargs name phase N/A N/A DSargs ics icdict N/A N/A DSargs pars pardict N/A N/A DSargs tdata N/A 0 60 N/A N/A DSargs algparams N/A init_step 0.003 N/A N/A DSargs varspecs N/A p1 p2 phi p1out p2out dphi f1(p1,p2) f2(p1,p2) p2-p1 mod(p1,2*pi) mod(p2,2*pi) abs(f1(p1,p2)-f2(p1,p2)) N/A N/A DSargs auxvars N/A phi p1out p2out dphi N/A N/A DSargs fnspecs N/A H f1 f2 N/A N/A p sin(p+sigma) N/A N/A p1 p2 w1 + a1*H(p2-p1) N/A N/A p1 p2 w2 + a2*H(p1-p2) N/A stop_ev N/A N/A Events makeZeroCrossEvent abs(f1(p1,p2)-f2(p1,p2))-dphi_thresh -1 N/A name eventtol precise term stop_ev 0.01 True True varnames N/A p1 p2 fnspecs N/A DSargs fnspecs parnames N/A N/A pardict keys targetlang python N/A N/A DSargs events N/A stop_ev N/A N/A N/A Generator Vode_ODEsystem DSargs N/A animate N/A N/A traj tlo thi dt N/A 0 None 0 N/A N/A N/A dt 0 N/A N/A pts N/A N/A traj sample tlo tlo thi thi N/A ts N/A pts N/A t N/A N/A pts N/A N/A traj sample tlo tlo thi thi dt dt precise True N/A ts N/A pts N/A t N/A N/A N/A plt figure 0 N/A N/A N/A plt clf N/A N/A N/A plt axis N/A -1.1 1.1 -1.1 1.1 N/A ax N/A N/A plt gca N/A N/A N/A ax set_autoscale_on False N/A N/A N/A ax set_aspect equal N/A p N/A linspace 0 N/A 2 pi N/A N/A N/A plt plot N/A cos p N/A sin p gray N/A N/A N/A plt xlim N/A -1.1 1.1 N/A N/A N/A plt ylim N/A -1.1 1.1 N/A theta1 N/A N/A N/A plt plot N/A 0 0 ro label theta 1 N/A 0 N/A theta2 N/A N/A N/A plt plot N/A 0 0 ko label theta 2 N/A 0 N/A N/A N/A plt legend N/A ts N/A pts N/A t N/A N/A i pt N/A enumerate pts N/A N/A N/A N/A theta1 set_data N/A N/A cos N/A pt N/A p1 N/A sin N/A pt N/A p1 N/A N/A N/A theta2 set_data N/A N/A cos N/A pt N/A p2 N/A sin N/A pt N/A p2 N/A N/A N/A plt draw N/A test N/A N/A N/A kw N/A N/A icdict N/A filteredDict kw N/A N/A DS funcspec vars N/A pardict N/A filteredDict kw N/A N/A N/A DS pars keys N/A N/A N/A DS set ics icdict pars pardict N/A traj N/A N/A DS compute test N/A pts N/A N/A traj sample N/A N/A N/A plt figure 1 N/A N/A N/A plt clf N/A N/A N/A plt plot N/A pts N/A t N/A pts N/A p1out r label theta 1 N/A N/A N/A plt plot N/A pts N/A t N/A pts N/A p2out k label theta 2 N/A N/A N/A plt legend N/A N/A N/A plt ylim N/A -0.1 6.4 N/A N/A N/A plt figure 2 N/A N/A N/A plt clf N/A N/A N/A plt plot N/A pts N/A t N/A pts N/A phi b linewidth 2 label phi N/A N/A N/A plt show N/A N/A traj pts N/A stability N/A N/A pts N/A N/A N/A See condition Eq. 12.10 N/A N/A N/A N/A pts N/A dphi N/A -1 N/A N/A DS pars N/A dphi_thresh N/A N/A No steady state N/A N/A phi N/A N/A pts N/A phi N/A -1 N/A Final, steady state phi = N/A N/A pts N/A phi N/A -1 N/A a1 N/A N/A DS pars N/A a1 N/A a2 N/A N/A DS pars N/A a2 N/A sigma N/A N/A DS pars N/A sigma N/A cond N/A N/A N/A N/A N/A a2 a1 N/A sin sigma N/A sin phi N/A N/A N/A a1 a2 N/A cos sigma N/A cos phi N/A N/A cond 0 N/A N/A result (stable) N/A N/A result (unstable) N/A N/A d/d phi (D2(-phi) - H1(phi)) = %.3f cond result N/A N/A icdict N/A p1 p2 0 0.8 N/A pardict N/A w1 w2 a1 a2 sigma dphi_thresh 6.2 5.8 -0.2 -0.2 0.9 0.001 N/A DS N/A make_model icdict pardict N/A N/A traj pts N/A test p2 0.0 a1 -0.3 N/A N/A stability pts