def dumpPlots(fname): if (os.path.exists(fname)): os.remove(fname) records = {} for x in moose.wildcardFind('/graphs/##[TYPE=Table2]'): records[x.name] = x mu.plotRecords(records, subplot=True, outfile='%s.png' % fname)
def plot(numPlots): global records_ toPlots = list(records_.keys())[0:numPlots] newPlots = {} for i in toPlots: newPlots[i] = records_[i] mu.plotRecords(newPlots, subplot=True)
def dumpPlots( fname ): if ( os.path.exists( fname ) ): os.remove( fname ) records = {} for x in moose.wildcardFind( '/graphs/##[TYPE=Table2]' ): records[x.name] = x mu.plotRecords(records, subplot=True, outfile='%s.png' % fname)
def plot( numPlots ): global records_ toPlots = list(records_.keys())[0:numPlots] newPlots = {} for i in toPlots: newPlots[i] = records_[i] mu.plotRecords(newPlots, subplot = True)
def plots(filter='soma'): global _records global _args toPlot = [] tables = {} for k in _records: if filter in k: toPlot.append(k) for k in toPlot: tables[k] = _records[k] mu.plotRecords(tables, subplot=True) #, outfile=_args.plots) plt.show()
def main(): utils.parser p = os.path.join(modeldir, "two_cells_nml_1.8/two_cells.nml") nml.loadNeuroML_L123(p) # mumbl.loadMumbl("./two_cells_nml_1.8/mumbl.xml") table1 = utils.recordTarget("/tableA", "/cells/purkinjeGroup_0/Dend_37_41", "vm") table2 = utils.recordTarget("/tableB", "/cells/granuleGroup_0/Soma_0", "vm") moose.setClock(0, 5e-6) moose.useClock(0, "/##", "process") moose.useClock(0, "/##", "init") moose.reinit() utils.run(0.1, verify=True) graphviz.writeGraphviz("test_mumble.dot", ignore="/library") utils.plotRecords({"Dend 37": table1, "Soma 0": table2}, outfile="%s.png" % sys.argv[0], subplot=True)
def main(): utils.parser nml.loadNeuroML_L123('./two_cells_nml_1.8/two_cells.nml') #mumbl.loadMumbl("./two_cells_nml_1.8/mumbl.xml") table1 = utils.recordTarget('/tableA', '/cells/purkinjeGroup_0/Dend_37_41', 'vm') table2 = utils.recordTarget('/tableB', '/cells/granuleGroup_0/Soma_0', 'vm') moose.setClock(0, 5e-6) moose.useClock(0, '/##', 'process') moose.useClock(0, '/##', 'init') moose.reinit() utils.run(0.1, verify=True) graphviz.writeGraphviz(__file__+".dot", ignore='/library') utils.plotRecords({ 'Dend 37' : table1, 'Soma 0' : table2 } , outfile = '%s.png' % sys.argv[0] , subplot = True )
def main(args): global cable dt = args['dt'] makeCable(args) setupDUT(dt) table0 = recordAt( '/table0', cable[0], 'Vm') table1 = recordAt( '/table1', cable[-1], 'Vm') st = simulate( args['run_time'], dt ) _profile.insert( simulator='moose' , no_of_compartment=args['ncomp'] , coretime=st ) if args['output']: print("Plotting data") utils.plotRecords({ 'table0' : table0, 'table1' : table1 } , outfile = args['output'] , title = 'MOOSE' )
def main(): utils.parser nml.loadNeuroML_L123('./two_cells_nml_1.8/two_cells.nml') #mumbl.loadMumbl("./two_cells_nml_1.8/mumbl.xml") table1 = utils.recordTarget('/tableA', '/cells/purkinjeGroup_0/Dend_37_41', 'vm') table2 = utils.recordTarget('/tableB', '/cells/granuleGroup_0/Soma_0', 'vm') moose.setClock(0, 5e-6) moose.useClock(0, '/##', 'process') moose.useClock(0, '/##', 'init') moose.reinit() utils.run(0.1, verify=True) graphviz.writeGraphviz(__file__ + ".dot", ignore='/library') utils.plotRecords({ 'Dend 37': table1, 'Soma 0': table2 }, outfile='%s.png' % sys.argv[0], subplot=True)
t = moose.Table2("/table%s" % m) tables[m] = t moose.connect(t, 'requestOut', pools[m], 'getConc') #pools['ca'] = moose.BufPool('/compt/ca') pools['ca'].nInit = 20 r_p0_p1 = moose.Reac('/compt/reacA') funA = moose.Function('/compt/funA') funA.expr = "{0}*(y0/{1})^6/(1+(y0/{1})^3)^2".format("1.5", "0.7e-3") moose.connect(funA, 'requestOut', pools['ca'], 'getConc') moose.connect(funA, 'valueOut', pools['S1'], 'setConc') moose.connect(r_p0_p1, 'sub', pools['S'], 'reac') moose.connect(r_p0_p1, 'prd', pools['S1'], 'reac') r_p1_up = moose.Reac('/compt/reacB') moose.connect(r_p1_up, 'sub', pools['S1'], 'reac') moose.connect(r_p1_up, 'prd', pools['Sp'], 'reac') # Disabling solver executes the model accurately. k = moose.Ksolve('/compt/ksolve') s = moose.Stoich('/compt/stoich') s.compartment = compt s.ksolve = k s.path = '/compt/##' moose.reinit() moose.start(10) mu.plotRecords(tables)