MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
moose::AdThreshIF Class Reference

#include <AdThreshIF.h>

+ Inheritance diagram for moose::AdThreshIF:
+ Collaboration diagram for moose::AdThreshIF:

Public Member Functions

 AdThreshIF ()
 
double getA0 (const Eref &e) const
 
double getTauThresh (const Eref &e) const
 
double getThreshAdaptive (const Eref &e) const
 
double getThreshJump (const Eref &e) const
 
void setA0 (const Eref &e, double val)
 
void setTauThresh (const Eref &e, double val)
 
void setThreshAdaptive (const Eref &e, double val)
 
void setThreshJump (const Eref &e, double val)
 
void vProcess (const Eref &e, ProcPtr p)
 
void vReinit (const Eref &e, ProcPtr p)
 
virtual ~AdThreshIF ()
 
- Public Member Functions inherited from moose::IntFireBase
void activation (double val)
 
double getLastEventTime (const Eref &e) const
 
double getRefractoryPeriod (const Eref &e) const
 
double getThresh (const Eref &e) const
 
double getVReset (const Eref &e) const
 
bool hasFired (const Eref &e) const
 
 IntFireBase ()
 
void setRefractoryPeriod (const Eref &e, double val)
 
void setThresh (const Eref &e, double val)
 
void setVReset (const Eref &e, double val)
 
virtual ~IntFireBase ()
 
- Public Member Functions inherited from moose::Compartment
void cable ()
 
 Compartment ()
 
virtual double vGetCm (const Eref &e) const
 
virtual double vGetEm (const Eref &e) const
 
virtual double vGetIm (const Eref &e) const
 
virtual double vGetInitVm (const Eref &e) const
 
virtual double vGetInject (const Eref &e) const
 
virtual double vGetRa (const Eref &e) const
 
virtual double vGetRm (const Eref &e) const
 
virtual double vGetVm (const Eref &e) const
 
void vHandleAxial (double Vm)
 
void vHandleChannel (const Eref &e, double Gk, double Ek)
 
void vHandleRaxial (double Ra, double Vm)
 
void vInitProc (const Eref &e, ProcPtr p)
 
void vInitReinit (const Eref &e, ProcPtr p)
 
void vInjectMsg (const Eref &e, double current)
 
void vRandInject (const Eref &e, double prob, double current)
 
virtual void vSetCm (const Eref &e, double Cm)
 
virtual void vSetEm (const Eref &e, double Em)
 
virtual void vSetInitVm (const Eref &e, double initVm)
 
virtual void vSetInject (const Eref &e, double Inject)
 
virtual void vSetRa (const Eref &e, double Ra)
 
virtual void vSetRm (const Eref &e, double Rm)
 
virtual void vSetVm (const Eref &e, double Vm)
 
virtual ~Compartment ()
 
- Public Member Functions inherited from moose::CompartmentBase
void cable ()
 
 CompartmentBase ()
 
void displace (double dx, double dy, double dz)
 Displaces compartment by specified distance vector. More...
 
double getCm (const Eref &e) const
 
double getDiameter () const
 
double getEm (const Eref &e) const
 
double getIm (const Eref &e) const
 
double getInitVm (const Eref &e) const
 
double getInject (const Eref &e) const
 
double getLength () const
 
double getRa (const Eref &e) const
 
double getRm (const Eref &e) const
 
double getVm (const Eref &e) const
 
double getX () const
 
double getX0 () const
 
double getY () const
 
double getY0 () const
 
double getZ () const
 
double getZ0 () const
 
void handleAxial (double Vm)
 
void handleChannel (const Eref &e, double Gk, double Ek)
 
void handleRaxial (double Ra, double Vm)
 
void initProc (const Eref &e, ProcPtr p)
 
void initReinit (const Eref &e, ProcPtr p)
 
void injectMsg (const Eref &e, double current)
 
void process (const Eref &e, ProcPtr p)
 
void randInject (const Eref &e, double prob, double current)
 
bool rangeWarning (const string &field, double value)
 
void reinit (const Eref &e, ProcPtr p)
 
void setCm (const Eref &e, double Cm)
 
void setDiameter (double diameter)
 
void setEm (const Eref &e, double Em)
 
void setGeomAndElec (const Eref &e, double length, double dia)
 Scales electrical values along with setting length, dia. More...
 
void setInitVm (const Eref &e, double initVm)
 
void setInject (const Eref &e, double Inject)
 
void setLength (double length)
 
void setRa (const Eref &e, double Ra)
 
void setRm (const Eref &e, double Rm)
 
void setVm (const Eref &e, double Vm)
 
void setX (double value)
 
void setX0 (double value)
 
void setY (double value)
 
void setY0 (double value)
 
void setZ (double value)
 
void setZ0 (double value)
 
void updateLength ()
 
virtual void vSetSolver (const Eref &e, Id hsolve)
 
virtual ~CompartmentBase ()
 

Static Public Member Functions

static const CinfoinitCinfo ()
 
- Static Public Member Functions inherited from moose::IntFireBase
static const CinfoinitCinfo ()
 
static SrcFinfo1< double > * spikeOut ()
 Message src for outgoing spikes. More...
 
- Static Public Member Functions inherited from moose::Compartment
static const CinfoinitCinfo ()
 
- Static Public Member Functions inherited from moose::CompartmentBase
static const CinfoinitCinfo ()
 
static SrcFinfo1< double > * VmOut ()
 
static void zombify (Element *orig, const Cinfo *zClass, Id hsolve)
 

Private Attributes

double a0_
 
double tauThresh_
 
double threshAdaptive_
 
double threshJump_
 

Additional Inherited Members

- Protected Attributes inherited from moose::IntFireBase
double activation_
 
bool fired_
 
double lastEvent_
 
double refractT_
 
double threshold_
 
double vReset_
 
- Protected Attributes inherited from moose::Compartment
double A_
 
double B_
 
double Cm_
 
double Em_
 
double Im_
 
double initVm_
 
double inject_
 
double lastIm_
 
double Ra_
 
double Rm_
 
double sumInject_
 
double Vm_
 

Detailed Description

The IntFire class sets up an integrate-and-fire compartment.

Definition at line 19 of file AdThreshIF.h.

Constructor & Destructor Documentation

AdThreshIF::AdThreshIF ( )

Definition at line 89 of file AdThreshIF.cpp.

References a0_, tauThresh_, threshAdaptive_, and threshJump_.

90 {threshAdaptive_ = 0.0;
91 tauThresh_ = 1.0;
92 a0_ = 0.0;
93 threshJump_ = 0.0;}
double threshAdaptive_
Definition: AdThreshIF.h:51
double threshJump_
Definition: AdThreshIF.h:54
AdThreshIF::~AdThreshIF ( )
virtual

Definition at line 95 of file AdThreshIF.cpp.

96 {;}

Member Function Documentation

double AdThreshIF::getA0 ( const Eref e) const

Definition at line 168 of file AdThreshIF.cpp.

References a0_.

Referenced by initCinfo().

169 {
170  return a0_;
171 }

+ Here is the caller graph for this function:

double AdThreshIF::getTauThresh ( const Eref e) const

Definition at line 158 of file AdThreshIF.cpp.

References tauThresh_.

Referenced by initCinfo().

159 {
160  return tauThresh_;
161 }

+ Here is the caller graph for this function:

double AdThreshIF::getThreshAdaptive ( const Eref e) const

Definition at line 148 of file AdThreshIF.cpp.

References threshAdaptive_.

Referenced by initCinfo().

149 {
150  return threshAdaptive_;
151 }
double threshAdaptive_
Definition: AdThreshIF.h:51

+ Here is the caller graph for this function:

double AdThreshIF::getThreshJump ( const Eref e) const

Definition at line 178 of file AdThreshIF.cpp.

References threshJump_.

Referenced by initCinfo().

179 {
180  return threshJump_;
181 }
double threshJump_
Definition: AdThreshIF.h:54

+ Here is the caller graph for this function:

const Cinfo * AdThreshIF::initCinfo ( )
static

Initializes the class info.

Definition at line 19 of file AdThreshIF.cpp.

References AdThreshIFCinfo, getA0(), getTauThresh(), getThreshAdaptive(), getThreshJump(), moose::IntFireBase::initCinfo(), setA0(), setTauThresh(), setThreshAdaptive(), and setThreshJump().

20 {
21  static string doc[] =
22  {
23  "Name", "AdThreshIF",
24  "Author", "Aditya Gilra",
25  "Description", "Leaky Integrate-and-Fire neuron with adaptive threshold."
26  "Based on Rossant, C., Goodman, D.F.M., Platkiewicz, J., and Brette, R. (2010)."
27  "Rm*Cm * dVm/dt = -(Vm-Em) + Rm*I"
28  "tauThresh * d threshAdaptive / dt = a0*(Vm-Em) - threshAdaptive "
29  "at each spike, threshAdaptive is increased by threshJump "
30  "the spiking threshold adapts as thresh + threshAdaptive "
31  };
32 
33  static ElementValueFinfo< AdThreshIF, double > threshAdaptive(
34  "threshAdaptive",
35  "adaptative part of the threshold that decays with time constant tauThresh",
38  );
39 
41  "tauThresh",
42  "time constant of adaptative part of the threshold",
45  );
46 
48  "a0",
49  "factor for voltage-dependent term in evolution of adaptative threshold: "
50  "tauThresh * d threshAdaptive / dt = a0*(Vm-Em) - threshAdaptive ",
53  );
54 
56  "threshJump",
57  "threshJump is added to threshAdaptive on each spike",
60  );
61 
62  static Finfo* AdThreshIFFinfos[] = {
63  &threshAdaptive,// Value
64  &tauThresh, // Value
65  &a0, // Value
66  &threshJump // Value
67  };
68 
69  static Dinfo< AdThreshIF > dinfo;
70  static Cinfo AdThreshIFCinfo(
71  "AdThreshIF",
73  AdThreshIFFinfos,
74  sizeof( AdThreshIFFinfos ) / sizeof (Finfo*),
75  &dinfo,
76  doc,
77  sizeof(doc)/sizeof(string)
78  );
79 
80  return &AdThreshIFCinfo;
81 }
double getA0(const Eref &e) const
Definition: AdThreshIF.cpp:168
Definition: Dinfo.h:60
void setA0(const Eref &e, double val)
Definition: AdThreshIF.cpp:163
double getTauThresh(const Eref &e) const
Definition: AdThreshIF.cpp:158
void setTauThresh(const Eref &e, double val)
Definition: AdThreshIF.cpp:153
void setThreshAdaptive(const Eref &e, double val)
Definition: AdThreshIF.cpp:143
double getThreshJump(const Eref &e) const
Definition: AdThreshIF.cpp:178
double getThreshAdaptive(const Eref &e) const
Definition: AdThreshIF.cpp:148
static const Cinfo * initCinfo()
Definition: IntFireBase.cpp:27
static const Cinfo * AdThreshIFCinfo
Definition: AdThreshIF.cpp:83
Definition: Cinfo.h:18
void setThreshJump(const Eref &e, double val)
Definition: AdThreshIF.cpp:173
Definition: Finfo.h:12

+ Here is the call graph for this function:

void AdThreshIF::setA0 ( const Eref e,
double  val 
)

Definition at line 163 of file AdThreshIF.cpp.

References a0_.

Referenced by initCinfo().

164 {
165  a0_ = val;
166 }

+ Here is the caller graph for this function:

void AdThreshIF::setTauThresh ( const Eref e,
double  val 
)

Definition at line 153 of file AdThreshIF.cpp.

References tauThresh_.

Referenced by initCinfo().

154 {
155  tauThresh_ = val;
156 }

+ Here is the caller graph for this function:

void AdThreshIF::setThreshAdaptive ( const Eref e,
double  val 
)

Definition at line 143 of file AdThreshIF.cpp.

References threshAdaptive_.

Referenced by initCinfo().

144 {
145  threshAdaptive_ = val;
146 }
double threshAdaptive_
Definition: AdThreshIF.h:51

+ Here is the caller graph for this function:

void AdThreshIF::setThreshJump ( const Eref e,
double  val 
)

Definition at line 173 of file AdThreshIF.cpp.

References threshJump_.

Referenced by initCinfo().

174 {
175  threshJump_ = val;
176 }
double threshJump_
Definition: AdThreshIF.h:54

+ Here is the caller graph for this function:

void AdThreshIF::vProcess ( const Eref e,
ProcPtr  p 
)
virtual

The process function does the object updating and sends out messages to channels, nernsts, and so on.

Implements moose::IntFireBase.

Definition at line 102 of file AdThreshIF.cpp.

References a0_, moose::Compartment::A_, moose::IntFireBase::activation_, moose::Compartment::B_, ProcInfo::currTime, ProcInfo::dt, moose::Compartment::Em_, moose::IntFireBase::fired_, moose::IntFireBase::lastEvent_, moose::IntFireBase::refractT_, moose::Compartment::Rm_, moose::IntFireBase::spikeOut(), moose::Compartment::sumInject_, tauThresh_, threshAdaptive_, threshJump_, moose::IntFireBase::threshold_, moose::Compartment::Vm_, moose::CompartmentBase::VmOut(), moose::Compartment::vProcess(), and moose::IntFireBase::vReset_.

103 {
104  fired_ = false;
105  if ( p->currTime < lastEvent_ + refractT_ ) {
106  Vm_ = vReset_;
107  A_ = 0.0;
108  B_ = 1.0 / Rm_;
109  sumInject_ = 0.0;
110  VmOut()->send( e, Vm_ );
111  } else {
112  // activation can be a continous variable (graded synapse).
113  // So integrate it at every time step, thus *dt.
114  // For a delta-fn synapse, SynHandler-s divide by dt and send activation.
115  // See: http://www.genesis-sim.org/GENESIS/Hyperdoc/Manual-26.html#synchan
116  // for this continuous definition of activation.
117  Vm_ += activation_ * p->dt;
118  activation_ = 0.0;
119  if ( Vm_ > (threshold_+threshAdaptive_) ) {
120  Vm_ = vReset_;
122  lastEvent_ = p->currTime;
123  fired_ = true;
124  spikeOut()->send( e, p->currTime );
125  VmOut()->send( e, Vm_ );
126  } else {
128  Compartment::vProcess( e, p ); // this sends out Vm message also,
129  // so do Vm_ calculations before
130  }
131  }
132 }
double currTime
Definition: ProcInfo.h:19
double threshAdaptive_
Definition: AdThreshIF.h:51
double threshJump_
Definition: AdThreshIF.h:54
void vProcess(const Eref &e, ProcPtr p)
double dt
Definition: ProcInfo.h:18
static SrcFinfo1< double > * spikeOut()
Message src for outgoing spikes.
Definition: IntFireBase.cpp:17
static SrcFinfo1< double > * VmOut()

+ Here is the call graph for this function:

void AdThreshIF::vReinit ( const Eref e,
ProcPtr  p 
)
virtual

The reinit function reinitializes all fields.

Implements moose::IntFireBase.

Definition at line 134 of file AdThreshIF.cpp.

References moose::IntFireBase::activation_, moose::IntFireBase::fired_, moose::IntFireBase::lastEvent_, moose::IntFireBase::refractT_, threshAdaptive_, and moose::Compartment::vReinit().

135 {
136  activation_ = 0.0;
137  threshAdaptive_ = 0.0;
138  fired_ = false;
139  lastEvent_ = -refractT_; // Allow it to fire right away.
140  Compartment::vReinit( e, p );
141 }
void vReinit(const Eref &e, ProcPtr p)
double threshAdaptive_
Definition: AdThreshIF.h:51

+ Here is the call graph for this function:

Member Data Documentation

double moose::AdThreshIF::a0_
private

Definition at line 53 of file AdThreshIF.h.

Referenced by AdThreshIF(), getA0(), setA0(), and vProcess().

double moose::AdThreshIF::tauThresh_
private

Definition at line 52 of file AdThreshIF.h.

Referenced by AdThreshIF(), getTauThresh(), setTauThresh(), and vProcess().

double moose::AdThreshIF::threshAdaptive_
private

Definition at line 51 of file AdThreshIF.h.

Referenced by AdThreshIF(), getThreshAdaptive(), setThreshAdaptive(), vProcess(), and vReinit().

double moose::AdThreshIF::threshJump_
private

Definition at line 54 of file AdThreshIF.h.

Referenced by AdThreshIF(), getThreshJump(), setThreshJump(), and vProcess().


The documentation for this class was generated from the following files: