NeuroLab
IfNeuron Class Reference

class implementing a simple integrate-and-fire neuron More...

Inheritance diagram for IfNeuron:

Public Member Functions

 IfNeuron (Time *time, double v0, double theta, double spikeheight, double tau, double v_rest, const string &name="", const string &type="Integrate-and-Fire Neuron")
 Construct. More...
 
 ~IfNeuron ()
 destruct
 
void calibrate (int isi, int runs, int maxtime, NoiseSource *noises=0, double increment=1.1, double decrement=0.8)
 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 uint getEventAmount ()
 Retrun the amount of current events.
 
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...
 
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.
 
- 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...
 
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 simple integrate-and-fire neuron

This class implements an integrate-and-fire 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 + \sum_i \frac{1}{C} w_i (v_i - V_t) dG^i_t \]

when conductances are used, or

\[ dV_t = \frac{1}{C} (v_L - V_t) g_L dt + \frac{1}{C} w dG^i_t \]

when currents are used. $ 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 $ is the leak conductance. $ w_i, v_i, dG^i $ are weight, reversal potential and conductance of a stimulating synapse.

Constructor & Destructor Documentation

IfNeuron::IfNeuron ( Time time,
double  v0,
double  theta,
double  spikeheight,
double  tau,
double  v_rest,
const string &  name = "",
const string &  type = "Integrate-and-Fire 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 IfNeuron::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 IfNeuron::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 IfNeuron::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 IfNeuron::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 IfNeuron::calibrate ( int  isi,
int  runs,
int  maxtime,
NoiseSource noises = 0,
double  increment = 1.1,
double  decrement = 0.8 
)

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. 10*isi is a good compromise
noisesAddress of a NoiseSource object.
incrementfactor used for increasing step size when direction is kept
decrementfactor used for decreasing step size when direction is changed
virtual string IfNeuron::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 IfNeuron::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 IfNeuron::removeStimulus ( int  n)
virtual

Remove a stimulus.

This removes the nth stimulus from the differential equation

Implements Neuron.

virtual void IfNeuron::setCurrentValue ( double  d)
inlinevirtual

Set the current value of the process.

This includes both the value of the neuron and the membrane, which is a separate object..

Reimplemented from StochasticProcess.

Here is the call graph for this function:

virtual void IfNeuron::setNextValue ( double  d)
inlinevirtual

Set the next value of the process.

This includes both the value of the neuron and the membrane, which is a separate object..

Reimplemented from StochasticProcess.

Here is the call graph for this function:

virtual void IfNeuron::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.