From 31d6e90af6b29a157afe1daf7b132f7d21e73c6e Mon Sep 17 00:00:00 2001 From: "Austin E. Soplata" Date: Fri, 18 Oct 2024 13:28:13 -0400 Subject: [PATCH] chore: change fixed L2 names in gui to L2/3 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: https://github.com/jonescompneurolab/hnn-core/issues/904#issue-2589984642 --- hnn_core/gui/gui.py | 5 ++++- hnn_core/viz.py | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hnn_core/gui/gui.py b/hnn_core/gui/gui.py index b091a16f4..3b5c66350 100644 --- a/hnn_core/gui/gui.py +++ b/hnn_core/gui/gui.py @@ -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( @@ -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: diff --git a/hnn_core/viz.py b/hnn_core/viz.py index 45169e9f3..0c5eeb100 100644 --- a/hnn_core/viz.py +++ b/hnn_core/viz.py @@ -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)