Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading for a point neuron with a ‘rate’ parameter is not properly implemented #607

Closed
dhasegan opened this issue May 31, 2021 · 1 comment
Assignees

Comments

@dhasegan
Copy link
Contributor

Describe the bug

@salvadord said:
"[loading] should be as simple as sim.load(json_file) but it seems that loading and instantiating this particular component (a point neuron with a ‘rate’ parameter) is not properly implemented… might be due to some recent changes … can you please add an issue to github and we will check it out… if possible include code or link repo to reproduce the error, thanks"

The code is in NathanKlineInstitute github so might be private:
NathanKlineInstitute/netpyne-STDP#3

Reproducing the bug

The simplified code:

from netpyne import specs, sim
sim.initialize()
data_file = 'data/21may_NetPyNE_project_sim.json'
sim.load(data_file)
simConfig = sim.loadSimCfg(data_file, setLoaded=False)
netParams = sim.loadNetParams(data_file, setLoaded=False)
sim.createSimulateAnalyze()

Setup those mod files:intf7.mod, nsloc.mod, stdp.mod
Download this file and rename to .json:
21may_NetPyNE_project_sim.json.txt

Selected Error:

~/workspace/netpyne-project/venv/lib/python3.7/site-packages/netpyne/sim/wrappers.py in create(netParams, simConfig, output)
     48     sim.initialize(netParams, simConfig)  # create network object and set cfg and net params
     49     pops = sim.net.createPops()                  # instantiate network populations
---> 50     cells = sim.net.createCells()                 # instantiate network cells based on defined populations
     51     conns = sim.net.connectCells()                # create connections between cells based on params
     52     stims = sim.net.addStims()                    # add external stimulation to cells (IClamps etc)
....


~/workspace/netpyne-project/venv/lib/python3.7/site-packages/netpyne/cell/pointCell.py in __init__(self, gid, tags, create, associateGid)
     60 
     61         if create and sim.cfg.createNEURONObj:
---> 62             self.createNEURONObj()  # create cell
     63         if associateGid: self.associateGid() # register cell for this node
     64 

~/workspace/netpyne-project/venv/lib/python3.7/site-packages/netpyne/cell/pointCell.py in createNEURONObj(self)
     83 
     84         # if rate is list with 2 items generate random value from uniform
---> 85         if 'rate' in self.params and isinstance(self.params['rate'], list) and len(self.params['rate']) == 2:
     86             rand = h.Random()
     87             rand.Random123(sim.hashStr('point_rate'), self.gid, sim.cfg.seeds['stim']) # initialize randomizer

Expected behavior

No error and successful loading

System information

  • iOS 11.4
  • netpyne 1.0.0.2
  • NEURON -- VERSION 8.0.0 HEAD (429d11ef) 2021-04-30
  • Python 3.7.9
@dhasegan dhasegan added the bug label May 31, 2021
@dhasegan dhasegan changed the title [Bug report] Loading for a point neuron with a ‘rate’ parameter is not properly implemented May 31, 2021
@vvbragin vvbragin self-assigned this Jun 23, 2022
@vvbragin
Copy link
Collaborator

vvbragin commented Oct 4, 2023

#778

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants