neurodynex.hodgkin_huxley package¶
Submodules¶
neurodynex.hodgkin_huxley.HH module¶
This file implements Hodgkin-Huxley (HH) model. You can inject a step current, sinusoidal current or ramp current into neuron using HH_Step(), HH_Sinus() or HH_Ramp() methods respectively.
Relevant book chapters:
-
neurodynex.hodgkin_huxley.HH.
HH_Neuron
(curr, simtime)[source]¶ Simple Hodgkin-Huxley neuron implemented in Brian2.
Parameters: - curr (TimedArray) – Input current injected into the HH neuron
- simtime (float) – Simulation time [seconds]
Returns: Brian2 StateMonitor with recorded fields [‘vm’, ‘I_e’, ‘m’, ‘n’, ‘h’]
Return type: StateMonitor
-
neurodynex.hodgkin_huxley.HH.
HH_Ramp
(I_tstart=30, I_tend=270, I_amp=20.0, tend=300, dt=0.1, do_plot=True)[source]¶ Run the HH model for a sinusoidal current
Parameters: - tend (float, optional) – the simulation time of the model [ms]
- I_tstart (float, optional) – start of current ramp [ms]
- I_tend (float, optional) – end of the current ramp [ms]
- I_amp (float, optional) – final amplitude of current ramp [uA]
- do_plot (bool, optional) – plot the resulting simulation
Returns: Brian2 StateMonitor with input current (I) and voltage (V) recorded
Return type: StateMonitor
-
neurodynex.hodgkin_huxley.HH.
HH_Sinus
(I_freq=0.01, I_offset=0.5, I_amp=7.0, tend=600, dt=0.1, do_plot=True)[source]¶ Run the HH model for a sinusoidal current
Parameters: - tend (float, optional) – the simulation time of the model [ms]
- I_freq (float, optional) – frequency of current sinusoidal [kHz]
- I_offset (float, optional) – DC offset of current [nA]
- I_amp (float, optional) – amplitude of sinusoidal [nA]
- do_plot (bool, optional) – plot the resulting simulation
Returns: Brian2 StateMonitor with input current (I) and voltage (V) recorded
Return type: StateMonitor
-
neurodynex.hodgkin_huxley.HH.
HH_Step
(I_tstart=20, I_tend=180, I_amp=7, tend=200, do_plot=True)[source]¶ Run the Hodgkin-Huley neuron for a step current input.
Parameters: - I_tstart (float, optional) – start of current step [ms]
- I_tend (float, optional) – start of end step [ms]
- I_amp (float, optional) – amplitude of current step [uA]
- tend (float, optional) – the simulation time of the model [ms]
- do_plot (bool, optional) – plot the resulting simulation
Returns: Brian2 StateMonitor with recorded fields [‘vm’, ‘I_e’, ‘m’, ‘n’, ‘h’]
Return type: StateMonitor