many changes
This commit is contained in:
@@ -21,16 +21,16 @@ class LifacNoiseTester(unittest.TestCase):
|
||||
self.voltage_precision = 0.000001
|
||||
|
||||
def test_simulate_fast_step_sinus(self):
|
||||
v1, spikes = self.model.simulate(self.step_sinus, self.simulation_time)
|
||||
v_fast, spikes_fast = self.model.simulate_fast(self.step_sinus, self.simulation_time)
|
||||
v1, spikes = self.model.simulate_slow(self.step_sinus, self.simulation_time)
|
||||
v_fast, spikes_fast = self.model.simulate(self.step_sinus, self.simulation_time)
|
||||
test = [abs(v1[i] - v_fast[i]) > self.voltage_precision for i in range(len(v1))]
|
||||
|
||||
self.assertTrue(sum(test) == 0, msg="The voltage traces between the fast and slow simulation aren't equal diff: {:}".format(sum(test)))
|
||||
self.assertTrue(np.array_equal(spikes, spikes_fast), msg="The spike times between the fast and slow simulation aren't equal")
|
||||
|
||||
def test_simulate_fast_base_sinus(self):
|
||||
v1, spikes = self.model.simulate(self.base_sinus, self.simulation_time)
|
||||
v_fast, spikes_fast = self.model.simulate_fast(self.base_sinus, self.simulation_time)
|
||||
v1, spikes = self.model.simulate_slow(self.base_sinus, self.simulation_time)
|
||||
v_fast, spikes_fast = self.model.simulate(self.base_sinus, self.simulation_time)
|
||||
|
||||
test = [abs(v1[i] - v_fast[i]) > self.voltage_precision for i in range(len(v1))]
|
||||
|
||||
@@ -38,8 +38,8 @@ class LifacNoiseTester(unittest.TestCase):
|
||||
self.assertTrue(np.array_equal(spikes, spikes_fast), msg="The spike times between the fast and slow simulation aren't equal")
|
||||
|
||||
def test_simulate_fast_no_stimulus(self):
|
||||
v1, spikes = self.model.simulate(self.none_stimulus, self.simulation_time)
|
||||
v_fast, spikes_fast = self.model.simulate_fast(self.none_stimulus, self.simulation_time)
|
||||
v1, spikes = self.model.simulate_slow(self.none_stimulus, self.simulation_time)
|
||||
v_fast, spikes_fast = self.model.simulate(self.none_stimulus, self.simulation_time)
|
||||
|
||||
test = [abs(v1[i] - v_fast[i]) > self.voltage_precision for i in range(len(v1))]
|
||||
|
||||
@@ -54,7 +54,7 @@ class LifacNoiseTester(unittest.TestCase):
|
||||
for offset in v_offsets:
|
||||
test_model.set_variable("v_offset", offset)
|
||||
|
||||
_, spikes = test_model.simulate_fast(stimulus, 5)
|
||||
_, spikes = test_model.simulate(stimulus, 5)
|
||||
goal_freq = hF.mean_freq_of_spiketimes_after_time_x(spikes, 1)
|
||||
|
||||
if goal_freq <= threshold:
|
||||
|
||||
Reference in New Issue
Block a user