示例#1
0
 def test_t_stop_is_max_of_all_trains(self):
     a = arange_spikes(3.0 * pq.s, 5.0 * pq.s)
     b = arange_spikes(1.0 * pq.s, 6.0 * pq.s)
     expected = 6.0 * pq.s
     actual = tools.concatenate_spike_trains((a, b)).t_stop
     self.assertAlmostEqual(expected, actual)
示例#2
0
 def test_t_stop_is_max_of_all_trains(self):
     a = arange_spikes(3.0 * pq.s, 5.0 * pq.s)
     b = arange_spikes(1.0 * pq.s, 6.0 * pq.s)
     expected = 6.0 * pq.s
     actual = tools.concatenate_spike_trains((a, b)).t_stop
     self.assertAlmostEqual(expected, actual)
示例#3
0
 def test_concatenates_spike_trains(self):
     a = arange_spikes(3.0 * pq.s)
     b = arange_spikes(2.0 * pq.s, 5.0 * pq.s)
     expected = arange_spikes(5.0 * pq.s)
     actual = tools.concatenate_spike_trains((a, b))
     assert_array_almost_equal(expected, actual)
示例#4
0
 def test_concatenates_spike_trains(self):
     a = arange_spikes(3.0 * pq.s)
     b = arange_spikes(2.0 * pq.s, 5.0 * pq.s)
     expected = arange_spikes(5.0 * pq.s)
     actual = tools.concatenate_spike_trains((a, b))
     assert_array_almost_equal(expected, actual)