Exemple #1
0
    def test_peak_detection_time_stamps(self):
        # Test with default arguments
        result = stgen.peak_detection(self.vm)
        self.assertEqual(len(self.true_time_stamps), len(result))
        self.assertIsInstance(result, neo.core.SpikeTrain)

        try:
            assert_array_almost_equal(result, self.true_time_stamps)
        except AttributeError:
            self.assertTrue(np.array_equal(result, self.true_time_stamps))
    def test_peak_detection_time_stamps(self):
        # Test with default arguments
        result = stgen.peak_detection(self.vm)
        self.assertEqual(len(self.true_time_stamps), len(result))
        self.assertIsInstance(result, neo.core.SpikeTrain)

        try:
            assert_array_almost_equal(result, self.true_time_stamps)
        except AttributeError:
            self.assertTrue(np.array_equal(result, self.true_time_stamps))
Exemple #3
0
 def test_peak_detection_threshold(self):
     # Test for empty SpikeTrain when threshold is too high
     result = stgen.peak_detection(self.vm, threshold=30 * mV)
     self.assertEqual(len(result), 0)
 def test_peak_detection_threshold(self):
     # Test for empty SpikeTrain when threshold is too high
     result = stgen.peak_detection(self.vm, threshold=30 * mV)
     self.assertEqual(len(result), 0)