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

BUG: pick_connection() breaks when looking up non-existing connections #514

Closed
ntolley opened this issue Jul 20, 2022 · 0 comments · Fixed by #515
Closed

BUG: pick_connection() breaks when looking up non-existing connections #514

ntolley opened this issue Jul 20, 2022 · 0 comments · Fixed by #515

Comments

@ntolley
Copy link
Contributor

ntolley commented Jul 20, 2022

Found by @chenghuzi in #500. There is a flaw in the logic of pick_connection() where searching connections that don't exist in the Network returns a non-empty list. Easy example to reproduce:

from hnn_core import jones_2009_model, pick_connection
net = jones_2009_model()

src_gids = 'L2_basket'
target_gids = 'L2_basket'
loc = 'proximal'
receptor = 'ampa'
conn_indices = pick_connection(
    net, src_gids=src_gids, target_gids=target_gids, loc=loc, receptor=receptor)

print(conn_indices)
[1, 3, 8, 9, 11, 14, 15]

If you look up these connections they are actually all the ones that contain ampa synapses, which indicates the problem with how pick_connection searches through net.connectivity. Will open a PR to fix soon.

@ntolley ntolley changed the title pick_connection breaks when looking up non-existing connections pick_connection() breaks when looking up non-existing connections Jul 20, 2022
@ntolley ntolley changed the title pick_connection() breaks when looking up non-existing connections BUG: pick_connection() breaks when looking up non-existing connections Jul 20, 2022
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

Successfully merging a pull request may close this issue.

1 participant