Beispiel #1
0
def main( args ):
    mooseBegin = time.time()
    cableLength = args['length']
    compNons = args['ncomp']
    compartmentSize = cableLength / compNons
    cable = PasiveCable( args )
    first = 0
    last = args['x']
    table1 = utils.recordTarget('/data/table1', cable.cable[first].mc_, 'vm' )
    table2 = utils.recordTarget('/data/table2', cable.cable[last].mc_, 'vm' )
    records = { 'comp0' : table1, 'comp1' : table2 }
    simTime = args['run_time']
    sim_dt = args['dt']
    outputFile = args['output']

    st = cable.simulate(simTime)
    print("++++ MOOSE took %s sec" % st)
    #utils.plotRecords(records)
    mooseEnds = time.time() - mooseBegin

    #utils.saveRecords(records, outfile="data/moose.dat")
    _profile.insert(simulator = 'moose'
            , no_of_compartment=args['ncomp']
            , coretime = st
            , runtime = mooseEnds
            )
Beispiel #2
0
def main( args ):
    cableLength = args['length']
    compNons = args['ncomp']
    compartmentSize = cableLength / compNons
    cable = PasiveCable( args )
    first = 0
    last = args['x']
    table1 = utils.recordTarget('/data/table1', cable.cable[first].mc_, 'vm' )
    table2 = utils.recordTarget('/data/table2', cable.cable[last].mc_, 'vm' )
    records = { 'comp0' : table1, 'comp1' : table2 }
    simTime = args['run_time']
    sim_dt = args['dt']
    outputFile = args['output']
    st = cable.simulate(simTime)
    print("++++ MOOSE took %s sec" % st)
    #utils.plotRecords(records)
    utils.saveRecords(records, outfile="data/moose.dat")

    stamp = datetime.datetime.now().isoformat()
    with open('moose.log', 'a') as logF:
        logF.write('<simulation time_stamp="{}">\n'.format(stamp))
        logF.write("\t<elements>\n")
        logF.write("\t\t<Compartment>{}</Compartment>\n".format(args['ncomp']))
        logF.write("\t</elements>\n")
        logF.write("\t<times>\n")
        logF.write("\t\t<Simulation>{}</Simulation>\n".format(st))
        logF.write("\t</times>\n")
        logF.write("</simulation>\n")
Beispiel #3
0
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)
    graphviz.writeGraphviz(__file__+".dot", ignore='/library')
Beispiel #4
0
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)
Beispiel #5
0
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.plotTables([table1, table2])
Beispiel #6
0
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
            )
Beispiel #7
0
def main(args):
    cableLength = float(args['length'])
    compNons = int(args['ncomp'])
    compartmentSize = cableLength / compNons
    cable = PasiveCable(args)
    first = 0
    last = int(int(args['x']) / compartmentSize) - 1
    table1 = utils.recordTarget('/data/table1', cable.cable[first].mc_, 'vm')
    table2 = utils.recordTarget('/data/table2', cable.cable[last].mc_, 'vm')

    simTime = args['run_time']
    sim_dt = args['dt']
    outputFile = args['output']

    cable.simulate(simTime, sim_dt)
    utils.plotTables([table1, table2], xscale=sim_dt, file=outputFile)
    utils.saveTables([table1, table2],
                     xscale=sim_dt,
                     file='data/rallpack2_moose.dat')
Beispiel #8
0
def main( args ):
    cableLength = args['length']
    compNons = args['ncomp']
    compartmentSize = cableLength / compNons
    cable = PasiveCable( args )
    first = 0
    last = args['x']
    table1 = utils.recordTarget('/data/table1', cable.cable[first].mc_, 'vm' )
    table2 = utils.recordTarget('/data/table2', cable.cable[last].mc_, 'vm' )

    simTime = args['run_time']
    sim_dt = args['dt']
    outputFile = args['output']

    cable.simulate( simTime, sim_dt )
    utils.saveTables( [table1, table2 ]
            , xscale = sim_dt
            , file = 'data/moose.dat'
            )
Beispiel #9
0
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)