neurodynex.neuron_type package

Submodules

neurodynex.neuron_type.neurons module

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:

class neurodynex.neuron_type.neurons.NeuronAbstract[source]

Bases: object

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.

get_neuron_type()[source]

Type I or II.

Returns:type as a string “Type I” or “Type II”
run(input_current, simtime)[source]

Runs the neuron for a given current.

Parameters:
  • input_current (TimedArray) – Input current injected into the neuron
  • simtime (Quantity) – Simulation time in correct Brian units.
Returns:

Brian2 StateMonitor with input current (I) and voltage (V) recorded

Return type:

StateMonitor

class neurodynex.neuron_type.neurons.NeuronX

Bases: neurodynex.neuron_type.neurons.NeuronAbstract

class neurodynex.neuron_type.neurons.NeuronY

Bases: neurodynex.neuron_type.neurons.NeuronAbstract

neurodynex.neuron_type.neurons.getting_started()[source]

simple demo to get started

Returns:

neurodynex.neuron_type.neurons.neurontype_random_reassignment()[source]

Randomly reassign the two types: Returns:

neurodynex.neuron_type.neurons.plot_data(state_monitor, title=None, show=True)[source]

Plots a TimedArray for values I, v and w

Parameters:
  • 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
Returns:

Brian2 StateMonitor with input current (I) and

voltage (V) recorded

Return type:

StateMonitor

Module contents