def test_filter_with_spiketrain_h05(self): st = neo.SpikeTrain(self.test_array, units='s', t_stop=2.0) target = self.targ_t08_h05 res = mft._filter(0.8 * pq.s, 0.5 * pq.s, st) assert_array_almost_equal(res, target, decimal=9) self.assertRaises(ValueError, mft._filter, 0.8, 0.5 * pq.s, st) self.assertRaises(ValueError, mft._filter, 0.8 * pq.s, 0.5, st) self.assertRaises(ValueError, mft._filter, 0.8 * pq.s, 0.5 * pq.s, self.test_array)
def test_isi_with_plain_array_h05(self): st = self.test_array target = self.targ_t08_h05 res = mft._filter(0.8 * pq.s, 0.5 * pq.s, st * pq.s) assert_array_almost_equal(res, target, decimal=9)
def test_isi_with_quantities_h05(self): st = pq.Quantity(self.test_array, units='s') target = self.targ_t08_h05 res = mft._filter(0.8 * pq.s, 0.5 * pq.s, st) assert_array_almost_equal(res, target, decimal=9)
def test_filter_with_spiketrain_h025(self): st = neo.SpikeTrain(self.test_array, units='s', t_stop=2.0) target = self.targ_t08_h025 res = mft._filter(0.8 * pq.s, 0.25 * pq.s, st) assert_array_almost_equal(res, target, decimal=9)