From 6cd4e13da48a9124846bc26efae12961f43d4cc8 Mon Sep 17 00:00:00 2001 From: "a.ott" Date: Mon, 20 Jan 2020 16:21:37 +0100 Subject: [PATCH] add factor to adaption step to make it independent of tau_a --- models/LIFAC.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/models/LIFAC.py b/models/LIFAC.py index f80189c..f9840e6 100644 --- a/models/LIFAC.py +++ b/models/LIFAC.py @@ -6,8 +6,9 @@ import numpy as np class LIFACModel(AbstractModel): # all times in milliseconds - KEYS = ["mem_res", "mem_tau", "v_base", "v_zero", "threshold", "step_size", "delta_a", "tau_a"] - VALUES = [100 * 1000000, 0.1 * 200, 0, 0, 10, 0.01, 1, 20] + # possible mem_res: 100 * 1000000 + KEYS = ["mem_tau", "v_base", "v_zero", "threshold", "step_size", "delta_a", "tau_a"] + VALUES = [0.1 * 200, 0, 0, 10, 0.01, 1, 20] # membrane time constant tau = mem_cap*mem_res def __init__(self, params: dict = None): @@ -34,7 +35,7 @@ class LIFACModel(AbstractModel): if v_next > self.parameters["threshold"]: v_next = self.parameters["v_base"] spiketimes.append(time_point/1000) - a_next += self.parameters["delta_a"] + a_next += self.parameters["delta_a"] / (self.parameters["tau_a"] / 1000) output_voltage.append(v_next) adaption.append(a_next)