Playground¶
- class dendrify.playground.Playground[source]¶
A class that creates a graphical user interface for interactively visualizing, exploring, and calibrating dendritic spikes in Dendrify.
Methods:
Initializes the graphical environment, allowing the user to interact with the model by adjusting slider values, neuron parameters, and simulation parameters.
Updates the default model parameters with new values provided by the user.
Updates the default slider parameters with new values provided by the user.
- run(timeit=False)[source]¶
Initializes the graphical environment, allowing the user to interact with the model by adjusting slider values, neuron parameters, and simulation parameters.
- Parameters:
timeit (bool) – If True, prints the time taken to run a simulation.
- set_model_params(user_model_params)[source]¶
Updates the default model parameters with new values provided by the user.
- Parameters:
user_model_params (dict[str, Quantity]) – A dictionary containing the new model parameters. Valid keys are:
'C'
,'gL'
,'EL'
, and'reversal_fall'
. The corresponding values are expected to be in units ofpF
,nS
,mV
, andmV
, respectively.
Examples
>>> playground.set_model_params({'C': 100 * pF, 'gL': 2 * nS, 'EL': -65 * mV})
- set_slider_params(user_slider_params)[source]¶
Updates the default slider parameters with new values provided by the user.
- Parameters:
user_slider_params (dict[str, list]) –
A dictionary containing the new slider parameters. Valid keys are:
'current'
'threshold'
'g_rise'
'g_fall'
'duration_rise'
'duration_fall'
'offset_fall'
'refractory'
'reversal_rise'
The corresponding values must be in the format:
[min value, max value, initial value, step, unit]
. The first four elements are expected to be integers or floats, while the last element must be a Brian2Quantity
.
Examples
>>> playground.set_slider_params({'current': [0, 300, 150, 5, pA], ... 'threshold': [-65, 0, -30, 1.0, mV]})