From 80822a444fdbcf5812d31fade28c230a2297f916 Mon Sep 17 00:00:00 2001 From: WeinaJi Date: Mon, 9 Oct 2023 11:17:47 +0200 Subject: [PATCH] [BBPBGLIB-1042] GapJunctionManager: filter source target by population (#42) ## Context Currently neurodamus raises an error when the connection source or target `node_set` from multiple populations. Users should use single-population `node_sets` in `connection_overrides`. This also happens for `GapJunctionManager` when we have a multi-pop `node_set` for the simulation (`circut_target`). This PR fixes that by limiting "_src_target_filter" from the gap junction's source population so that it belongs to a single population. ## Scope Change in class `GapJunctionManager:__init__` ## Testing Existing test ## Review * [x] PR description is complete * [x] Coding style (imports, function length, New functions, classes or files) are good * [ ] Unit/Scientific test added * [ ] Updated Readme, in-code, developer documentation --------- Co-authored-by: Fernando Pereira --- neurodamus/gap_junction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neurodamus/gap_junction.py b/neurodamus/gap_junction.py index 314568b1..c1ac8bf0 100644 --- a/neurodamus/gap_junction.py +++ b/neurodamus/gap_junction.py @@ -86,7 +86,8 @@ def __init__(self, gj_conf, target_manager, cell_manager, src_cell_manager=None, raise ConfigurationError("Missing GapJunction 'Path' configuration") super().__init__(gj_conf, target_manager, cell_manager, src_cell_manager, **kw) - self._src_target_filter = target_manager.get_target(cell_manager.circuit_target) + self._src_target_filter = target_manager.get_target(cell_manager.circuit_target, + src_cell_manager.population_name) def open_synapse_file(self, synapse_file, *args, **kw): super().open_synapse_file(synapse_file, *args, **kw)