예제 #1
0
    def getGeppettoModel(self, netParams, simConfig):
        sim.create(netParams, simConfig, True)
        sim.gatherData()

        modelInterpreter = NetPyNEModelInterpreter()
        geppettoModel = modelInterpreter.getGeppettoModel(sim)
        sim.analyze()
import time
from netpyne import sim  # import netpyne init module
from neuron import h

simConfig, netParams = sim.readCmdLineArgs('cfg.py', 'netParams.py')
sim.create(simConfig=simConfig, netParams=netParams)

seed = int(time.time() * 1e7) & 0xffffffff
rndm = sim.h.Random()
rndm.Random123(
    sim.rank, 0, 0
)  #initialize with seed as second argument to achieve different results for each run
for TCsoma in [
        x.secs.soma for x in sim.net.cells if x.tags['cellType'] == 'TC'
]:
    TCsoma.hObj.ghbar_iar = rndm.normal(17.5, 0.0008) * 1e-6
    TCsoma.pointps.kleak_0.hObj.gmax = rndm.normal(40, 0.003) * 1e-4

sim.simulate()
sim.analyze()
예제 #3
0
파일: sandbox.py 프로젝트: pgleeson/netpyne
#sim.createSimulateAnalyze(netParams = netParams, simConfig = simConfig)  # create and simulate network
# sim.createSimulate(netParams = netParams, simConfig = simConfig)  # create and simulate network
# sim.saveData()
# sim.loadSimulateAnalyze('mpiHHTut.pkl')
# sim.analysis.plotData()

sim.initialize(netParams = netParams, simConfig = simConfig)
sim.net.createPops()
sim.net.createCells()
sim.net.connectCells()
sim.net.addStims()
sim.setupRecording()

sim.simulate()

sim.analyze()

# ###############################################################################
# # MODIFY and RUN SIM
# ###############################################################################

# sim.net.modifyCells({'conds': {'label': 'PYR2sec'}, 
#                     'secs': {'soma': {'geom': {'L': 100}}}})

# sim.net.modifyConns({'conds': {'label': 'PYR->PYR', 'weight': [0,0.001], 'loc': 0.5},
#                     'postConds': {'popLabel': 'PYR2', 'ynorm': [0.4,0.6]},
#                     'weight': 0.01})

# sim.net.modifyStims({'conds': {'source': 'Input_1', 'label': 'Input_1_PYR', 'dur': [600, 900]}, 
#                     'cellConds': {'popLabel': 'PYR', 'ynorm': [0.0,0.5]},
#                     'delay': 300})