Beispiel #1
0
    def addOUconductance(self,
                         loc,
                         tau,
                         mean,
                         stdev,
                         e_r,
                         delay,
                         dur,
                         seed=None):
        """
        Injects a Ornstein-Uhlenbeck conductance at a given location

        Parameters
        ----------
        loc: dict, tuple or :class:`neat.MorphLoc`
            The location of the conductance.
        tau: float
            Time-scale of the OU process (ms)
        mean: float
            Mean of the OU process (uS)
        stdev: float
            Standard deviation of the OU process (uS)
        e_r: float
            Reversal of the current (mV)
        delay: float
            The delay of current onset from the start of the simulation (ms)
        dur: float
            The duration of the current input (ms)
        seed: int, optional
            Seed for the random number generator
        """
        seed = np.random.randint(1e16) if seed is None else seed
        loc = MorphLoc(loc, self)
        # create the current clamp
        iclamp = h.OUConductance(self.sections[loc['node']](loc['x']))
        iclamp.tau = tau
        iclamp.mean = mean  # uS
        iclamp.stdev = stdev  # uS
        iclamp.e_r = e_r  # mV
        iclamp.delay = delay + self.t_calibrate  # ms
        iclamp.dur = dur  # ms
        iclamp.seed_usr = seed  # ms
        iclamp.dt_usr = self.dt  # ms
        # store the iclamp
        self.iclamps.append(iclamp)
Beispiel #2
0
 def addOUconductance(self,
                      loc,
                      tau,
                      mean,
                      stdev,
                      e_r,
                      delay,
                      dur,
                      seed=None):
     seed = np.random.randint(1e16) if seed is None else seed
     loc = MorphLoc(loc, self)
     # create the current clamp
     iclamp = h.OUConductance(self.sections[loc['node']](loc['x']))
     iclamp.tau = tau
     iclamp.mean = mean  # uS
     iclamp.stdev = stdev  # uS
     iclamp.e_r = e_r  # mV
     iclamp.delay = delay + self.t_calibrate  # ms
     iclamp.dur = dur  # ms
     iclamp.seed_usr = seed  # ms
     iclamp.dt_usr = self.dt  # ms
     # store the iclamp
     self.iclamps.append(iclamp)