コード例 #1
0
    def __init__(self, name, compartment,
                 g_ca3kahp = None,
                 E_ca3kahp = None):
        super(Ca3KahpChannel, self).__init__(name, compartment)

        # Kahp requires Calcium compartment
        from compartment import CalciumCompartment
        # TODO: Or observed calcium?
        assert isinstance(compartment, CalciumCompartment)

        self._latent_dtype = [('q', np.float64)]
        self._state_dtype = [('I', np.float64)]
        self._input_dtype = None
        self._latent_lb = np.array([0])
        self._latent_ub = np.array([1])

        self._calcium_dependent = True

        self._set_defaults(g_ca3kahp, Parameter('g_ca3kahp', distribution=
                                              GammaDistribution(
                                                  hypers['a_g_ca3kahp'].value,
                                                  hypers['b_g_ca3kahp'].value
                                              ),
                                              lb=0.0),
                           E_ca3kahp,  hypers['E_Kahp'])
コード例 #2
0
    def __init__(self, name, compartment,
                 g_ca3ka = None,
                 E_ca3ka = None):

        super(Ca3KaChannel, self).__init__(name, compartment)
        self._latent_dtype = [('a', np.float64), ('b', np.float64)]
        self._state_dtype = [('I', np.float64)]
        self._input_dtype = None
        self._latent_lb = np.array([0, 0])
        self._latent_ub = np.array([1, 1])

        self._set_defaults(g_ca3ka, Parameter('g_ca3ka', distribution=
                                              GammaDistribution(
                                                  hypers['a_g_ca3ka'].value,
                                                  hypers['b_g_ca3ka'].value
                                              ),
                                              lb=0.0),
                           E_ca3ka,  hypers['E_K'])
コード例 #3
0
    def __init__(self, name, compartment,
                 g_ca3kc = None,
                 E_ca3kc = None):

        super(Ca3KcChannel, self).__init__(name, compartment)
        self._latent_dtype = [('c', np.float64)]
        self._state_dtype = [('I', np.float64)]
        self._input_dtype = None
        self._latent_lb = np.array([0])
        self._latent_ub = np.array([1])
        self._calcium_dependent = True

        self._set_defaults(g_ca3kc, Parameter('g_ca3kc', distribution=
                                              GammaDistribution(
                                                  hypers['a_g_ca3kc'].value,
                                                  hypers['b_g_ca3kc'].value
                                              ),
                                              lb=0.0),
                           E_ca3kc,  hypers['E_Ca3Kc'])
コード例 #4
0
    def __init__(self, name, compartment,
                 g_chr2 = None,
                 E_chr2 = None):
        super(ChR2Channel, self).__init__(name, compartment)
        self._latent_dtype = [('O1', np.float64),
                              ('O2', np.float64),
                              ('C1', np.float64),
                              ('C2', np.float64),
                              ('p',  np.float64)]
        self._state_dtype = [('I', np.float64)]
        # self._input_dtype = []
        self._latent_lb = np.array([0, 0, 0, 0, 0])
        self._latent_ub = np.array([1, 1, 1, 1, 1])

        self._set_defaults(g_chr2, Parameter('g_chr2', distribution=
                                              GammaDistribution(
                                                  hypers['a_g_chr2'].value,
                                                  hypers['b_g_chr2'].value
                                              ),
                                              lb=0.0),
                           E_chr2,  hypers['E_ChR2'])
コード例 #5
0
    def __init__(self, name, compartment,
                 g_kdr=None, E_kdr=None):
        super(KdrChannel, self).__init__(name, compartment)
        self.latent_dtype = [('n', np.float64)]
        self.state_dtype = [('I', np.float64)]
        self.latent_lb = np.array([0])
        self.latent_ub = np.array([1])

        # By default, g is gamma distributed
        if g_kdr is None:
            self.g = Parameter('g_kdr',
                     distribution=GammaDistribution(hypers['a_g_kdr'].value,
                                                    hypers['b_g_kdr'].value),
                     lb=0.0)

        else:
            self.g = g_kdr

        # By default, E is a hyperparameter
        if E_kdr is None:
            self.E = hypers['E_K']
        else:
            self.E = E_kdr
コード例 #6
0
    def __init__(self, name, compartment,
                 g_na=None, E_na=None):
        super(NaChannel, self).__init__(name, compartment)
        self.latent_dtype = [('m', np.float64), ('h', np.float64)]
        self.latent_lb = np.array([0,0])
        self.latent_ub = np.array([1,1])
        self.state_dtype = [('I', np.float64)]

        # By default, g is gamma distributed
        if g_na is None:
            self.g = Parameter('g_na',
                     distribution=GammaDistribution(hypers['a_g_na'].value,
                                                    hypers['b_g_na'].value),
                     lb=0.0)

        else:
            self.g = g_na

        # By default, E is a hyperparameter
        if E_na is None:
            self.E = hypers['E_Na']
        else:
            self.E = E_na
コード例 #7
0
    def __init__(self, name, compartment,
                 g_leak=None, E_leak=None):
        super(LeakChannel, self).__init__(name, compartment)
        self.state_dtype = [('I', np.float64)]


        # By default, g is gamma distributed
        if g_leak is None:
            self.g = Parameter('g_leak',
                     distribution=GammaDistribution(hypers['a_g_leak'].value,
                                                    hypers['b_g_leak'].value),
                     lb=0.0)

        else:
            assert isinstance(g_leak, Parameter)
            self.g = g_leak

        # By default, E is a hyperparameter
        if E_leak is None:
            self.E = hypers['E_leak']
        else:
            assert isinstance(E_leak, Parameter)
            self.E = E_leak