"One other question. Ideally I’d like to be able to run the model for ~10 seconds to let it come to steady state, then save that state and run a number of simulations with different parameters from that point in time. What’s the best way to do this?
I had written some code that essentially boils down to
Code: Select all
netParams = specs.NetParams()
simConfig = specs.SimConfig()
if firstrun:
{do a bunch of stuff to set up simulation}
simConfig.filename = 'sim_data'
else:
sim.load(‘sim_data.pkl’)
sim.simulate()
sim.analyze()
sim.gatherData()
sim.saveData()
However, its giving me this error on the second run (ie when it’s trying to load sim_data.pkl):
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "absence.py", line 88, in <module>
sim.load('sim_data.pkl')
File "C:\ProgramData\Anaconda2\lib\site-packages\netpyne\wrappers.py", line 82, in load
sim.loadAll(filename)
File "C:\ProgramData\Anaconda2\lib\site-packages\netpyne\simFuncs.py", line 244, in loadAll
loadNet(filename, data=data)
File "C:\ProgramData\Anaconda2\lib\site-packages\netpyne\simFuncs.py", line 187, in loadNet
cell.createNEURONObj(prop) # use same syntax as when creating based on high-level specs
File "C:\ProgramData\Anaconda2\lib\site-packages\netpyne\cell.py", line 451, in createNEURONObj
setattr(sec['pointps'][pointpName]['hPointp'], pointpParamName, pointpParamValue)
LookupError: 'hPointp' is not a defined hoc variable name.
I wasn’t sure whether this was a bug, something specific that I’m doing wrong, or a more general misunderstanding of how load and save are supposed to be used.
Also, I thought about posting to the board, but then I couldn’t remember my login and it just became too much work…
Thanks,
Andrew"