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

PyNN microcircuit plotting issue #4

Open
neworderofjamie opened this issue Feb 6, 2018 · 0 comments
Open

PyNN microcircuit plotting issue #4

neworderofjamie opened this issue Feb 6, 2018 · 0 comments

Comments

@neworderofjamie
Copy link

Hello again :)

I found another issue with this model (quite possibly already fixed by @apdavison) - the plotting code calculates the rates based on the wrong population sizes. This is due to the order n_rec is accessed in in plotting.py being different to the order it is created in microcircuit.py (pretty sure, at least in Python 2.7, the order items of a dictionary are iterated in is implementation-dependent).

My fix is as follows (sorry, cba to fork and do this properly):

In microcircuit.py

from six import iteritems
....
n_rec = {layer : {pop : round(n * N_scaling * frac_record_spikes) for pop, n in iteritems(pops)}
             for layer, pops in iteritems(N_full)}

Then in plotting.py:

num_pop_rec = n_rec[layer_list[layer]][pop_list[pop]]

Cheers

Jamie

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

No branches or pull requests

1 participant