From 11867d4bf45869776761dc0748c005cfa9d29d11 Mon Sep 17 00:00:00 2001 From: Nick Tolley Date: Mon, 18 Jul 2022 12:54:28 +0200 Subject: [PATCH] Remove hard coded section locations in network_builder --- hnn_core/network_builder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hnn_core/network_builder.py b/hnn_core/network_builder.py index 54e0c5d86e..9ddb351850 100644 --- a/hnn_core/network_builder.py +++ b/hnn_core/network_builder.py @@ -495,9 +495,11 @@ def _connect_celltypes(self): # get synapse locations syn_keys = list() - if loc in ['proximal', 'distal']: + # Targeting group of sections like proximal or distal + if loc in target_cell.sect_loc: for sect in target_cell.sect_loc[loc]: syn_keys.append(f'{sect}_{receptor}') + # Targeting individual section like soma or apical_tuft else: syn_keys = [f'{loc}_{receptor}']