Skip to content

Commit

Permalink
MAINT: Updating dendrite sections using properties loop instead of ha…
Browse files Browse the repository at this point in the history
…rcoded array
  • Loading branch information
kmilo9999 committed Jul 11, 2024
1 parent aeaa93b commit c653d6c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions hnn_core/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c653d6c

Please sign in to comment.