Пример #1
0
    def __init__(self):
        Model.__init__(self, labels=["Time (ms)", "Voltage (mV)"])

        time_end = 100
        self.dt = 0.25
        self.v0 = -70
        self.time = np.linspace(0, time_end, time_end / self.dt)

        self.info = {"stimulus_start": 10, "stimulus_end": time_end}
Пример #2
0
    def __init__(self):
        Model.__init__(self, labels=["Time (ms)", "Voltage (mV)"])

        ## HH Parameters
        self.V_rest = -65  # mV
        self.Cm = 1  # uF/cm**2
        self.gbar_Na = 120  # mS/cm**2
        self.gbar_K = 36  # mS/cm**2
        self.gbar_l = 0.3  # mS/cm**2
        self.E_Na = 50  # mV
        self.E_K = -77  # mV
        self.E_l = -54.4  # mV

        ## setup parameters and state variables
        self.I_value = 15
        T = 23  # ms
        dt = 0.025  # ms
        self.time = np.arange(0, T + dt, dt)
Пример #3
0
    def test_setup_setup_module_logger(self):

        model = Model(logger_level=None)
        setup_module_logger(class_instance=model, level="info")

        logger = logging.getLogger("uncertainpy.models.model.Model")

        add_file_handler("uncertainpy", filename=self.full_path)

        logger.debug("debug message")
        logger.info("info message")
        logger.warning("warning message")
        logger.error("error message")
        logger.critical("critical message")

        time.sleep(0.1)

        self.assertEqual(len(open(self.full_path).readlines()), 4)
Пример #4
0
 def __init__(self):
     Model.__init__(self, labels=["y"])
Пример #5
0
 def __init__(self):
     Model.__init__(self, labels=["y"], logger_level=None)