NeuroLab
MlNeuron Class Reference

class implementing a Morris-Lecar neuron More...

Inheritance diagram for MlNeuron:

Public Member Functions

 MlNeuron (Time *time, double v0, double theta, double spikeheight, double tau, double v_rest, const string &name="", const string &type="Morris-Lecar Neuron")
 Construct. More...
 
 ~MlNeuron ()
 destruct
 
void calibrate (int isi, int runs, int maxtime, NoiseSource *noises=0)
 Calibrate the neuron. More...
 
virtual string getParameter (const string &name) const
 Get parameter. More...
 
virtual void setParameter (const string &name, const string &value)
 Set parameter. More...
 
int addStimulus (StochasticVariable *integrator)
 add a stimulus More...
 
int addStimulus (StochasticVariable *integrator, double weight)
 add a stimulus More...
 
int addStimulus (StochasticVariable *integrator, double weight, double revpot)
 add a stimulus More...
 
virtual int addStimulus (Synapse *synapse)
 Add a synapse. More...
 
virtual void removeStimulus (int n)
 Remove a stimulus. More...
 
virtual bool hasEvent ()
 Return whether a spike is happening.
 
virtual void prepareNextState ()
 step
 
virtual void proceedToNextState ()
 Proceed one time step. More...
 
- Public Member Functions inherited from StochasticEventGenerator
 StochasticEventGenerator (class Time *time, const string &name="", const string &type="Event Generator")
 Create.
 
virtual ~StochasticEventGenerator ()
 Destroy.
 
virtual uint getEventAmount ()
 The amount of events present.
 
- Public Member Functions inherited from StochasticVariable
 StochasticVariable (class Time *time, const string &name="", const string &type="Stochastic Variable")
 Create.
 
double operator() ()
 Returns the value at the current time step. More...
 
double d ()
 Returns the increment at the current time step. More...
 
- Public Member Functions inherited from StochasticProcess
 StochasticProcess (class Time *time, const string &name="", const string &type="Stochastic")
 Create.
 
virtual ~StochasticProcess ()
 Destroy.
 
bool isNextStatePrepared ()
 Whether.
 
virtual double getIncrement ()
 Returns the increment. More...
 
virtual double getCurrentValue ()
 Returns the value of the process. More...
 
virtual double getNextValue ()
 Returns the next value of the process. More...
 
virtual void setNextValue (double d)
 Set the next value of the process. More...
 
virtual void setCurrentValue (double d)
 Set the current value of the process. More...
 
void setDescription (string s)
 Set stochastic description.
 
virtual void init ()
 Initialise time-dependent values.
 
string getDescription ()
 Get the name. More...
 
- Public Member Functions inherited from Parametric
string getType () const
 Type of object.
 
string getName () const
 Name of object.
 
void setName (const string &name)
 Name of object.
 
string getConfiguration () const
 Returns the configuration of the object. More...
 
string getAllParameters () const
 String with all parameter settings.
 
void addParameter (const string &name)
 Add a parameter. More...
 
void rmParameter (const string &name)
 Remove a parameter. More...
 
- Public Member Functions inherited from TimeDependent
 TimeDependent (class Time *time)
 Construct. More...
 
virtual class TimegetTime () const
 Return pointer to the time object.
 
- Public Member Functions inherited from Physical
 Physical ()
 Construct.
 
 Physical (const Physical &)
 Copy.
 
 Physical (string name)
 Construct.
 
 Physical (string name, string unitPrefix, string unitSymbol)
 Construct.
 
 Physical (string name, Unit unit)
 Construct.
 
virtual string getPhysicalDescription ()
 Returns the physical description. More...
 
virtual string getUnitName ()
 Returns the unit name.
 
virtual string getUnitSymbol ()
 Returns the unit name.
 
virtual void setPhysicalDescription (string name)
 Set the name. Same as setDescription(). More...
 
virtual void setUnit (Unit u)
 Set the unit.
 
virtual void setUnitPrefix (int n)
 Set unit prefix. More...
 
virtual Unit getUnit () const
 Retrieve the unit.
 

Additional Inherited Members

- Protected Member Functions inherited from SpikingNeuron
 SpikingNeuron (Time *time, string name, string type="Spiking Neuron")
 Construct. More...
 
- Protected Member Functions inherited from Neuron
 Neuron (string name, string type)
 Construct. More...
 
- Protected Member Functions inherited from Parametric
 Parametric (const string &name, const string &type)
 Create object of type and name.
 
virtual ~Parametric ()
 Destroy object.
 
- Protected Attributes inherited from StochasticProcess
double stochCurrentValue
 the current value
 
double stochNextValue
 the next value (direct future)
 
bool stochNextStateIsPrepared
 whether prepareNextState() was successful
 
string stochDescription
 the name of the quantity
 

Detailed Description

class implementing a Morris-Lecar neuron

This class implements a Morris-Lecar neuron. The neuron can be used with conductances, synapses or simple stochastic input. Ito and Stratonovitch integrals may be used (use setIto() or setStratonovich() from DifferentialEquation), and can be used as a trigger for ConditionalEstimator. The function is

\[ dV_t = \frac{1}{C} (v_L - V_t) g_L dt + (v_{Ca} - V_t) g_{Ca} M(t) dt + (v_{K} - V_t) g_{K} N(t) dt + ... \]

with

\[M(t) = 1+\exp\left(-2\frac{v_1-V_t}{v_2}\right)\]

\[ dN_t = \left(N_t-1-\exp\left(-2\frac{v_3-V_t}{v_4}\right)\right) \cosh \frac{V-v_3}{2v_4}\]

. $ V_t $ is the membrane voltage, $ C $ is the membrane capacity which is always set to $ 1 \mu F $, $ v_L $ is the leak reversal potential, $ g_{L,K,Ca} $ are peak conductances of the leak, potassium and calcium channel, M(t) and N(t). $ w_i, v_i, dG^i $ are weight, reversal potential and conductance of a stimulating synapse.

Constructor & Destructor Documentation

MlNeuron::MlNeuron ( Time time,
double  v0,
double  theta,
double  spikeheight,
double  tau,
double  v_rest,
const string &  name = "",
const string &  type = "Morris-Lecar Neuron" 
)

Construct.

Default constructor only to be used by derived classes. construct Creates a neuron.

Parameters
timeAddress of global ime object
v0Reset potential
thetaThreshold potential
spikeheightHight of a spike in mV
tauMembrane time constant
v_restResting potential
namename of object
typetype of object, only use this when calling from a deriving class

Member Function Documentation

int MlNeuron::addStimulus ( StochasticVariable integrator)

add a stimulus

This adds a stimulus without a reversal potential, i.e. the value is added purely onto the membrane potential. The variable must have the unit mA * ms.

int MlNeuron::addStimulus ( StochasticVariable integrator,
double  weight 
)

add a stimulus

This adds a stimulus without a reversal potential, but the value is multiplied by the given weight before being added onto the membrane potential. The weight must be a dimensionless scalar, and the integrator must have the unit mA ** ms.

int MlNeuron::addStimulus ( StochasticVariable integrator,
double  weight,
double  revpot 
)

add a stimulus

This adds a stimulus with a reversal potential. The value is multiplied by the given weight and by the distance of the voltage from the reversal potential before being added onto the membrane potential.

virtual int MlNeuron::addStimulus ( Synapse synapse)
virtual

Add a synapse.

Parameters
synapseThe synapse to be added.
Returns
The index of the integrator/integrand added. Use this number if you want to remove the synapse again. This adds a stimulus which is a synapse. The synapse should have the unit mV * mS.

Implements Neuron.

void MlNeuron::calibrate ( int  isi,
int  runs,
int  maxtime,
NoiseSource noises = 0 
)

Calibrate the neuron.

Set the neuron to a specific reponse rate. This is achieved by internally adjusting the threshold. If you do not give a NoiseSource object, all inputs to the neuron must be active for this to work. If the neuron receives passive processes (like correlated noise from a NoiseSource), you must give the address of the NoiseSource object driving them.

Parameters
isiDesired inter-spike interval, given in time steps.
runsNumber of runs used to estimate threshold. 50 is a good compromise.
maxtimeMaximum time for one run to take. 2*isi is a good compromise
noisesAddress of a NoiseSource object.
virtual string MlNeuron::getParameter ( const string &  name) const
virtual

Get parameter.

In a derived class, override this to handle every parameter you implement. If a parameter is described using multiple strings separated by space, this indicates a parameter of a parameter.

Parameters
namename of parameter

Reimplemented from Parametric.

virtual void MlNeuron::proceedToNextState ( )
virtual

Proceed one time step.

This method can be overridden to implement the proceeding of one time step. This makes new information available at the current time. (See also proceedToNextState()). The default just writes stochNextValue into stochCurrentValue.

Reimplemented from StochasticProcess.

virtual void MlNeuron::removeStimulus ( int  n)
virtual

Remove a stimulus.

This removes the nth stimulus from the differential equation

Implements Neuron.

virtual void MlNeuron::setParameter ( const string &  name,
const string &  value 
)
virtual

Set parameter.

Sets the value of a parameter using strings. If a parameter is described using multiple strings separated by space, this indicates a parameter of a parameter.

Parameters
namename of parameter
valuevalue of parameter (used with operator<<)

Reimplemented from Parametric.