From c653d6cddc2405e79563e9e5ae69587f25343686 Mon Sep 17 00:00:00 2001 From: Camilo Diaz Date: Thu, 11 Jul 2024 14:47:26 -0400 Subject: [PATCH] MAINT: Updating dendrite sections using properties loop instead of harcoded array --- hnn_core/gui/gui.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hnn_core/gui/gui.py b/hnn_core/gui/gui.py index fc539cd04..1cef4af09 100644 --- a/hnn_core/gui/gui.py +++ b/hnn_core/gui/gui.py @@ -1768,10 +1768,9 @@ def _update_geometry_cell_params(net, cell_param_key, param_list): dendrite_cm = cell_params[4].value dendrite_Ra = cell_params[5].value - dendrite_sections = [ - 'apical_trunk', 'apical_1', 'apical_tuft', 'apical_oblique', - 'basal_1', 'basal_2', 'basal_3' - ] + dendrite_sections = [name for name in sections.keys() + if name != 'soma' + ] param_indices = [ (6, 7), (8, 9), (10, 11), (12, 13), (14, 15), (16, 17), (18, 19)] @@ -1888,8 +1887,7 @@ def _update_L5_biophysics_cell_params(net, cell_param_key, param_list): def update_common_dendrite_sections(sections, mechs_params): dendrite_sections = [ - 'apical_trunk', 'apical_1', 'apical_tuft', 'apical_oblique', - 'basal_1', 'basal_2', 'basal_3' + name for name in sections.keys() if name != 'soma' ] for section in dendrite_sections: sections[section].mechs.update(mechs_params)