<s> from __future__ import division <EOL> from WC_net import * <EOL> from PyDSTool . Toolbox . phaseplane import * <EOL> builder = rate_network ( ) <EOL> S = thresh_Naka_Rushton_fndef ( <NUM_LIT:2> , <NUM_LIT> , <NUM_LIT:100> , with_if = False ) <EOL> builder . add_neuron ( '<STR_LIT>' , tau = <NUM_LIT:20> , ic = <NUM_LIT> , thresh_fn = S ) <EOL> builder . add_neuron ( '<STR_LIT>' , tau = <NUM_LIT:20> , ic = <NUM_LIT:15> , thresh_fn = S ) <EOL> builder . add_syn_input_to_neuron ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:3> ) <EOL> builder . add_syn_input_to_neuron ( '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:3> ) <EOL> net = builder . make_network ( ) <EOL> net . set ( tdata = [ <NUM_LIT:0> , <NUM_LIT> ] , <EOL> algparams = { '<STR_LIT>' : <NUM_LIT:0.5> } ) <EOL> traj = net . compute ( '<STR_LIT:test>' ) <EOL> pts = traj . sample ( ) <EOL> plt . plot ( pts [ '<STR_LIT:t>' ] , pts [ '<STR_LIT>' ] , '<STR_LIT:g>' ) <EOL> plt . plot ( pts [ '<STR_LIT:t>' ] , pts [ '<STR_LIT>' ] , '<STR_LIT:r>' ) <EOL> plt . xlabel ( '<STR_LIT:t>' ) <EOL> plt . ylabel ( '<STR_LIT>' ) <EOL> plt . title ( '<STR_LIT>' ) <EOL> jac_fn = make_Jac ( net ) <EOL> fps = find_fixedpoints ( net , { '<STR_LIT>' : [ <NUM_LIT:0> , <NUM_LIT:200> ] , '<STR_LIT>' : [ <NUM_LIT:0> , <NUM_LIT:200> ] } , <EOL> jac = jac_fn , n = <NUM_LIT:6> ) <EOL> nullc_E1 , nullc_E2 = find_nullclines ( net , '<STR_LIT>' , '<STR_LIT>' , <EOL> { '<STR_LIT>' : [ <NUM_LIT:0> , <NUM_LIT:100> ] , '<STR_LIT>' : [ <NUM_LIT:0> , <NUM_LIT:100> ] } , <EOL> max_step = <NUM_LIT:1> , crop_tol_pc = <NUM_LIT:0> , <EOL> fps = fps , n = <NUM_LIT:3> , <EOL> jac = jac_fn ) <EOL> fp1 = fixedpoint_2D ( net , Point ( fps [ <NUM_LIT:0> ] ) , coords = [ '<STR_LIT>' , '<STR_LIT>' ] , <EOL> eps = <NUM_LIT> , jac = jac_fn ) <EOL> fp2 = fixedpoint_2D ( net , Point ( fps [ <NUM_LIT:1> ] ) , coords = [ '<STR_LIT>' , '<STR_LIT>' ] , <EOL> eps = <NUM_LIT> , jac = jac_fn ) <EOL> fp3 = fixedpoint_2D ( net , Point ( fps [ <NUM_LIT:2> ] ) , coords = [ '<STR_LIT>' , '<STR_LIT>' ] , <EOL> eps = <NUM_LIT> , jac = jac_fn ) <EOL> plt . figure ( <NUM_LIT:2> ) <EOL> plt . plot ( nullc_E1 [ : , <NUM_LIT:0> ] , nullc_E1 [ : , <NUM_LIT:1> ] , label = '<STR_LIT>' ) <EOL> plt . plot ( nullc_E2 [ : , <NUM_LIT:0> ] , nullc_E2 [ : , <NUM_LIT:1> ] , label = '<STR_LIT>' ) <EOL> plt . legend ( loc = '<STR_LIT>' ) <EOL> plt . title ( '<STR_LIT>' ) <EOL> plt . show ( ) </s>
