add limits >0 for ref_period and noise_strength
This commit is contained in:
parent
c7e2bd9085
commit
a7fe56be66
@ -96,5 +96,13 @@ class AbstractModel:
|
||||
raise ValueError(err_msg)
|
||||
|
||||
if "tau" in k and params[k] < 0.0000001:
|
||||
warn("Time constants cannot be negative ot smaller than 0.0001ms setting " + str(k) + " to 0.5ms")
|
||||
warn("Time constants cannot be negative or smaller than 0.0001ms setting " + str(k) + " to 0.5ms")
|
||||
params[k] = 0.00005
|
||||
|
||||
if k == "refractory_period" and params[k] < 0:
|
||||
warn("negative refractory period makes no sense. Setting " + str(k) + " to 0ms")
|
||||
params[k] = 0
|
||||
|
||||
if k == "noise_strength" and params[k] < 0:
|
||||
warn("negative noise strength makes no sense. Setting " + str(k) + " to 0ms")
|
||||
params[k] = 0
|
||||
|
Loading…
Reference in New Issue
Block a user