odynn.models.celeg module¶
-
class
odynn.models.celeg.
CElegansNeuron
(init_p=None, tensors=False, dt=0.1)[source]¶ Bases:
odynn.models.model.BioNeuron
Full Hodgkin-Huxley Model implemented for C. elegans
Attributes: init_state
ndarray, Initial state vector
num
int, Number of neurons being modeled in this object
- parameter_names
Methods
calculate
(i_inj)Simulate the neuron with input current i_inj and return the state vectors get_random
()Returns a dictionnary of random parameters parallelize
(n)Add a dimension of size n in the initial parameters and initial state plot_output
(ts, i_inj, states[, y_states, …])Plot voltage and ion concentrations, potentially compared to a target model plot_results
(ts, i_inj_values, results[, …])plot all dynamics plot_vars
(var_dic[, suffix, show, save, func])plot variation/comparison/boxplots of all variables organized by categories plot_vars_gate
(name, mdp, scale, tau, fig, …)plot the gates variables step
(X, i_inj)Integrate and update state variable (voltage and possibly others) after one time step boxplot_vars study_vars -
REST_CA
= 0.0¶
-
default_init_state
= array([-6.0e+01, 0.0e+00, 9.5e-01, 0.0e+00, 0.0e+00, 1.0e+00, 1.0e-07])¶ initial state for neurons – voltage, rates and $[Ca^{2+}]$
-
default_params
= {'C_m': 20.0, 'E_Ca': 20.0, 'E_K': -60.0, 'E_L': -60.0, 'decay_ca': 110.0, 'e__mdp': -3.36, 'e__scale': 6.75, 'e__tau': 10.0, 'f__mdp': 25.2, 'f__scale': -5.03, 'f__tau': 151.0, 'g_Ca': 3.0, 'g_Kf': 0.07, 'g_Ks': 10.0, 'g_L': 0.005, 'h__alpha': 0.282, 'h__mdp': 6.42, 'h__scale': -1.0, 'n__mdp': 19.9, 'n__scale': 15.9, 'n__tau': 25.0, 'p__mdp': -8.05, 'p__scale': 7.43, 'p__tau': 100.0, 'q__mdp': -15.6, 'q__scale': -9.97, 'q__tau': 150.0, 'rho_ca': 0.23}¶ default parameters as a dictionnary
-
plot_results
(ts, i_inj_values, results, ca_true=None, suffix='', show=True, save=False)[source]¶ plot all dynamics
Parameters: - ts –
- i_inj_values –
- results –
- ca_true – (Default value = None)
- suffix – (Default value = “”)
- show (bool) – If True, show the figure (Default value = True)
- save (bool) – If True, save the figure (Default value = False)
Returns:
-
classmethod
plot_vars
(var_dic, suffix='evolution', show=False, save=True, func=<function plot>)[source]¶ plot variation/comparison/boxplots of all variables organized by categories
Parameters: - var_dic –
- suffix – (Default value = “”)
- show (bool) – If True, show the figure (Default value = True)
- save (bool) – If True, save the figure (Default value = False)
- func – (Default value = plot)
Returns:
-
static
plot_vars_gate
(name, mdp, scale, tau, fig, pos, labs, func=<function plot>)[source]¶ plot the gates variables
Parameters: - name –
- mdp –
- scale –
- tau –
- fig –
- pos –
- labs –
- func – (Default value = plot)
Returns: