adapt runtime test to changes
This commit is contained in:
parent
af2172c81b
commit
234f58404e
@ -75,19 +75,16 @@ def test_peak_detection():
|
|||||||
def test_simulation_speed():
|
def test_simulation_speed():
|
||||||
parameters = {'mem_tau': 21.348990483539083, 'delta_a': 20.41809814660199, 'input_scaling': 3.0391541280864196, 'v_offset': 26.25, 'threshold': 1, 'v_base': 0, 'step_size': 0.01, 'tau_a': 158.0404259501454, 'a_zero': 0, 'v_zero': 0, 'noise_strength': 2.87718460648148}
|
parameters = {'mem_tau': 21.348990483539083, 'delta_a': 20.41809814660199, 'input_scaling': 3.0391541280864196, 'v_offset': 26.25, 'threshold': 1, 'v_base': 0, 'step_size': 0.01, 'tau_a': 158.0404259501454, 'a_zero': 0, 'v_zero': 0, 'noise_strength': 2.87718460648148}
|
||||||
model = LifacNoiseModel(parameters)
|
model = LifacNoiseModel(parameters)
|
||||||
repetitions = 30
|
repetitions = 20
|
||||||
seconds = 10
|
seconds = 10
|
||||||
stimulus = SinusAmplitudeModulationStimulus(750, 0.3, 10)
|
stimulus = SinusAmplitudeModulationStimulus(750, 1, 10, 1, 8)
|
||||||
|
time_start = 0
|
||||||
t_start = time.time()
|
t_start = time.time()
|
||||||
for i in range(repetitions):
|
for i in range(repetitions):
|
||||||
v, spikes = model.simulate_fast(stimulus, seconds)
|
v, spikes = model.simulate_fast(stimulus, seconds, time_start)
|
||||||
|
|
||||||
plt.plot(v)
|
|
||||||
plt.show()
|
|
||||||
|
|
||||||
t_end = time.time()
|
t_end = time.time()
|
||||||
|
print("baseline markers:",model.calculate_baseline_markers(750, 3))
|
||||||
|
|
||||||
print("took:", round((t_end-t_start)/repetitions, 2), "seconds for " + str(seconds) + "s simulation", "step size:", parameters["step_size"])
|
print("took:", round((t_end-t_start)/repetitions, 2), "seconds for " + str(seconds) + "s simulation", "step size:", parameters["step_size"])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user