示例#1
0
 def simulate(self, time_step, current_at_start=0.):
     
     # TODO: no good place for this, but can't be done in '_calculate_derivatives' due to several calls
     # TODO: correct for neuron? models dendrites and axon to be just on one side of the soma-cable
     current_at_end = 0.
     for s in self._successors:
         cur = 0.5 * (s._segment_plasma_conductance + s.cross_sectional_area / self._successors_cross_sectional_area * self._segment_plasma_conductance) * (- s.potential[0] + self.potential[-1])
         current_at_end += cur
         s.simulate(time_step, -cur)
     
     simulated_values = Solver.default(time_step, self._calculate_derivatives, self.potential, current_at_start, current_at_end)
     self.potential = simulated_values
示例#2
0
 def simulate(self, time_step, potential):
     simulated_values = Solver.default(time_step, self.calculate_derivatives, self._r, self._s, potential)
     self.conductance = self._s**self._n / (self._s**self._n + self._Kd) * self._maximum_conductance
     self._r, self._s = simulated_values
示例#3
0
 def simulate(self, timeStep, potential):
     simulated_values = Solver.default(timeStep, self.calculate_derivatives, self._r, potential)
     self.conductance = self._r * self._maximum_conductance
     self._r = simulated_values
示例#4
0
 def simulate(self, time_step, potential):
     simulated_values = Solver.default(time_step, self.calculate_derivatives, self._r, potential)
     self.conductance = self._r * self._magnesium_block * self._maximum_conductance
     # c. f. Jahr 1990
     self._magnesium_block = 1. / (1. + numpy.exp(-0.062 * potential) * (self._extracellular_magnesium_concentration / 3.57))
     self._r = simulated_values
示例#5
0
 def simulate(self, time_step, current_at_start=0):
     simulated_values = Solver.default(time_step, self._calculate_derivatives, self.potential, self.m_gate, self.h_gate, self.n_gate, current_at_start)
     for s in self._outgoing_synapses:
         s.simulate(time_step, self.potential[-1])
         
     self.potential, self.m_gate, self.h_gate, self.n_gate = simulated_values
示例#6
0
 def simulate(self, time_step, current_at_start=0, current_at_end=0, extra_current=0):
     self.potential = Solver.default(time_step, self._calculate_derivatives, self.potential, current_at_start, current_at_end, extra_current)