This file implements a type I and a type II model from the abstract base class NeuronAbstract.
You can inject step currents and plot the responses, as well as get firing rates.
Relevant book chapters:
Abstract base class for both neuron types.
This stores its own recorder and network, allowing each neuron to be run several times with changing currents while keeping the same neurogroup object and network internally.
Type I or II.
Returns: type as a string “Type I” or “Type II”
Runs the neuron for a given current.
- input_current (TimedArray) – Input current injected into the neuron
- simtime (Quantity) – Simulation time in correct Brian units.
Brian2 StateMonitor with input current (I) and voltage (V) recorded
simple demo to get started
Randomly reassign the two types: Returns:
plot_data(state_monitor, title=None, show=True)¶
Plots a TimedArray for values I, v and w
- state_monitor (StateMonitor) – the data to plot. expects [“v”, “w”, “I”] and (by default) “t”
- title (string, optional) – plot title to display
- show (bool, optional) – call plt.show for the plot
- Brian2 StateMonitor with input current (I) and
voltage (V) recorded