def test_clear_refrac(self): thr = self.spikes.threshold(3 * self.spikes.std()) for ms in self.mses: cleared = self.spikes.clear_refrac(thr, ms) assert_all_dtypes(cleared, np.bool_) self.assertLessEqual(cleared.values.sum(), thr.values.sum())
def test_threshold_std_array(self): sp = self.spikes std = sp.std() thresh = 2.0 thr = sp.threshold(thresh * std) assert_all_dtypes(thr, np.bool_) self.assertTupleEqual(thr.shape, sp.shape)
def test_threshold_scalar(self): sp = self.spikes std = rand() thr = sp.threshold(2.0 * std) assert_all_dtypes(thr, np.bool_) self.assertTupleEqual(thr.shape, sp.shape)