Miind
LifNeuralDynamics.cpp
Go to the documentation of this file.
1 // Copyright (c) 2005 - 2014 Marc de Kamps
2 // All rights reserved.
3 //
4 // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5 //
6 // * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7 // * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation
8 // and/or other materials provided with the distribution.
9 // * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software
10 // without specific prior written permission.
11 //
12 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
13 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
14 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
15 // USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
16 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 //
18 // If you use this software in work leading to a scientific publication, you should include a reference there to
19 // the 'currently valid reference', which can be found at http://miind.sourceforge.net
20 #include <cmath>
21 #include <vector>
22 #include "LifNeuralDynamics.hpp"
23 
24 using namespace GeomLib;
25 
27 (
28  const OdeParameter& par,
29  double lambda
30 ):
32 _lambda(lambda),
33 _t_period(this->TimePeriod()),
34 _N_pos(Nposinit()),
35 _t_step(this->TStep()),
36 _N_neg(Nneginit())
37 {
38 }
39 
40 
42 {
43 }
44 
45 
47 (
50 ) const
51 {
52  return _par._par_pop._V_reversal + exp(-t/_par._par_pop._tau)*(V_0 - _par._par_pop._V_reversal);
53 }
54 
55 
57  return new LifNeuralDynamics(*this);
58 }
59 
61 {
63  Number N_min = static_cast<Number>(ceil(_N_pos - (n_extra)));
64  return N_min;
65 }
66 
68 {
69  return _par._nr_bins;
70 }
71 
72 
74 {
75  return _t_period/(_N_pos - 1);
76 }
77 
79 {
80  assert( _par._V_min <= _par._par_pop._V_reset);
82 
85 }
86 
87 
88 std::vector<MPILib::Potential> LifNeuralDynamics::InterpretationArray() const
89 {
90  std::vector<MPILib::Potential> vec_ret(_N_pos +_N_neg);
91  assert(_N_pos + _N_neg > 3);
92 
93  vec_ret[ 0 + _N_neg] = _par._par_pop._V_reversal;
95 
96  for (MPILib::Index i = 2; i < _N_pos; i++)
98 
99  if (_N_neg > 0){
101 
102  for (int i = -2; i >= - static_cast<int>(_N_neg); i--)
103  vec_ret[i + _N_neg] = _par._par_pop._V_reversal - (_par._par_pop._theta - _par._par_pop._V_reversal)*exp((-_t_step/_par._par_pop._tau)*((int)_N_pos + i));
104  }
105  return vec_ret;
106 }
107 
virtual ~LifNeuralDynamics()
Destructor; required to be virtual.
double Potential
MPILib::Time _tau
membrane time constant in s
virtual MPILib::Time TStep() const
Fundamental time step by which mass is shifted through the geometric bins.
MPILib::Potential _V_reset
reset potential in V
Contains the parameters necessary to configure a concrete OdeSystem instance. See AbstractOdeSystem a...
unsigned int Number
unsigned int Index
double Time
The configuration of a GeomAlgorithm requires that the neural dynamics is defined somewhere...
NeuronParameter _par_pop
The neuron parameter.
MPILib::Potential _theta
threshold potential in V
MPILib::Time TimePeriod() const
Leaky-integrate-and-fire dynamics for LeakingOdeSystem.
The objective is find a numerical solution for this equation This requires a numerical representation of the density We will work in the state space of a two dimensional and define a mesh there We first give two examples and then define the general procedure and given in Table for given fixed Delta g see Fig and we will denote coordinates in this dimension by a small letter $v The second dimension can be used to represent parameters as varied as and will represented by $w A strip is constructed by choosing two neighbouring points in state e g and integrating the vector field for a time $T that is assumed to be an integer multiple of a period of time Delta t
Definition: 2D.hpp:101
LifNeuralDynamics(const OdeParameter &, double lambda)
The lambda parameter is creating the artificial period necessary for implementing a 'period' in leaky...
Potential _V_min
The minimum of potential range (the maximum is given in the neuron parameter)
const OdeParameter _par
Time critical access for derived classes.
virtual std::vector< Potential > InterpretationArray() const
Produce an array that contains the bin limits. The are contains the lower bin limits the highest bin ...
Number _nr_bins
The number of bins.
MPILib::Potential _V_reversal
reversal potential in V
virtual LifNeuralDynamics * Clone() const
Virtual constructor mechanism.
The objective is find a numerical solution for this equation This requires a numerical representation of the density We will work in the state space of a two dimensional and define a mesh there We first give two examples and then define the general procedure and given in Table for given fixed Delta g see Fig and we will denote coordinates in this dimension by a small letter $v The second dimension can be used to represent parameters as varied as and will represented by $w A strip is constructed by choosing two neighbouring points in state e g and integrating the vector field for a time $T that is assumed to be an integer multiple of a period of time Delta which we assume to be a defining characteristic of the grid Let then the set of points the set of points which is quadrilateral in shape The quadrilateral should be but not necessarily as long as they are but it is convenient to number them in order of creation In the we will assume that strip numbers created by the integration procedure start and are so that the numbers i in each identify a unique strip Strip no is reserved for stationary points There may or more cells in strip The number of cells in strip $i denoted by with $i the strip number and $j the cell as the i
Definition: 2D.hpp:145
virtual Potential EvolvePotential(MPILib::Potential, MPILib::Time) const
Evolution according to leaky-integrate-and-fire dynamics.