hnn_core.gui.HNNGUI

class hnn_core.gui.HNNGUI(theme_color='#8A2BE2', total_height=800, total_width=1300, header_height=50, button_height=30, operation_box_height=60, drive_widget_width=200, left_sidebar_width=576, log_window_height=150, status_height=30, dpi=96)[source]

HNN GUI class

Parameters
theme_colorstr

The theme color of the whole dashboard.

total_heightint

The height of the GUI (in pixel, same for all following parameters).

total_widthint

The width of the GUI.

header_heightint

The height of the header.

button_heightint

The height of buttons.

operation_box_heightint

The operation_box_height of operations box.

drive_widget_widthint

The width of GUI drive box.

left_sidebar_widthint

The width of left sidebad.

log_window_heightint

The height of logging window.

status_heightint

The height of status bar.

dpiint

The screen dpi.

Attributes
layoutdict

The styling configuration of GUI.

paramsdict

The parameters to use for constructing the network.

simulation_datadict

Simulation related objects, such as net and dpls.

widget_tstopWidget

Simulation stop time widget.

widget_dtWidget

Simulation step size widget.

widget_ntrialsWidget

Widget that controls the number of trials in a single simulation.

widget_backend_selectionWidget

Widget that selects the backend used in simulations.

widget_viz_layout_selectionWidget

Widget that selects the layout of visualization window.

widget_mpi_cmdWidget

Widget that specify the mpi command to use when the backend is MPIBackend.

widget_n_jobsWidget

Widget that specify the cores in multi-trial simulations.

widget_drive_type_selectionWidget

Widget that is used to select the drive to be added to the network.

widget_location_selectionWidget.

Widget that specifies the location of network drives. Could be proximal or distal.

add_drive_buttonWidget

Clickable widget that is used to add a drive to the network.

run_buttonWidget

Clickable widget that triggers simulation.

load_buttonWidget

Clickable widget that receives uploaded parameter files.

delete_drive_buttonWidget

Clickable widget that clear all existing network drives.

plot_outputs_dictlist

A list of visualization panel outputs.

plot_dropdown_types_dictlist

A list of dropdown menus that control the plot types in plot_outputs_dict.

drive_widgetslist

A list of network drive widgets added by add_drive_button.

drive_boxeslist

A list of network drive layouts.

connectivity_textfieldslist

A list of boxes that control the weight and probability of connections in the network.

Methods

capture([width, height, extra_margin, render])

Take a screenshot of the current GUI.

compose([return_layout])

Compose widgets.

load_parameters([params_fname])

Read parameters from file.

run_notebook_cells()

Run all but the last cells sequentially in a Jupyter notebook.

add_logging_window_logger

show

property analysis_config

Provides everything viz window needs except for the data.

capture(width=None, height=None, extra_margin=100, render=True)[source]

Take a screenshot of the current GUI.

Parameters
widthint | None

The width of iframe window use to show the snapshot.

heightint | None

The height of iframe window use to show the snapshot.

extra_margin: int

Extra margin in pixel for the GUI.

renderbool

Will return an IFrame object if False

Returns
snapshotAn iframe snapshot object that can be rendered in notebooks.
compose(return_layout=True)[source]

Compose widgets.

Parameters
return_layoutbool

If the method returns the layout object which can be rendered by IPython.display.display() method.

property data

Provides easy access to simulation-related data.

static load_parameters(params_fname=None)[source]

Read parameters from file.

run_notebook_cells()[source]

Run all but the last cells sequentially in a Jupyter notebook.

To properly use this function:
  1. Put this into the penultimate cell.

  2. init the HNNGUI in a single cell.

  3. Hit ‘run all’ button to run the whole notebook and it will selectively run twice.