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

Source of spikes from multicomp cell is ~random segment if none named 'soma' #246

Closed
pgleeson opened this issue Jul 25, 2017 · 2 comments
Closed
Assignees

Comments

@pgleeson
Copy link
Collaborator

This code in associateGid() for placing a NetConn which will be the source of spikes for that cell's gid:

 sec = self.secs['soma'] if 'soma' in self.secs else self.secs[self.secs.keys()[0]] # use soma if exists, otherwise 1st section

will try to select the 'first' section if there is none called 'soma'. However there is no guarantee that the key returned by self.secs.keys()[0] will be for the root section, it depends how the cell was created and how the list ordering is handled.

It might be better to look through self.secs to find the section which has no parent (topol = {}) and use this:

 for s in self.secs:
     if len(self.secs[s]['topol'])==0: # i.e. no parent 
          sec = self.secs[s]

Thoughts @salvadord?

@salvadord
Copy link
Collaborator

yes! thats a great idea, thanks, I'll modify

@pgleeson
Copy link
Collaborator Author

Thanks.

cc @andrisecker

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