<s> """<STR_LIT>""" <EOL> from __future__ import division <EOL> from PyDSTool import * <EOL> from common_lib import * <EOL> ts = linspace ( <NUM_LIT:0> , <NUM_LIT:100> , <NUM_LIT> ) <EOL> ps = <NUM_LIT> * np . sin ( <NUM_LIT:0.1> * ts ) <EOL> ps = asarray ( ps > <NUM_LIT:0> , int ) * ps <EOL> input_pts = Pointset ( coorddict = { '<STR_LIT:P>' : ps } , indepvararray = ts ) <EOL> input_signal = pointset_to_traj ( input_pts ) <EOL> DSargs = args ( ) <EOL> DSargs . name = '<STR_LIT>' <EOL> DSargs . inputs = { '<STR_LIT:P>' : input_signal . variables [ '<STR_LIT:P>' ] } <EOL> DSargs . ics = { '<STR_LIT:R>' : <NUM_LIT:0.1> } <EOL> DSargs . pars = { '<STR_LIT>' : <NUM_LIT:15> } <EOL> DSargs . fnspecs = { '<STR_LIT:S>' : thresh_Naka_Rushton_fndef ( N = <NUM_LIT:2> , half_on = <NUM_LIT> , max_val = <NUM_LIT:100> ) } <EOL> DSargs . tdata = [ <NUM_LIT:0> , <NUM_LIT:100> ] <EOL> DSargs . varspecs = { '<STR_LIT:R>' : '<STR_LIT>' } <EOL> DS = Generator . Vode_ODEsystem ( DSargs ) <EOL> traj = DS . compute ( '<STR_LIT:test>' ) <EOL> pts = traj . sample ( ) <EOL> plt . plot ( pts [ '<STR_LIT:t>' ] , pts [ '<STR_LIT:R>' ] , '<STR_LIT:k>' , label = '<STR_LIT:R>' ) <EOL> plt . plot ( ts , ps , '<STR_LIT:g>' , label = '<STR_LIT:P>' ) <EOL> plt . legend ( loc = '<STR_LIT>' ) <EOL> plt . show ( ) </s>
