Skip to content

Commit

Permalink
chore: change fixed L2 names in gui to L2/3
Browse files Browse the repository at this point in the history
Note that this does not change the L2 names inherent in the `cell_types`
which are loaded dynamically in the gui, such as shown here:
#904 (comment)
  • Loading branch information
asoplata authored and gtdang committed Oct 22, 2024
1 parent 8643a04 commit 31d6e90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion hnn_core/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def __init__(self, theme_color="#802989",
button_color=self.layout['theme_color'])

self.cell_type_radio_buttons = RadioButtons(
options=['L2 Pyramidal', 'L5 Pyramidal'],
options=['L2/3 Pyramidal', 'L5 Pyramidal'],
description='Cell type:')

self.cell_layer_radio_buttons = RadioButtons(
Expand Down Expand Up @@ -1974,6 +1974,9 @@ def _update_cell_params_vbox(cell_type_out, cell_parameters_list,
if cell_layer in ['Biophysics', 'Geometry']:
cell_parameters_key += f" {cell_type.split(' ')[0]}"

# Needed for the button to display L2/3, but the underlying data to use L2
cell_parameters_key = cell_parameters_key.replace("L2/3", "L2")

if cell_parameters_key in cell_parameters_list:
cell_type_out.clear_output()
with cell_type_out:
Expand Down
4 changes: 3 additions & 1 deletion hnn_core/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ def plot_dipole(dpl, tmin=None, tmax=None, ax=None, layer='agg', decim=None,
r'$\times$ {:.0f})'.format(scale_applied)
ax.set_ylabel(ylabel, multialignment='center')
if layer == 'agg':
title_str = 'Aggregate (L2 + L5)'
title_str = 'Aggregate (L2/3 + L5)'
elif layer == 'L2':
title_str = 'L2/3'
else:
title_str = layer
ax.set_title(title_str)
Expand Down

0 comments on commit 31d6e90

Please sign in to comment.