Tutorial 1
In this tutorial, I show you building a Hodgkin-Huxley point neuron in PyGENESIS.
Let's start by creating a leaky soma with no channel currents.
Then you can introduce some custom channel currents into it.
Specification of the channel currents are done as below.
Gates are usually described in terms of alpha and beta functions. In PyGENESIS, you specify alpha and beta functions by filling the five slots(A,B,C,D,F) of the following equation,
(alpha, beta) = (A + B * Vm)/(C + exp((Vm + D) / F))
This is the convention adopted from setupalpha function of GENESIS 2.
Tutorial 2
I explain here a way to study the internals of PyGENESIS objects.
An equation system a class represents is stored in 'template_str' attribute. Equation and variable substitutions take place following this template string. The evolution of the equation system following substitutions can be traced through with 'equation_str' attribute.
A function's behavior can be better understood with a plain plot over a given input values. Below is such a visualization of the alpha, beta and differential function of gate n.
With simple math, you can turn alpha and beta functions into noo and tau functions of the gate.
Tutorial 3
You will learn here a way to plot the behavior of a neuron over a given time range.
The codes above will give you a resting neuron with a brief fluctuation in membrane potential at the start because of imperfect precision in initializing values.
The setProtocol method configures the equations of the system. I am simulating a current clamp experiment with the above script.
Tutorial 4
A direct and intuitive interface to GENESIS is a main goal of this project.
The method addModel() creates a dict containing arguments necessary to generate GENESIS 3 scripts in NDF file format. The dict structure actually is meant for a more direct YAML interface to GENESIS 3 which will be available soon.
The method run() converts the above dict into an NDF string and saves it into the file specified at the object initialization - 'standalone.ndf'. This method is supposed to more directly 'run' this model on GENESIS 3 on fly, but this feature is not yet available by present.
|